]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Always flush before unpining after writing
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 May 2020 14:13:03 +0000 (15:13 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 May 2020 15:50:04 +0000 (16:50 +0100)
commit6c675551138be4a6d221bc6cfd7875065a18fc8a
tree85efc748a41c4c4d25d36d18e296d9ca944342af
parentff259b1a02842eac24247c959c59eebfa53dd978
drm/i915/selftests: Always flush before unpining after writing

Be consistent, and even when we know we had used a WC, flush the mapped
object after writing into it. The flush understands the mapping type and
will only clflush if !I915_MAP_WC, but will always insert a wmb [sfence]
so that we can be sure that all writes are visible.

v2: Add the unconditional wmb so we are know that we always flush the
writes to memory/HW at that point.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200511141304.599-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
drivers/gpu/drm/i915/gem/i915_gem_pages.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_coherency.c
drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c
drivers/gpu/drm/i915/gt/selftest_ring_submission.c
drivers/gpu/drm/i915/gt/selftest_rps.c
drivers/gpu/drm/i915/selftests/i915_request.c