From patchwork Sat Apr 25 08:08:27 2037 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 63656 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 nAU9Qctw005113 for ; Mon, 30 Nov 2009 09:26:38 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6635A9EB76; Mon, 30 Nov 2009 01:26:37 -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 74A9F9EB49 for ; Mon, 30 Nov 2009 01:26:35 -0800 (PST) Received: by mail.ffwll.ch (Postfix, from userid 1000) id 821DA20C156; Mon, 30 Nov 2009 10:26:34 +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-+--show_bugcgi, 0.000-+--show_bug.cgi X-Spam-Status: No, score=-1.2 required=6.0 tests=ALL_TRUSTED,BAYES_00, FH_DATE_PAST_20XX autolearn=no 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 4774E20C1B0; Mon, 30 Nov 2009 10:26:24 +0100 (CET) Received: from daniel by biene with local (Exim 4.69) (envelope-from ) id 2JlAzX-0001M9-J1; Sat, 25 Apr 2037 10:08:39 +0200 From: Daniel Vetter To: intel-gfx@lists.freedesktop.org Date: Sat, 25 Apr 2037 10:08:27 +0200 Message-Id: <64dfec58a58d57b0bbf90727545b53c98a14e52d.2124259224.git.daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <06891ed1f1ed308aecf6544268ed86bb61a393f9.2124259224.git.daniel.vetter@ffwll.ch> References: <06891ed1f1ed308aecf6544268ed86bb61a393f9.2124259224.git.daniel.vetter@ffwll.ch> In-Reply-To: References: Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 2/2] 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..1e4557a 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; + } + if (!overlay->active) return 0; - if (overlay->hw_wedged) - return -EBUSY; - ret = intel_overlay_release_old_vid(overlay); if (ret != 0) return ret;