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: Venkata Ramana Nayana <venkata.ramana.nayana@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-1-matthew.auld@intel.com
This commit is contained in:
committed by
Matthew Auld
parent
ac69496fe6
commit
c27d642b8e
@@ -8,6 +8,7 @@
|
||||
#include <linux/shmem_fs.h>
|
||||
|
||||
#include "gem/i915_gem_object.h"
|
||||
#include "gem/i915_gem_lmem.h"
|
||||
#include "shmem_utils.h"
|
||||
|
||||
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)
|
||||
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))
|
||||
return ERR_CAST(ptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user