All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: reinstate GM45 TV detection fix
@ 2012-03-25 20:56 Daniel Vetter
  2012-03-26 18:57 ` Rodrigo Vivi
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2012-03-25 20:56 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Dave Airlie

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.

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>
---
 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 05f765e..ca12c70 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1153,6 +1153,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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: reinstate GM45 TV detection fix
  2012-03-25 20:56 [PATCH] drm/i915: reinstate GM45 TV detection fix Daniel Vetter
@ 2012-03-26 18:57 ` Rodrigo Vivi
  2012-03-27 11:03   ` Peter Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Vivi @ 2012-03-26 18:57 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Dave Airlie, Intel Graphics Development

The GM45 with tv-out is so rare machine that I never found one to test
if this really cause regression and complete disable tv-out on gm45 so
I'm in favor of apply this and when we find some one with gm45
complaining about the tv-out not working we will be able to
test/revert and find another fix for it. Meanwhile:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

On Sun, Mar 25, 2012 at 5:56 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> 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.
>
> 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>
> ---
>  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 05f765e..ca12c70 100644
> --- a/drivers/gpu/drm/i915/intel_tv.c
> +++ b/drivers/gpu/drm/i915/intel_tv.c
> @@ -1153,6 +1153,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
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
GPG: 0x905BE242 @ wwwkeys.pgp.net

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: reinstate GM45 TV detection fix
  2012-03-26 18:57 ` Rodrigo Vivi
@ 2012-03-27 11:03   ` Peter Clifton
  2012-03-27 11:14     ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Clifton @ 2012-03-27 11:03 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: Daniel Vetter, Intel Graphics Development, Dave Airlie

On Mon, 2012-03-26 at 15:57 -0300, Rodrigo Vivi wrote:
> The GM45 with tv-out is so rare machine that I never found one to test
> if this really cause regression and complete disable tv-out on gm45 so
> I'm in favor of apply this and when we find some one with gm45
> complaining about the tv-out not working we will be able to
> test/revert and find another fix for it. Meanwhile:
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

Tested-by: Peter Clifton <Peter.Clifton@clifton-electronics.com>

I've been carrying that patch around in my own builds for my GM45 for
what feels like forever now (since before it was reverted... I helped
identify the requirement, by trial and error in the first place!).


For further details, you might like to contact the guy at Intel who
wrote the commit: ykzhao <yakui.zhao@intel.com>


>From some correspondence we had...

(Zhau)

> > > Yes. This is not consistent with the description on PRM. 
> > > But this is required on Cantiga platform to make the TV detection
> > > reliable.
> > 
> > Thanks Zhau,

(Me)

> > Hopefully we'll be able to get the patch re-committed to the
> kernel. 
> > 
> > Since the main issue with the patch was comments as to why this is a
> > good thing to do on GM45, would you be willing to create a new patch
> > with some code-comments (and commit message) explaining the source
> of
> > the correction?
> > 
> > (Are there any comments from the BIOS code as to why these registers
> > need to be programmed in a particular way?)

(Zhau)

> Sorry that there is no comment in BIOS code. BIOS team only tells me
> to follow the BIOS code but there is no explanation about the reason.


(Me)

> > If you like, I could take your original patch and try to add some
> > comments along the lines of what you just explained, then re-send it
> > to intel-gfx for review.

Oops... I never got around to this.

I'd love to see it fixed though, but am too busy to chase it myself now.

Kind regards,

-- 
Peter Clifton <peter.clifton@clifton-electronics.co.uk>

Clifton Electronics

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: reinstate GM45 TV detection fix
  2012-03-27 11:03   ` Peter Clifton
@ 2012-03-27 11:14     ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2012-03-27 11:14 UTC (permalink / raw)
  To: Peter Clifton; +Cc: Intel Graphics Development, Dave Airlie, Daniel Vetter

On Tue, Mar 27, 2012 at 12:03:29PM +0100, Peter Clifton wrote:
> On Mon, 2012-03-26 at 15:57 -0300, Rodrigo Vivi wrote:
> > The GM45 with tv-out is so rare machine that I never found one to test
> > if this really cause regression and complete disable tv-out on gm45 so
> > I'm in favor of apply this and when we find some one with gm45
> > complaining about the tv-out not working we will be able to
> > test/revert and find another fix for it. Meanwhile:
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> 
> Tested-by: Peter Clifton <Peter.Clifton@clifton-electronics.com>

Ok, I've applied this. Let's see whether it blows up. Given the unclear
situation though, I've queued it up for -next, i.e. it should land in 3.5.

Thanks, Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-27 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-25 20:56 [PATCH] drm/i915: reinstate GM45 TV detection fix Daniel Vetter
2012-03-26 18:57 ` Rodrigo Vivi
2012-03-27 11:03   ` Peter Clifton
2012-03-27 11:14     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.