diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-02-24 20:02:13 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-13 05:24:10 +0100 |
commit | befb73c2322923766df7e36b51f407dbdc047eab (patch) | |
tree | de14b3d98afba01aab45b4cfa531b14c34905f82 /drivers/gpu/drm/radeon/radeon_cp.c | |
parent | i915/drm: Remove two redundant agp_chipset_flushes (diff) | |
download | linux-befb73c2322923766df7e36b51f407dbdc047eab.tar.xz linux-befb73c2322923766df7e36b51f407dbdc047eab.zip |
drm/radeon: prep for r6xx/r7xx support
- add r6xx/r7xx regs and macros
- add r6xx/r7xx chip families
- fix register access for regs with offsets >= 0x10000
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cp.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 8338353e505b..e42b6a2a7e8e 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -89,6 +89,20 @@ u32 radeon_get_scratch(drm_radeon_private_t *dev_priv, int index) return RADEON_READ(RADEON_SCRATCH_REG0 + 4*index); } +u32 RADEON_READ_MM(drm_radeon_private_t *dev_priv, int addr) +{ + u32 ret; + + if (addr < 0x10000) + ret = DRM_READ32(dev_priv->mmio, addr); + else { + DRM_WRITE32(dev_priv->mmio, RADEON_MM_INDEX, addr); + ret = DRM_READ32(dev_priv->mmio, RADEON_MM_DATA); + } + + return ret; +} + static u32 R500_READ_MCIND(drm_radeon_private_t *dev_priv, int addr) { u32 ret; |