]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: reinstate GM45 TV detection fix
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 25 Mar 2012 20:56:14 +0000 (22:56 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Mar 2012 11:12:28 +0000 (13:12 +0200)
This reverts commmit f2b3e32dc55e9dedd3c21124c250fbe1d692fafe which
reverted the origin fix c27e216df73f709fa634c534b4010bb4e5b770bb.

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>
drivers/gpu/drm/i915/intel_tv.c

index 05f765ef546450efcc56844ff29e589c4c23d028..ca12c709f3eb450787aa58fe63ee4efb7e32a96c 100644 (file)
@@ -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);