From patchwork Mon Nov 30 14:55:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 63711 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 nAUEuEhj026723 for ; Mon, 30 Nov 2009 14:56:14 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C8609E7C6; Mon, 30 Nov 2009 06:56:13 -0800 (PST) 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 6D0EB9E772 for ; Mon, 30 Nov 2009 06:56:10 -0800 (PST) Received: by mail.ffwll.ch (Postfix, from userid 1000) id 1287420C1B0; Mon, 30 Nov 2009 15:56:09 +0100 (CET) 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-+--UD:freedesktop.org, 0.000-+--UD:show_bug.cgi, 0.000-+--show_bugcgi 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.964-+--H*m:ffwll, 0.950-+--H*r:mail.ffwll.ch Received: from biene (unknown [192.168.23.129]) by mail.ffwll.ch (Postfix) with ESMTP id B7AC120C13C; Mon, 30 Nov 2009 15:56:03 +0100 (CET) Received: from daniel by biene with local (Exim 4.69) (envelope-from ) id 1NF7fX-00081m-L4; Mon, 30 Nov 2009 15:56:03 +0100 From: Daniel Vetter To: intel-gfx@lists.freedesktop.org Date: Mon, 30 Nov 2009 15:55:49 +0100 Message-Id: <1259592949-30828-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <20091130141744.GE21338@viiv.ffwll.ch> References: <20091130141744.GE21338@viiv.ffwll.ch> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: fixup interrupted overlay switch off calls 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 d18f563..7806f7d 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -880,12 +880,15 @@ int intel_overlay_switch_off(struct intel_overlay *overlay) BUG_ON(!mutex_is_locked(&dev->struct_mutex)); BUG_ON(!mutex_is_locked(&dev->mode_config.mutex)); + if (overlay->hw_wedged) { + ret = intel_overlay_recover_from_interrupt(overlay, 1); + if (ret != 0) + return ret; + } + if (!overlay->active) return 0; - if (overlay->hw_wedged) - return -EBUSY; - ret = intel_overlay_release_old_vid(overlay); if (ret != 0) return ret;