From patchwork Fri Sep 27 19:57:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 2956801 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B8DB8BFF0B for ; Fri, 27 Sep 2013 20:03:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA64E202DD for ; Fri, 27 Sep 2013 20:03:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 48CD02030B for ; Fri, 27 Sep 2013 20:03:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 37B7FE6CA0 for ; Fri, 27 Sep 2013 13:03:15 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from oproxy14-pub.mail.unifiedlayer.com (oproxy14-pub.mail.unifiedlayer.com [67.222.51.224]) by gabe.freedesktop.org (Postfix) with SMTP id 45F36E5DB9 for ; Fri, 27 Sep 2013 13:03:04 -0700 (PDT) Received: (qmail 5853 invoked by uid 0); 27 Sep 2013 19:57:27 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy14.unifiedlayer.com with SMTP; 27 Sep 2013 19:57:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:To:From; bh=aZR3FWEdbcbg/mxqGq0bl2HszFIEAIXQ8lc9BIb0RIo=; b=l2ZuQ/RcKByjKSeBUzxPDSOOQHDl7VlQd6bj+DYXJO9VYv5pLcuUYBBQdmyEMtPomQ3F/4qSoGTRqq/fRdniw7jUPin1iOKkvKXyw6lYeN7RJzJ512Gkq7LCSMcWr082; Received: from [67.161.37.189] (port=34187 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1VPeAJ-0007bs-Ch for intel-gfx@lists.freedesktop.org; Fri, 27 Sep 2013 13:57:27 -0600 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Fri, 27 Sep 2013 12:57:23 -0700 Message-Id: <1380311846-1581-2-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1380311846-1581-1-git-send-email-jbarnes@virtuousgeek.org> References: <1380311846-1581-1-git-send-email-jbarnes@virtuousgeek.org> X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] [PATCH 2/5] drm/i915: use wait_event_timeout when waiting for flip completions X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We're shutting the crtc off and don't want to hang forever. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bc25481..8da1c96 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2912,8 +2912,9 @@ static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc) WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue)); - wait_event(dev_priv->pending_flip_queue, - !intel_crtc_has_pending_flip(crtc)); + wait_event_timeout(dev_priv->pending_flip_queue, + !intel_crtc_has_pending_flip(crtc), + msecs_to_jiffies(50)); mutex_lock(&dev->struct_mutex); intel_finish_fb(crtc->fb);