]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Add support for resetting the SO write pointers on gen7.
authorEric Anholt <eric@anholt.net>
Tue, 3 Jan 2012 17:23:29 +0000 (09:23 -0800)
committerKeith Packard <keithp@keithp.com>
Tue, 3 Jan 2012 17:31:18 +0000 (09:31 -0800)
commitf0970f9ff50a11965c729a39008a1828b3c67aeb
tree678d7f4483b6fe9a78e1ece0cb8bdefe1582dcf0
parent0c919976dcc4adf6635cd8fcd4c06f2dcf6d7551
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>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_reg.h
include/drm/i915_drm.h