diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-05-11 15:13:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-05-11 16:50:04 +0100 |
commit | 9bad40a27dac1f88012a1e2db0bfc5ae58fa0370 (patch) | |
tree | 85efc748a41c4c4d25d36d18e296d9ca944342af /drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c | |
parent | b0a997ae5248b293b6f6d1996ea49c57f7b94227 (diff) |
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
Diffstat (limited to 'drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c')
-rw-r--r-- | drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c index 8b3925b4036f..e21b5023ca7d 100644 --- a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c +++ b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c @@ -84,6 +84,7 @@ igt_emit_store_dw(struct i915_vma *vma, } *cmd = MI_BATCH_BUFFER_END; + i915_gem_object_flush_map(obj); i915_gem_object_unpin_map(obj); intel_gt_chipset_flush(vma->vm->gt); |