]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Jul 2018 07:53:51 +0000 (08:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Jul 2018 09:33:21 +0000 (10:33 +0100)
commit65a1fedb945f0caf1be12137b2d44cb006440141
treef574a8f0ba4d40499a946ecd27599b6a26cea552
parent839d32a47f5e7ee23f08c6727db35cf50140191e
drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range

We occasionally see that the clflush prior to a read of GPU data is
returning stale data, reminiscent of much earlier bugs fixed by adding a
second clflush for serialisation. As drm_clflush_virt_range() already
supplies the workaround, use it rather than open code the clflush
instruction.

References: 04cdc366bae1 ("drm: Restore double clflush on the last partial cacheline")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180730075351.15569-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_gem_coherency.c