From patchwork Wed Dec 9 02:04:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 65864 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 nB925PVH003173 for ; Wed, 9 Dec 2009 02:05:25 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AD0D9E85C; Tue, 8 Dec 2009 18:05:25 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fmsmga102.fm.intel.com (mga10.intel.com [192.55.52.92]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AA789E7A4 for ; Tue, 8 Dec 2009 18:05:22 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 08 Dec 2009 18:00:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,364,1257148800"; d="scan'208";a="754135404" Received: from ubuntu-hp.sh.intel.com (HELO localhost.localdomain) ([10.239.36.10]) by fmsmga001.fm.intel.com with ESMTP; 08 Dec 2009 18:05:19 -0800 From: Zhenyu Wang To: Date: Wed, 9 Dec 2009 10:04:13 +0800 Message-Id: <1260324253-22738-1-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 1.6.3.3 Cc: intel-gfx@lists.freedesktop.org, Stable Team Subject: [Intel-gfx] [PATCH] drm/i915: Workaround CRT detect issue for Ironlake 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_crt.c b/drivers/gpu/drm/i915/intel_crt.c index e505144..602aeba 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -179,10 +179,16 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector) { struct drm_device *dev = connector->dev; struct drm_i915_private *dev_priv = dev->dev_private; - u32 adpa; + u32 adpa, temp; bool ret; - adpa = I915_READ(PCH_ADPA); + temp = adpa = I915_READ(PCH_ADPA); + + /* Workaround for detect issue, disable analog port before + * detect sequence, then restore the origin state after detect. + */ + adpa &= ~ADPA_DAC_ENABLE; + I915_WRITE(PCH_ADPA, adpa); adpa &= ~ADPA_CRT_HOTPLUG_MASK; @@ -209,6 +215,9 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector) else ret = false; + /* restore origin state */ + I915_WRITE(PCH_ADPA, temp); + return ret; }