Skip to content

Commit 51064d4

Browse files
vsrini4vsyrjala
authored andcommitted
drm/i915/dpt: Make DPT object unshrinkable
In some scenarios, the DPT object gets shrunk but the actual framebuffer did not and thus its still there on the DPT's vm->bound_list. Then it tries to rewrite the PTEs via a stale CPU mapping. This causes panic. Cc: [email protected] Reported-by: Shawn Lee <[email protected]> Fixes: 0dc987b ("drm/i915/display: Add smem fallback allocation for dpt") Signed-off-by: Vidya Srinivas <[email protected]> [vsyrjala: Add TODO comment] Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2689390 commit 51064d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/i915/gem/i915_gem_object.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ bool i915_gem_object_has_iomem(const struct drm_i915_gem_object *obj);
284284
static inline bool
285285
i915_gem_object_is_shrinkable(const struct drm_i915_gem_object *obj)
286286
{
287-
return i915_gem_object_type_has(obj, I915_GEM_OBJECT_IS_SHRINKABLE);
287+
/* TODO: make DPT shrinkable when it has no bound vmas */
288+
return i915_gem_object_type_has(obj, I915_GEM_OBJECT_IS_SHRINKABLE) &&
289+
!obj->is_dpt;
288290
}
289291

290292
static inline bool

0 commit comments

Comments
 (0)