xf86-video-ati: Branch 'ati-6.7-branch'

Michel Daenzer daenzer at kemper.freedesktop.org
Fri Aug 24 00:52:49 PDT 2007


 src/radeon_driver.c |   22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

New commits:
diff-tree 84a37d0ed01a2eee80ee30b79ddfd7906decaff1 (from d0f900c857585804fedd501bcf0a603fead271ce)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Fri Aug 24 09:39:58 2007 +0200

    Revert "radeon: Round down RMX stretch ratios."
    
    This reverts commit 6b736a5c25d968bb09e229e0fbb82162e8447783.
    
    See https://bugs.freedesktop.org/show_bug.cgi?id=8983#c6 and
    https://bugzilla.novell.com/show_bug.cgi?id=220724 .

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 418b39d..2288126 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -5796,23 +5796,21 @@ static void RADEONInitRMXRegisters(ScrnI
     if (Hratio == 1.0 || !(mode->Flags & RADEON_USE_RMX)) {
 	save->fp_horz_stretch |= ((xres/8-1)<<16);
     } else {
-	save->fp_horz_stretch |= ((((unsigned long)
-				    (Hratio * RADEON_HORZ_STRETCH_RATIO_MAX)) &
-				   RADEON_HORZ_STRETCH_RATIO_MASK) |
-				  RADEON_HORZ_STRETCH_BLEND |
-				  RADEON_HORZ_STRETCH_ENABLE |
-				  ((info->PanelXRes/8-1)<<16));
+	save->fp_horz_stretch |= ((((unsigned long)(Hratio * RADEON_HORZ_STRETCH_RATIO_MAX +
+				     0.5)) & RADEON_HORZ_STRETCH_RATIO_MASK) |
+				    RADEON_HORZ_STRETCH_BLEND |
+				    RADEON_HORZ_STRETCH_ENABLE |
+				    ((info->PanelXRes/8-1)<<16));
     }
 
     if (Vratio == 1.0 || !(mode->Flags & RADEON_USE_RMX)) {
 	save->fp_vert_stretch |= ((yres-1)<<12);
     } else {
-	save->fp_vert_stretch |= ((((unsigned long)
-				    (Vratio * RADEON_VERT_STRETCH_RATIO_MAX)) &
-				   RADEON_VERT_STRETCH_RATIO_MASK) |
-				  RADEON_VERT_STRETCH_ENABLE |
-				  RADEON_VERT_STRETCH_BLEND |
-				  ((info->PanelYRes-1)<<12));
+	save->fp_vert_stretch |= ((((unsigned long)(Vratio * RADEON_VERT_STRETCH_RATIO_MAX +
+						0.5)) & RADEON_VERT_STRETCH_RATIO_MASK) |
+				      RADEON_VERT_STRETCH_ENABLE |
+				      RADEON_VERT_STRETCH_BLEND |
+				      ((info->PanelYRes-1)<<12));
     }
 
 }


More information about the xorg-commit mailing list