aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r300.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-08-20 23:21:01 -0400
committerDave Airlie <airlied@redhat.com>2009-08-21 00:20:38 -0400
commit50f153036c9d9e4ae1768d5ca9c2ad4184f7a0b7 (patch)
treef9e4946bd45ead837fa298713c77ac51374dd8e3 /drivers/gpu/drm/radeon/r300.c
parent759e4f83f418f4001e724042b4c0e408d615d9ec (diff)
drm/radeon/kms: generate the safe register tables.
Previously we just made these offline and included them, but no reason we can't generate them at build time. TODO: add rs690 + r100/r200 when done. should we do rs480/rs690 no tcl version? Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r--drivers/gpu/drm/radeon/r300.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index c47579dcafa1..482d6b296b74 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -33,6 +33,8 @@
33#include "radeon_drm.h" 33#include "radeon_drm.h"
34#include "radeon_share.h" 34#include "radeon_share.h"
35 35
36#include "r300_reg_safe.h"
37
36/* r300,r350,rv350,rv370,rv380 depends on : */ 38/* r300,r350,rv350,rv370,rv380 depends on : */
37void r100_hdp_reset(struct radeon_device *rdev); 39void r100_hdp_reset(struct radeon_device *rdev);
38int r100_cp_reset(struct radeon_device *rdev); 40int r100_cp_reset(struct radeon_device *rdev);
@@ -953,49 +955,6 @@ static inline void r300_cs_track_clear(struct r300_cs_track *track)
953 } 955 }
954} 956}
955 957
956static const unsigned r300_reg_safe_bm[159] = {
957 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
958 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
959 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFF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F, 0xFFFFFFFF, 0xFFFFFFFF,
981 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
982 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
983 0xFFFFF7FF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
984 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
985 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
986 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
987 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
988 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
989 0xFFFFFC78, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFF,
990 0x38FF8F50, 0xFFF88082, 0xF000000C, 0xFAE009FF,
991 0x0000FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000,
992 0x00000000, 0x0000C100, 0x00000000, 0x00000000,
993 0x00000000, 0x00000000, 0x00000000, 0x00000000,
994 0x00000000, 0xFFFF0000, 0xFFFFFFFF, 0xFF80FFFF,
995 0x00000000, 0x00000000, 0x00000000, 0x00000000,
996 0x0003FC01, 0xFFFFFFF8, 0xFE800B19,
997};
998
999static int r300_packet0_check(struct radeon_cs_parser *p, 958static int r300_packet0_check(struct radeon_cs_parser *p,
1000 struct radeon_cs_packet *pkt, 959 struct radeon_cs_packet *pkt,
1001 unsigned idx, unsigned reg) 960 unsigned idx, unsigned reg)