From 94a3731c2b4f2ea2e696a8c87dccc0d214d41e8e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 6 Nov 2006 18:26:48 -0800 Subject: [PATCH] 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. --- src/i830_display.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/i830_display.c b/src/i830_display.c index e36b5efc..672bc533 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -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);