diff options
-rw-r--r-- | src/radeon_display.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/radeon_display.c b/src/radeon_display.c index d501cdc4..acb4d301 100644 --- a/src/radeon_display.c +++ b/src/radeon_display.c @@ -684,12 +684,14 @@ static void RADEONGetPanelInfoFromReg (ScrnInfoPtr pScrn) info->PanelPwrDly = 200; if (fp_vert_stretch & RADEON_VERT_STRETCH_ENABLE) { - info->PanelYRes = (fp_vert_stretch>>12) + 1; + info->PanelYRes = ((fp_vert_stretch & RADEON_VERT_PANEL_SIZE) >> + RADEON_VERT_PANEL_SHIFT) + 1; } else { info->PanelYRes = (INREG(RADEON_CRTC_V_TOTAL_DISP)>>16) + 1; } if (fp_horz_stretch & RADEON_HORZ_STRETCH_ENABLE) { - info->PanelXRes = ((fp_horz_stretch>>16) + 1) * 8; + info->PanelXRes = (((fp_horz_stretch & RADEON_HORZ_PANEL_SIZE) >> + RADEON_HORZ_PANEL_SHIFT) + 1) * 8; } else { info->PanelXRes = ((INREG(RADEON_CRTC_H_TOTAL_DISP)>>16) + 1) * 8; } |