Commit c27d642b authored by Venkata Ramana Nayana's avatar Venkata Ramana Nayana Committed by Matthew Auld

drm/i915/dg1: Fix mapping type for default state object

Use I915_MAP_WC when default state object is allocated in LMEM.
Signed-off-by: default avatarVenkata Ramana Nayana <venkata.ramana.nayana@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-1-matthew.auld@intel.com
parent ac69496f
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/shmem_fs.h> #include <linux/shmem_fs.h>
#include "gem/i915_gem_object.h" #include "gem/i915_gem_object.h"
#include "gem/i915_gem_lmem.h"
#include "shmem_utils.h" #include "shmem_utils.h"
struct file *shmem_create_from_data(const char *name, void *data, size_t len) struct file *shmem_create_from_data(const char *name, void *data, size_t len)
...@@ -39,7 +40,8 @@ struct file *shmem_create_from_object(struct drm_i915_gem_object *obj) ...@@ -39,7 +40,8 @@ struct file *shmem_create_from_object(struct drm_i915_gem_object *obj)
return file; return file;
} }
ptr = i915_gem_object_pin_map_unlocked(obj, I915_MAP_WB); ptr = i915_gem_object_pin_map_unlocked(obj, i915_gem_object_is_lmem(obj) ?
I915_MAP_WC : I915_MAP_WB);
if (IS_ERR(ptr)) if (IS_ERR(ptr))
return ERR_CAST(ptr); return ERR_CAST(ptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment