diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-06-11 09:39:38 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-06-11 09:39:38 +0200 |
commit | c6a3286d6f6ddda89115d98d45665dadd78bf41d (patch) | |
tree | edc0ad74f13fa0cc80c55b0a175e7cb208f3f29e | |
parent | 7a6b3c0f77c69019268f585c51c3dcbcc99014d4 (diff) |
radeon: Fix panel size detection from registers with stretched mode programmed.
-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; } |