summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_reg.h
diff options
context:
space:
mode:
authorEric Anholt2012-01-03 18:23:29 +0100
committerKeith Packard2012-01-03 18:31:18 +0100
commitae662d31264979e52581bd2573bf0b82812f52ab (patch)
tree678d7f4483b6fe9a78e1ece0cb8bdefe1582dcf0 /drivers/gpu/drm/i915/i915_reg.h
parentdrm/i915: Make the fallback IRQ wait not sleep. (diff)
downloadkernel-qcow2-linux-ae662d31264979e52581bd2573bf0b82812f52ab.tar.gz
kernel-qcow2-linux-ae662d31264979e52581bd2573bf0b82812f52ab.tar.xz
kernel-qcow2-linux-ae662d31264979e52581bd2573bf0b82812f52ab.zip
drm/i915: Add support for resetting the SO write pointers on gen7.
These registers are automatically incremented by the hardware during transform feedback to track where the next streamed vertex output should go. Unlike the previous generation, which had a packet for setting the corresponding registers to a defined value, gen7 only has MI_LOAD_REGISTER_IMM to do so. That's a secure packet (since it loads an arbitrary register), so we need to do it from the kernel, and it needs to be settable atomically with the batchbuffer execution so that two clients doing transform feedback don't stomp on each others' state. Instead of building a more complicated interface involcing setting the registers to a specific value, just set them to 0 when asked and userland can tweak its pointers accordingly. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index edced95aa75f..c3afb783cb9d 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3736,4 +3736,10 @@
#define CPT_AUD_CNTL_ST_A 0xE50B4
#define CPT_AUD_CNTRL_ST2 0xE50C0
+/* These are the 4 32-bit write offset registers for each stream
+ * output buffer. It determines the offset from the
+ * 3DSTATE_SO_BUFFERs that the next streamed vertex output goes to.
+ */
+#define GEN7_SO_WRITE_OFFSET(n) (0x5280 + (n) * 4)
+
#endif /* _I915_REG_H_ */