summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2021-04-21 11:46:56 +0100
committerMatthew Auld <matthew.auld@intel.com>2021-04-22 08:50:17 +0100
commitb75947e6b29d5b33f79d7b3918747592534e3fb1 (patch)
treefe128747971b8b4ec4151cbc65937ed7a646d2d0 /drivers/gpu/drm/i915/gem/i915_gem_lmem.c
parentd57d4a1daf5e8393e87244427c9b87dd565bd37c (diff)
downloadlinux-stable-b75947e6b29d5b33f79d7b3918747592534e3fb1.tar.gz
linux-stable-b75947e6b29d5b33f79d7b3918747592534e3fb1.tar.bz2
linux-stable-b75947e6b29d5b33f79d7b3918747592534e3fb1.zip
drm/i915/stolen: treat stolen local as normal local memory
Underneath it's the same stuff, so things like the PTE_LM bits for the GTT should just keep working as-is. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210421104658.304142-2-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_lmem.c')
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_lmem.c5
1 files changed, 4 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 ce1c83c13d05..017db8f71130 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
@@ -19,7 +19,10 @@ const struct drm_i915_gem_object_ops i915_gem_lmem_obj_ops = {
bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj)
{
- return obj->ops == &i915_gem_lmem_obj_ops;
+ struct intel_memory_region *mr = obj->mm.region;
+
+ return mr && (mr->type == INTEL_MEMORY_LOCAL ||
+ mr->type == INTEL_MEMORY_STOLEN_LOCAL);
}
struct drm_i915_gem_object *