]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Allow concurrent read access between CPU and GPU domain
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Apr 2012 10:52:50 +0000 (11:52 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 12 Apr 2012 19:14:10 +0000 (21:14 +0200)
commit95ba2820023d4c5601993321005a278c3379236f
tree405f14482ee9b64ac8f0a95e90ae4a87b06b7e3a
parent33fd8a0cfcbde336a7f49f428922b12485112ca8
drm/i915: Allow concurrent read access between CPU and GPU domain

Similar to allowing a buffer to be simultaneously read by the GPU and
through the GTT, we wish to allow readback of the pages through the CPU
domain whilst they are also being read by the GPU. Domain coherency
is managed by allowing multiple readers, but only a single writer.

This is used by mesa for its program cache which it may search for every
new program every frame and then renews should it need to add. During
renewal, mesa copies the program bo currently executing through a CPU
mapping onto the new bo. This patch allows the search and that copy to
proceed without causing a stall on the current batch.

Testcase: i-g-t/tests/gem_cpu_concurrent_blit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c