From 3d9ee8b2991ec0da8cc21b8455ff7f00fd0335b5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 2 Jul 2007 14:38:28 -0700 Subject: [PATCH] Bug #11365: Disable the panel fitter unless it's needed for the chosen mode. The automatic panel scaling appears to choose bad sampling on some GM965 hardware for 1:1 mapping modes, and there's no real sense in having it on if we just want 1:1. --- src/i830_lvds.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/i830_lvds.c b/src/i830_lvds.c index d4698151..e2c6e3ce 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -261,17 +261,23 @@ i830_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode, I830CrtcPrivatePtr intel_crtc = output->crtc->driver_private; CARD32 pfit_control; - /* The LVDS pin pair will already have been turned on in the + /* The LVDS pin pair will already have been turned on in * i830_crtc_mode_set since it has a large impact on the DPLL settings. */ - /* Enable automatic panel scaling so that non-native modes fill the - * screen. Should be enabled before the pipe is enabled, according to + /* Enable automatic panel scaling for non-native modes so that they fill + * the screen. Should be enabled before the pipe is enabled, according to * register description and PRM. */ - pfit_control = (PFIT_ENABLE | - VERT_AUTO_SCALE | HORIZ_AUTO_SCALE | - VERT_INTERP_BILINEAR | HORIZ_INTERP_BILINEAR); + if (mode->HDisplay != adjusted_mode->HDisplay || + mode->VDisplay != adjusted_mode->VDisplay) + { + pfit_control = PFIT_ENABLE | + VERT_AUTO_SCALE | HORIZ_AUTO_SCALE | + VERT_INTERP_BILINEAR | HORIZ_INTERP_BILINEAR; + } else { + pfit_control = 0; + } if (!IS_I965G(pI830)) { if (dev_priv->panel_wants_dither)