[GM965] Why does this patch fix my Intel TVOut issue?

Robert Lowery rglowery at exemail.com.au
Tue May 20 04:09:23 PDT 2008


>
>>
>> diff --git a/src/i830_tv.c b/src/i830_tv.c
>> index 6adb9f2..a5b790b 100644
>> --- a/src/i830_tv.c
>> +++ b/src/i830_tv.c
>> @@ -1286,6 +1286,8 @@ i830_tv_detect_type (xf86CrtcPtr    crtc,
>>         tv_ctl = INREG(TV_CTL);
>>         save_tv_ctl = tv_ctl;
>>         tv_ctl &= ~TV_ENC_ENABLE;
>> +       OUTREG(TV_CTL, tv_ctl);
>> +       i830WaitForVblank(pScrn);
>>         tv_ctl &= ~TV_TEST_MODE_MASK;
>>         tv_ctl |= TV_TEST_MODE_MONITOR_DETECT;
>>         tv_dac &= ~TVDAC_SENSE_MASK;
>> @@ -1298,6 +1300,7 @@ i830_tv_detect_type (xf86CrtcPtr    crtc,
>>                 DAC_B_0_7_V |
>>                 DAC_C_0_7_V);
>>         OUTREG(TV_CTL, tv_ctl);
>> +       i830WaitForVblank(pScrn);
>>         OUTREG(TV_DAC, tv_dac);
>>         i830WaitForVblank(pScrn);
>>         tv_dac = INREG(TV_DAC);
>>
>
>
> Okey, i found a solution that works for me. When the function restores ctl
> state after having probed (right after the OUTREG(TV_DAC,save_tv_ctl)), it
> must do a wait vblank. I didn't need the other waits that Robert added.
> Intel
> manuals mention nothing about needed a vblank wait when turing of encoder,
> but
> it does mention it when turning it on.

That's very weird, I was sure I tried that scenario.  Trying again, the
following much simpler (and consistent) patch also works for me.  I'll
update https://bugs.freedesktop.org/show_bug.cgi?id=14000 and ask affected
people to retest

-Rob

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 6adb9f2..b3e03ec 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1303,6 +1303,7 @@ i830_tv_detect_type (xf86CrtcPtr    crtc,
        tv_dac = INREG(TV_DAC);
        OUTREG(TV_DAC, save_tv_dac);
        OUTREG(TV_CTL, save_tv_ctl);
+       i830WaitForVblank(pScrn);
     }
     /*
      *  A B C






More information about the xorg mailing list