Commit befb73c2 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

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: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 995e37ca
...@@ -89,6 +89,20 @@ u32 radeon_get_scratch(drm_radeon_private_t *dev_priv, int index) ...@@ -89,6 +89,20 @@ u32 radeon_get_scratch(drm_radeon_private_t *dev_priv, int index)
return RADEON_READ(RADEON_SCRATCH_REG0 + 4*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) static u32 R500_READ_MCIND(drm_radeon_private_t *dev_priv, int addr)
{ {
u32 ret; u32 ret;
......
This diff is collapsed.
...@@ -304,6 +304,8 @@ typedef union { ...@@ -304,6 +304,8 @@ typedef union {
#define RADEON_SCRATCH_REG_OFFSET 32 #define RADEON_SCRATCH_REG_OFFSET 32
#define R600_SCRATCH_REG_OFFSET 256
#define RADEON_NR_SAREA_CLIPRECTS 12 #define RADEON_NR_SAREA_CLIPRECTS 12
/* There are 2 heaps (local/GART). Each region within a heap is a /* There are 2 heaps (local/GART). Each region within a heap is a
...@@ -526,7 +528,8 @@ typedef struct drm_radeon_init { ...@@ -526,7 +528,8 @@ typedef struct drm_radeon_init {
RADEON_INIT_CP = 0x01, RADEON_INIT_CP = 0x01,
RADEON_CLEANUP_CP = 0x02, RADEON_CLEANUP_CP = 0x02,
RADEON_INIT_R200_CP = 0x03, RADEON_INIT_R200_CP = 0x03,
RADEON_INIT_R300_CP = 0x04 RADEON_INIT_R300_CP = 0x04,
RADEON_INIT_R600_CP = 0x05
} func; } func;
unsigned long sarea_priv_offset; unsigned long sarea_priv_offset;
int is_pci; int is_pci;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment