From patchwork Thu Apr 21 21:18:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 725771 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 p3LLJYoo008101 for ; Thu, 21 Apr 2011 21:19:54 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 210809E7F7 for ; Thu, 21 Apr 2011 14:19:34 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (server109-228-6-236.live-servers.net [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id EAA029E8BB for ; Thu, 21 Apr 2011 14:18:47 -0700 (PDT) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.66.37; Received: from arrandale.alporthouse.com (unverified [78.156.66.37]) by fireflyinternet.com (Firefly Internet SMTP) with ESMTP id 32744342-1500050 for multiple; Thu, 21 Apr 2011 22:18:39 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 21 Apr 2011 22:18:20 +0100 Message-Id: <1303420712-6369-6-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1303420712-6369-1-git-send-email-chris@chris-wilson.co.uk> References: <1303420712-6369-1-git-send-email-chris@chris-wilson.co.uk> X-Originating-IP: 78.156.66.37 Subject: [Intel-gfx] [PATCH 05/17] drm/i915/tv: Clear state sense detection for Cantiga 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]); Thu, 21 Apr 2011 21:19:54 +0000 (UTC) From: Zhao Yakui ... otherwise the TV type will be misdetected and cause spurious connections. This was originally applied as fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 (drm/i915: Configure the TV sense state correctly on GM45 to make TV detection reliable) Eric: Shortly after applying this patch you requested it to be reverted, d4b74bf07873da2e94219a7b67a334fc1c3ce649 (Revert "drm/i915: Configure the TV sense state correctly on GM45 to make TV), but we have no clear information just what is broken by this patch and how to resolve it. Reported-and-tested-by: darkbasic4@gmail.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27168 Signed-off-by: Zhao Yakui Tested-by: Santi Cc: Eric Anholt --- drivers/gpu/drm/i915/intel_tv.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 6b22c1d..3047a66 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -1269,6 +1269,15 @@ intel_tv_detect_type (struct intel_tv *intel_tv, DAC_B_0_7_V | DAC_C_0_7_V); + + /* + * The TV sense state should be cleared to zero on cantiga platform. Otherwise + * the TV is misdetected. This is hardware requirement. + */ + if (IS_GM45(dev)) + tv_dac &= ~(TVDAC_STATE_CHG_EN | TVDAC_A_SENSE_CTL | + TVDAC_B_SENSE_CTL | TVDAC_C_SENSE_CTL); + I915_WRITE(TV_CTL, tv_ctl); I915_WRITE(TV_DAC, tv_dac); POSTING_READ(TV_DAC);