summaryrefslogtreecommitdiff
path: root/src/radeon_reg.h
diff options
context:
space:
mode:
authorEgbert Eich <eich@freedesktop.org>2008-05-20 11:16:15 +0200
committerEgbert Eich <eich@freedesktop.org>2008-05-20 19:52:50 +0200
commit19e97f74e39fc2b35727708ac429de33d0b70162 (patch)
treeffd0bd26042917622e60fafc84590ced07df3a6e /src/radeon_reg.h
parenta4f3d0088ba763ed8eab1d331959b5ecde8262e8 (diff)
Change RMX code to follow the programming algorithm suggested by ATI.
ATI provides the following algorithm to calculate the RMX scaling ratios in its programming specs: when RMX_AUTO_RATIO_HORZ_INC set to 1,Horizontal auto ratio result trucated, and then incremented by 1. Horz_Ratio = ( ((Active display width in characters (including overscan) + 1) / (Panel width in characters)) x 4096 + 1 ) else Horz_Ratio = ( ((Active display width in characters (including overscan)) / (Panel width in characters)) x 4096 + 1 ) when RMX_AUTO_RATIO_VERT_INC set to 1, Vertical auto ratio result trucated, and then incremented by 1. Vert_Ration = ( ((Active display width in characters (including overscan) + 1) / (Panel width in characters)) x 4096 + 1) else Vert_Ration = ( ((Active display width in characters (including overscan)) / (Panel width in characters)) x 4096 + 1) This patch implements this behavor. Additionally it avoids the use of floats.
Diffstat (limited to 'src/radeon_reg.h')
-rw-r--r--src/radeon_reg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_reg.h b/src/radeon_reg.h
index 9988ec6b..c5ab0def 100644
--- a/src/radeon_reg.h
+++ b/src/radeon_reg.h
@@ -886,7 +886,8 @@
# define RADEON_VERT_STRETCH_LINEREP (0 << 26)
# define RADEON_VERT_STRETCH_BLEND (1 << 26)
# define RADEON_VERT_AUTO_RATIO_EN (1 << 27)
-# define RADEON_VERT_STRETCH_RESERVED 0xf1000000
+# define RADEON_VERT_AUTO_RATIO_INC (1 << 31)
+# define RADEON_VERT_STRETCH_RESERVED 0x71000000
#define RS400_FP_2ND_GEN_CNTL 0x0384
# define RS400_FP_2ND_ON (1 << 0)
# define RS400_FP_2ND_BLANK_EN (1 << 1)