drm/i915/gem: Flush lmem contents after construction
authorjsg <jsg@openbsd.org>
Fri, 7 Apr 2023 04:03:48 +0000 (04:03 +0000)
committerjsg <jsg@openbsd.org>
Fri, 7 Apr 2023 04:03:48 +0000 (04:03 +0000)
From Chris Wilson
21ee19974b19edcda7a8e4f9bd5b02c3a750a69e in linux-6.1.y/6.1.23
d032ca43f2c80049ce5aabd3f208dc3849359497 in mainline linux

sys/dev/pci/drm/i915/gem/i915_gem_lmem.c

index ea4a8b5..1181249 100644 (file)
@@ -131,7 +131,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;
 }