diff options
author | Chris Wilson <[email protected]> | 2023-03-16 17:59:18 +0100 |
---|---|---|
committer | Jani Nikula <[email protected]> | 2023-03-27 13:22:14 +0300 |
commit | d032ca43f2c80049ce5aabd3f208dc3849359497 (patch) | |
tree | 4f17655cdfbda17c385de9379a3553b2274d6eea | |
parent | 38c583019484f190d5b33f59b8ae810e6b1763c6 (diff) |
drm/i915/gem: Flush lmem contents after construction
i915_gem_object_create_lmem_from_data() lacks the flush of the data
written to lmem to ensure the object is marked as dirty and the writes
flushed to the backing store. Once created, we can immediately release
the obj->mm.mapping caching of the vmap.
Fixes: 7acbbc7cf485 ("drm/i915/guc: put all guc objects in lmem when available")
Cc: Matthew Auld <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Cc: Andi Shyti <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: John Harrison <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: <[email protected]> # v5.16+
Signed-off-by: Nirmoy Das <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Reviewed-by: Nirmoy Das <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit e2ee10474ce766686e7a7496585cdfaf79e3a1bf)
Signed-off-by: Jani Nikula <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c index 8949fb0a944f..3198b64ad7db 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c @@ -127,7 +127,8 @@ i915_gem_object_create_lmem_from_data(struct drm_i915_private *i915, memcpy(map, data, size); - i915_gem_object_unpin_map(obj); + i915_gem_object_flush_map(obj); + __i915_gem_object_release_map(obj); return obj; } |