From patchwork Fri Feb 11 22:18:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 550961 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1BMIv24017251 for ; Fri, 11 Feb 2011 22:19:19 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F08389E768 for ; Fri, 11 Feb 2011 14:18:56 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8]) by gabe.freedesktop.org (Postfix) with SMTP id AAC7E9E744 for ; Fri, 11 Feb 2011 14:18:34 -0800 (PST) Received: (qmail 13777 invoked by uid 0); 11 Feb 2011 22:18:34 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy3.bluehost.com with SMTP; 11 Feb 2011 22:18:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:X-Identified-User; b=ZY134ZJMMqGWACNl99sk737oQWBzjh3m3gS//NodyIX4a8gI83Yw4vu2dAQP45ClTqepfC9+zBQv0lKX/N2tMOMDIq+n0knPNOyf61SMA+wHod0aj3hZdE4bkIoTgfMD; Received: from c-67-174-193-198.hsd1.ca.comcast.net ([67.174.193.198] helo=localhost6.localdomain6) by box514.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Po1Jw-0001iH-EG; Fri, 11 Feb 2011 15:18:32 -0700 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Fri, 11 Feb 2011 14:18:28 -0800 Message-Id: <1297462708-2677-1-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.7.2.3 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.174.193.198 authed with jbarnes@virtuousgeek.org} Subject: [Intel-gfx] [PATCH] drm/i915/dp: don't wait for vblank on a NULL crtc X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 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-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 11 Feb 2011 22:19:36 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 1f4242b..0c62b94 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1426,6 +1426,7 @@ intel_dp_link_down(struct intel_dp *intel_dp) struct drm_device *dev = intel_dp->base.base.dev; struct drm_i915_private *dev_priv = dev->dev_private; uint32_t DP = intel_dp->DP; + struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc); if ((I915_READ(intel_dp->output_reg) & DP_PORT_EN) == 0) return; @@ -1453,9 +1454,9 @@ intel_dp_link_down(struct intel_dp *intel_dp) if (is_edp(intel_dp)) DP |= DP_LINK_TRAIN_OFF; - if (!HAS_PCH_CPT(dev) && + /* CRTC may be NULL if this DP link has never been configured */ + if (!HAS_PCH_CPT(dev) && intel_crtc && I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) { - struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc); /* Hardware workaround: leaving our transcoder select * set to transcoder B while it's off will prevent the * corresponding HDMI output on transcoder A.