diff --git a/src/i830_lvds.c b/src/i830_lvds.c index 064810f..f30f9bb 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -672,6 +672,7 @@ i830_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, desired_ratio = (float)mode->HDisplay / (float)mode->VDisplay; + xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"native ratio: %f, desired ratio: %f\n", panel_ratio, desired_ratio); /* * Enable automatic panel scaling for non-native modes so that they fill * the screen. Should be enabled before the pipe is enabled, according to @@ -747,6 +748,10 @@ i830_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, if (panel_ratio > desired_ratio) { /* Pillar */ unsigned long scaled_width = (float)mode->HDisplay * vert_scale; + xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"pillarbox scaling\n"); + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"scaled_width: %ld\n", scaled_width); + horiz_ratio = vert_ratio; pfit_control |= VERT_AUTO_SCALE | VERT_INTERP_BILINEAR | HORIZ_INTERP_BILINEAR; @@ -758,13 +763,21 @@ i830_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, if (mode->HDisplay & 1) /* odd resolutions */ right_border++; + xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"left border %d, right border %d\n", left_border, + right_border); + adjusted_mode->CrtcHDisplay = scaled_width; adjusted_mode->CrtcHBlankStart = scaled_width + - right_border - 1; + right_border - 2; adjusted_mode->CrtcHBlankEnd = adjusted_mode->CrtcHTotal - - left_border - 1; + left_border - 2; adjusted_mode->CrtcHSyncStart = adjusted_mode->CrtcHBlankStart; adjusted_mode->CrtcHSyncEnd = adjusted_mode->CrtcHBlankEnd; + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"CRTC timings: %d %d %d %d %d\n", + adjusted_mode->CrtcHDisplay, adjusted_mode->CrtcHBlankStart, + adjusted_mode->CrtcHBlankEnd, adjusted_mode->CrtcHSyncStart, + adjusted_mode->CrtcHSyncEnd); border = 1; } else if (panel_ratio < desired_ratio) { /* Letter */ unsigned long scaled_height = (float)mode->VDisplay *