summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_cp.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-02-24 14:02:13 -0500
committerDave Airlie <airlied@redhat.com>2009-03-13 14:24:10 +1000
commitbefb73c2322923766df7e36b51f407dbdc047eab (patch)
treede14b3d98afba01aab45b4cfa531b14c34905f82 /drivers/gpu/drm/radeon/radeon_cp.c
parent995e37cafb90f104395e015a9836cc459df1fc39 (diff)
downloadlinux-befb73c2322923766df7e36b51f407dbdc047eab.tar.gz
linux-befb73c2322923766df7e36b51f407dbdc047eab.tar.bz2
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.c14
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;