summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_reg.h
diff options
context:
space:
mode:
authorDaniel Vetter2010-08-02 16:24:01 +0200
committerChris Wilson2010-09-21 12:20:01 +0200
commit333e9fe94d00ce8c334d91099449b9948bf76b92 (patch)
treec60f9ec1ba5efc88bae754315b1c8ecc2c262b13 /drivers/gpu/drm/i915/i915_reg.h
parentdrm/i915: kill duplicated/unneeded register defines (diff)
downloadkernel-qcow2-linux-333e9fe94d00ce8c334d91099449b9948bf76b92.tar.gz
kernel-qcow2-linux-333e9fe94d00ce8c334d91099449b9948bf76b92.tar.xz
kernel-qcow2-linux-333e9fe94d00ce8c334d91099449b9948bf76b92.zip
drm/i915: add relative ring register macros
Documentation explicitly mentions that the ring registers are designed to have the same offsets relative to a base registers. Use this to fight the code beaurocratic in intel_ringbuffer.c. No code changes in this patch, just the new definitions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 8b8ac60cc839..77c9191f3fd6 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -288,6 +288,14 @@
#define PRB0_HEAD 0x02034
#define PRB0_START 0x02038
#define PRB0_CTL 0x0203c
+#define RENDER_RING_BASE 0x02000
+#define BSD_RING_BASE 0x04000
+#define GEN6_BSD_RING_BASE 0x12000
+#define RING_TAIL(base) (base)+0x30
+#define RING_HEAD(base) (base)+0x34
+#define RING_START(base) (base)+0x38
+#define RING_CTL(base) (base)+0x3c
+#define RING_HWS_PGA(base) (base)+0x80
#define TAIL_ADDR 0x001FFFF8
#define HEAD_WRAP_COUNT 0xFFE00000
#define HEAD_WRAP_ONE 0x00200000