diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-06-12 23:35:09 -0400 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-06-12 23:35:09 -0400 |
commit | 9fc416ce08cc5d74faa7b184e80ce43ed2f4fbee (patch) | |
tree | 9995f8d927a3b07adfe9cd6a0605935201dd3ba0 | |
parent | c4045cbc5e6975520efef422ce9df2a7d99a7ff4 (diff) |
radeon: Fix panel size detection from registers with stretched mode programmed.
-rw-r--r-- | src/radeon_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index 25d6c667..5c4a1661 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -1344,12 +1344,14 @@ RADEONGetPanelInfoFromReg (xf86OutputPtr output) radeon_output->PanelPwrDly = 200; if (fp_vert_stretch & RADEON_VERT_STRETCH_ENABLE) { - radeon_output->PanelYRes = (fp_vert_stretch>>12) + 1; + radeon_output->PanelYRes = ((fp_vert_stretch & RADEON_VERT_PANEL_SIZE) >> + RADEON_VERT_PANEL_SHIFT) + 1; } else { radeon_output->PanelYRes = (INREG(RADEON_CRTC_V_TOTAL_DISP)>>16) + 1; } if (fp_horz_stretch & RADEON_HORZ_STRETCH_ENABLE) { - radeon_output->PanelXRes = ((fp_horz_stretch>>16) + 1) * 8; + radeon_output->PanelXRes = (((fp_horz_stretch & RADEON_HORZ_PANEL_SIZE) >> + RADEON_HORZ_PANEL_SHIFT) + 1) * 8; } else { radeon_output->PanelXRes = ((INREG(RADEON_CRTC_H_TOTAL_DISP)>>16) + 1) * 8; } |