--- src/i830_lvds.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) Index: xf86_video_intel/src/i830_lvds.c =================================================================== --- xf86_video_intel.orig/src/i830_lvds.c 2009-06-09 17:31:27.000000000 +0800 +++ xf86_video_intel/src/i830_lvds.c 2009-06-10 14:23:02.000000000 +0800 @@ -703,14 +703,23 @@ adjusted_mode->CrtcHBlankStart = mode->HDisplay + right_border - 1; adjusted_mode->CrtcHBlankEnd = adjusted_mode->CrtcHTotal - left_border - 1; - adjusted_mode->CrtcHSyncStart = adjusted_mode->CrtcHBlankStart; - adjusted_mode->CrtcHSyncEnd = adjusted_mode->CrtcHBlankEnd; + adjusted_mode->CrtcHBlankEnd += 1; + adjusted_mode->CrtcHBlankEnd &= ~(0x02); + adjusted_mode->CrtcHBlankStart &= ~(0x02); + /* make the hblank start/end be a multiple of two */ + /* Don't touch the HSync/Vsync */ + //adjusted_mode->CrtcHSyncStart = adjusted_mode->CrtcHBlankStart; + //adjusted_mode->CrtcHSyncEnd = adjusted_mode->CrtcHBlankEnd; adjusted_mode->CrtcVDisplay = mode->VDisplay; adjusted_mode->CrtcVBlankStart = mode->VDisplay + bottom_border - 1; adjusted_mode->CrtcVBlankEnd = adjusted_mode->CrtcVTotal - top_border - 1; - adjusted_mode->CrtcVSyncStart = adjusted_mode->CrtcVBlankStart; - adjusted_mode->CrtcVSyncEnd = adjusted_mode->CrtcVBlankEnd; + adjusted_mode->CrtcVBlankEnd += 1; + adjusted_mode->CrtcVBlankEnd &= ~(0x02); + adjusted_mode->CrtcVBlankStart &= ~(0x02); + /* make the vblank start/end be a multiple of two */ + //adjusted_mode->CrtcVSyncStart = adjusted_mode->CrtcVBlankStart; + //adjusted_mode->CrtcVSyncEnd = adjusted_mode->CrtcVBlankEnd; border = 1; break; case FULL_ASPECT: @@ -763,8 +772,13 @@ right_border - 1; adjusted_mode->CrtcHBlankEnd = adjusted_mode->CrtcHTotal - left_border - 1; - adjusted_mode->CrtcHSyncStart = adjusted_mode->CrtcHBlankStart; - adjusted_mode->CrtcHSyncEnd = adjusted_mode->CrtcHBlankEnd; + adjusted_mode->CrtcHBlankEnd = (adjusted_mode->CrtcHBlankEnd + 1) + & ~(0x02); + adjusted_mode->CrtcHBlankStart &= ~(0x02); + /* make the hblank start/end be a multiple of two */ + /* don't change the Hsync */ + //adjusted_mode->CrtcHSyncStart = adjusted_mode->CrtcHBlankStart; + //adjusted_mode->CrtcHSyncEnd = adjusted_mode->CrtcHBlankEnd; border = 1; } else if (panel_ratio < desired_ratio) { /* Letter */ unsigned long scaled_height = (float)mode->VDisplay * @@ -786,8 +800,13 @@ bottom_border - 1; adjusted_mode->CrtcVBlankEnd = adjusted_mode->CrtcVTotal - top_border - 1; - adjusted_mode->CrtcVSyncStart = adjusted_mode->CrtcVBlankStart; - adjusted_mode->CrtcVSyncEnd = adjusted_mode->CrtcVBlankEnd; + adjusted_mode->CrtcVBlankEnd = (adjusted_mode->CrtcVBlankEnd + 1) & + ~(0x02); + adjusted_mode->CrtcVBlankStart &= ~(0x02); + /* make the vblank start/end be a multiple of two */ + /* don't change the Vsync */ + //adjusted_mode->CrtcVSyncStart = adjusted_mode->CrtcVBlankStart; + //adjusted_mode->CrtcVSyncEnd = adjusted_mode->CrtcVBlankEnd; border = 1; } else { /* Aspects match, let hw scale both directions */ pfit_control |= VERT_AUTO_SCALE | HORIZ_AUTO_SCALE |