Move PFIT_CONTROL disable for G965 up before post_set_mode.

Also, remove setting of some other random registers that appears to have
been spammed in at the same time, and don't try to disable on the I830, before
this register existed.
This commit is contained in:
Eric Anholt 2006-11-06 18:26:48 -08:00
parent 27df2ff790
commit 94a3731c2b
1 changed files with 9 additions and 10 deletions

View File

@ -609,21 +609,20 @@ i830PipeSetMode(ScrnInfoPtr pScrn, DisplayModePtr pMode, int pipe,
OUTREG(fp_reg, fp);
OUTREG(dpll_reg, dpll);
/*
* If the panel fitter is stuck on our pipe, turn it off.
* The LVDS output will set it as necessary in post_set_mode.
*/
if (!IS_I830(pI830)) {
if (((INREG(PFIT_CONTROL) >> 29) & 0x3) == pipe)
OUTREG(PFIT_CONTROL, 0);
}
for (i = 0; i < pI830->num_outputs; i++) {
if (pI830->output[i].pipe == 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);