diff --git a/src/i830_display.c b/src/i830_display.c index b3019f80..4716e865 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -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); diff --git a/src/i830_driver.c b/src/i830_driver.c index 779037b0..4fb8ac26 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -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; diff --git a/src/i830_lvds.c b/src/i830_lvds.c index 7b9fe634..ea45420f 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -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)