X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on cantiga.alporthouse.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham version=3.3.1 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=66.98.244.53; Received: from mail.surfanytime.net [109.228.6.236] by cantiga.alporthouse.com with POP3 (fetchmail-6.3.17) for (single-drop); Wed, 04 Aug 2010 06:53:31 +0100 (BST) Received: from relay.fireflyinternet.com (unverified [66.98.244.53]) by fireflyinternet.com (Firefly Internet SMTP) with ESMTP id 1694168-1500048 for ; Wed, 04 Aug 2010 06:54:32 +0100 Return-Path: Received-SPF: none (No spf1 record for (lists.freedesktop.org) ) client-ip=212.53.64.18; envelope-from=; Received: from coumta57.netbenefit.co.uk (unverified [212.53.64.18]) by relay.fireflyinternet.com (FireflyRelay1) with ESMTP id 77254897 for ; Wed, 04 Aug 2010 06:52:37 +0100 Return-Path: Received: from gabe.freedesktop.org ([131.252.210.177]:53908) by coumta57.netbenefit.co.uk with esmtp (NBT 4.61 23) id 1OgWuF-0000a9-Ns for chris@chris-wilson.co.uk; Wed, 04 Aug 2010 06:52:51 +0100 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FE559ED71 for ; Tue, 3 Aug 2010 22:52:46 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id 456979E9AD for ; Tue, 3 Aug 2010 22:52:22 -0700 (PDT) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o745qLgq009139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 4 Aug 2010 01:52:21 -0400 Received: from clockmaker-el6.bne.redhat.com (dhcp-0-222.bne.redhat.com [10.64.0.222]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o745qJrm022993 for ; Wed, 4 Aug 2010 01:52:20 -0400 From: Dave Airlie To: intel-gfx@lists.freedesktop.org Date: Wed, 4 Aug 2010 15:52:19 +1000 Message-Id: <1280901139-8922-1-git-send-email-airlied@gmail.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Subject: [Intel-gfx] [PATCH] i915: disable DAC on Ironlake also when doing CRT load detection. 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: intel-gfx-bounces+chris=chris-wilson.co.uk@lists.freedesktop.org Errors-To: intel-gfx-bounces+chris=chris-wilson.co.uk@lists.freedesktop.org X-NB-Virus-Scan: virus-free X-Originally-To: chris@chris-wilson.co.uk X-NotAscii: charset=us-ascii X-Avast: Message is clean X-IP-stats: Incoming Last 0, First 686, in=20606, out=0, spam=0 X-External-IP: 212.53.64.18 X-Rcpt-To: X-SpamDetect: ***: 3.000000 Suspicious proportion of text in CAPS=1.0, Aspam=2.0 X-NotAscii: charset=us-ascii X-Probe: +OK skipped, from trusted ip X-Avast: Message is clean X-IP-stats: Incoming Last 0, First 9, in=269, out=0, spam=0 ip=212.53.64.18 Status: U X-UIDL: 188854 From: Dave Airlie Like on Sandybridge, disabling the DAC here when doing CRT load detect avoids forever hangs waiting on the hardware. test procedure on HP 2740p: boot with no VGA plugged in, start X, plug in VGA monitor (1280x1024) chvt 3 machine hangs waiting forever. Signed-off-by: Dave Airlie --- drivers/gpu/drm/i915/intel_crt.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index ee0732b..2a3b59b 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -160,19 +160,20 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector) struct drm_i915_private *dev_priv = dev->dev_private; u32 adpa, temp; bool ret; + bool turn_off_dac = false; temp = adpa = I915_READ(PCH_ADPA); - if (HAS_PCH_CPT(dev)) { - /* Disable DAC before force detect */ - I915_WRITE(PCH_ADPA, adpa & ~ADPA_DAC_ENABLE); - (void)I915_READ(PCH_ADPA); - } else { - adpa &= ~ADPA_CRT_HOTPLUG_MASK; - /* disable HPD first */ - I915_WRITE(PCH_ADPA, adpa); - (void)I915_READ(PCH_ADPA); - } + if (HAS_PCH_SPLIT(dev)) + turn_off_dac = true; + + adpa &= ~ADPA_CRT_HOTPLUG_MASK; + if (turn_off_dac) + adpa &= ~ADPA_DAC_ENABLE; + + /* disable HPD first */ + I915_WRITE(PCH_ADPA, adpa); + (void)I915_READ(PCH_ADPA); adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 | ADPA_CRT_HOTPLUG_WARMUP_10MS | @@ -188,7 +189,7 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector) while ((I915_READ(PCH_ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) != 0) ; - if (HAS_PCH_CPT(dev)) { + if (turn_off_dac) { I915_WRITE(PCH_ADPA, temp); (void)I915_READ(PCH_ADPA); } -- 1.7.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx