Patchwork [1/1,Oneiric,Precise] drm/i915: reinstate GM45 TV detection fix

login
register
mail settings
Submitter Brad Figg
Date April 2, 2012, 3:36 p.m.
Message ID <1333381017-28902-2-git-send-email-brad.figg@canonical.com>
Download mbox | patch
Permalink /patch/150180/
State New
Headers show

Comments

Brad Figg - April 2, 2012, 3:36 p.m.
From: Daniel Vetter <daniel.vetter@ffwll.ch>

BugLink: http://bugs.launchpad.net/bugs/638939

This reverts commmit d4b74bf07873da2e94219a7b67a334fc1c3ce649 which
reverted the origin fix fb8b5a39b6310379d7b54c0c7113703a8eaf4a57.

We have at least 3 different bug reports that this fixes things and no
indication what is exactly wrong with this. So try again.

To make matters slightly more fun, the commit itself was cc: stable
whereas the revert has not been.

According to Peter Clifton he discussed this with Zhao Yakui and this
seems to be in contradiction of the GM45 PRM, but rumours have it that
this is how the BIOS does it ... let's see.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Tested-by: Peter Clifton <Peter.Clifton@clifton-electronics.com>
Cc: Zhao Yakui <yakui.zhao@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16236
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=25913
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=14792
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Brad Figg <brad.figg@canonical.com>
---
 drivers/gpu/drm/i915/intel_tv.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Tim Gardner - April 2, 2012, 4:11 p.m.
Applied to Precise:

UBUNTU: SAUCE: (drop after 3.5) drm/i915: reinstate GM45 TV detection fix
Seth Forshee - April 2, 2012, 4:22 p.m.
On Mon, Apr 02, 2012 at 08:36:57AM -0700, Brad Figg wrote:
> From: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> BugLink: http://bugs.launchpad.net/bugs/638939
> 
> This reverts commmit d4b74bf07873da2e94219a7b67a334fc1c3ce649 which
> reverted the origin fix fb8b5a39b6310379d7b54c0c7113703a8eaf4a57.
> 
> We have at least 3 different bug reports that this fixes things and no
> indication what is exactly wrong with this. So try again.
> 
> To make matters slightly more fun, the commit itself was cc: stable
> whereas the revert has not been.
> 
> According to Peter Clifton he discussed this with Zhao Yakui and this
> seems to be in contradiction of the GM45 PRM, but rumours have it that
> this is how the BIOS does it ... let's see.
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> Tested-by: Peter Clifton <Peter.Clifton@clifton-electronics.com>
> Cc: Zhao Yakui <yakui.zhao@intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Eric Anholt <eric@anholt.net>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16236
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=25913
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=14792
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Brad Figg <brad.figg@canonical.com>
> ---
>  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 2b1fcad..0436b45 100644
> --- a/drivers/gpu/drm/i915/intel_tv.c
> +++ b/drivers/gpu/drm/i915/intel_tv.c
> @@ -1275,6 +1275,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);
> -- 
> 1.7.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Patch

diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index 2b1fcad..0436b45 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1275,6 +1275,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);