From patchwork Sun Oct 4 13:00:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 51589 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n94D0rwT029583 for ; Sun, 4 Oct 2009 13:00:54 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 379B69E754; Sun, 4 Oct 2009 06:00:53 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.ffwll.ch (cable-static-49-187.intergga.ch [157.161.49.187]) by gabe.freedesktop.org (Postfix) with ESMTP id 0ECE29E754 for ; Sun, 4 Oct 2009 06:00:49 -0700 (PDT) Received: by mail.ffwll.ch (Postfix, from userid 1000) id 94AAF20C20C; Sun, 4 Oct 2009 15:00:45 +0200 (CEST) X-Spam-ASN: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on orange.ffwll.ch X-Spam-Level: X-Spam-Hammy: 0.000-+--H*Ad:D*sourceforge.net, 0.000-+--H*Ad:D*lists.sourceforge.net, 0.000-+--struct X-Spam-Status: No, score=-4.4 required=6.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Spammy: 0.966-+--H*Ad:U*daniel.vetter, 0.963-+--H*m:ffwll, 0.948-+--H*r:mail.ffwll.ch Received: from biene (unknown [192.168.23.129]) by mail.ffwll.ch (Postfix) with ESMTP id 9846020C0FC; Sun, 4 Oct 2009 15:00:33 +0200 (CEST) Received: from daniel by biene with local (Exim 4.69) (envelope-from ) id 1MuQhf-0001gv-GW; Sun, 04 Oct 2009 15:00:44 +0200 From: Daniel Vetter To: intel-gfx@lists.freedesktop.org Date: Sun, 4 Oct 2009 15:00:36 +0200 Message-Id: <1254661237-6472-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.6.4.3 In-Reply-To: <20091004122339.GA21240@viiv.ffwll.ch> References: <20091004122339.GA21240@viiv.ffwll.ch> Cc: dri-devel@lists.sourceforge.net, Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: overlay: kill one more unnecessary uninterruptible sleep X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 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@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 972d715..f1bf0b0 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -286,16 +286,15 @@ static int intel_overlay_wait_flip(struct intel_overlay *overlay) RING_LOCALS; if (overlay->last_flip_req != 0) { - ret = i915_do_wait_request(dev, overlay->last_flip_req, 0); - if (ret != 0) - return ret; - - overlay->last_flip_req = 0; + ret = i915_do_wait_request(dev, overlay->last_flip_req, 1); + if (ret == 0) { + overlay->last_flip_req = 0; - tmp = I915_READ(ISR); + tmp = I915_READ(ISR); - if (!(tmp & I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT)) - return 0; + if (!(tmp & I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT)) + return 0; + } } /* synchronous slowpath */ @@ -439,8 +438,6 @@ int intel_overlay_recover_from_interrupt(struct intel_overlay *overlay, return ret; case SWITCH_OFF_STAGE_2: - printk("switch off 2\n"); - BUG_ON(!overlay->vid_bo); obj = overlay->vid_bo->obj;