Disable the panel fitter when not using it. Cleans up SDVO DVI output.
The panel fitter appears to exist on the 965 hardware (at least) and causes troubles with DVI output over SDVO when enabled. This patch checks to see if the panel fitter is pointing at the pipe being configured and disables it unconditionally in that case. The LVDS driver will configure it correctly if necessary afterwards.
This commit is contained in:
parent
f22d9bcc25
commit
56f6d4f1bb
|
|
@ -607,6 +607,16 @@ i830PipeSetMode(ScrnInfoPtr pScrn, DisplayModePtr pMode, int pipe)
|
|||
pI830->output[i].post_set_mode(pScrn, &pI830->output[i], pMode);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the panel fitter is stuck on our pipe, turn it off
|
||||
* the LVDS output will whack it correctly if it needs it
|
||||
*/
|
||||
if (((INREG(PFIT_CONTROL) >> 29) & 0x3) == pipe)
|
||||
OUTREG(PFIT_CONTROL, 0);
|
||||
|
||||
OUTREG(PFIT_PGM_RATIOS, 0x10001000);
|
||||
OUTREG(DSPARB, (47 << 0) | (95 << 7));
|
||||
|
||||
OUTREG(htot_reg, htot);
|
||||
OUTREG(hblank_reg, hblank);
|
||||
OUTREG(hsync_reg, hsync);
|
||||
|
|
|
|||
|
|
@ -2308,6 +2308,8 @@ SaveHWState(ScrnInfoPtr pScrn)
|
|||
pI830->saveSWF[15] = INREG(SWF31);
|
||||
pI830->saveSWF[16] = INREG(SWF32);
|
||||
|
||||
pI830->savePFIT_CONTROL = INREG(PFIT_CONTROL);
|
||||
|
||||
for (i = 0; i < pI830->num_outputs; i++) {
|
||||
if (pI830->output[i].save != NULL)
|
||||
pI830->output[i].save(pScrn, &pI830->output[i]);
|
||||
|
|
@ -2426,6 +2428,8 @@ RestoreHWState(ScrnInfoPtr pScrn)
|
|||
OUTREG(SWF31, pI830->saveSWF[15]);
|
||||
OUTREG(SWF32, pI830->saveSWF[16]);
|
||||
|
||||
OUTREG(PFIT_CONTROL, pI830->savePFIT_CONTROL);
|
||||
|
||||
i830CompareRegsToSnapshot(pScrn);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ i830_lvds_save(ScrnInfoPtr pScrn, I830OutputPtr output)
|
|||
{
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
|
||||
pI830->savePFIT_CONTROL = INREG(PFIT_CONTROL);
|
||||
pI830->savePP_ON = INREG(LVDSPP_ON);
|
||||
pI830->savePP_OFF = INREG(LVDSPP_OFF);
|
||||
pI830->saveLVDS = INREG(LVDS);
|
||||
|
|
@ -115,7 +114,6 @@ i830_lvds_restore(ScrnInfoPtr pScrn, I830OutputPtr output)
|
|||
OUTREG(LVDSPP_ON, pI830->savePP_ON);
|
||||
OUTREG(LVDSPP_OFF, pI830->savePP_OFF);
|
||||
OUTREG(PP_CYCLE, pI830->savePP_CYCLE);
|
||||
OUTREG(PFIT_CONTROL, pI830->savePFIT_CONTROL);
|
||||
OUTREG(LVDS, pI830->saveLVDS);
|
||||
OUTREG(PP_CONTROL, pI830->savePP_CONTROL);
|
||||
if (pI830->savePP_CONTROL & POWER_TARGET_ON)
|
||||
|
|
|
|||
Loading…
Reference in New Issue