Skip to contentSkip to conversation

drm/i915/dpt: Make DPT object unshrinkable

PATCH In review Vidya Srinivas 2 participants 3 messages May 20, 2024 – May 21, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Credits-to: Ville Syrjala <[email protected]>
Shawn Lee <[email protected]>

Fixes 0dc987b699ce ("drm/i915/display: Add smem fallback allocation for dpt")
---
 drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gem/i915_gem_object.h +2 -1
index 3560a062d287..e6b485fc54d4 100644
@@ -284,7 +284,8 @@ bool i915_gem_object_has_iomem(const struct drm_i915_gem_object *obj);
 static inline bool
 i915_gem_object_is_shrinkable(const struct drm_i915_gem_object *obj)
 {
-	return i915_gem_object_type_has(obj, I915_GEM_OBJECT_IS_SHRINKABLE);
+	return i915_gem_object_type_has(obj, I915_GEM_OBJECT_IS_SHRINKABLE) &&
+		!obj->is_dpt;
 }
 
 static inline bool
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 7 lines · Vidya Srinivas

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.

Credits-to: Ville Syrjala <[email protected]>
Shawn Lee <[email protected]>

Isn't that what "Co-developed-by:" is for, or "Suggested-by:"?

I haven't seen "Credits-to:" before, where is that documented?

thanks,

greg k-h

#2 lore raw
Quoted 15 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Monday, May 20, 2024 11:50 PM
To: Srinivas, Vidya <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/i915/dpt: Make DPT object unshrinkable

Quoted 5 lines · Vidya Srinivas

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.

Quoted 6 lines
Quoted 2 lines

Credits-to: Ville Syrjala <[email protected]>
Shawn Lee <[email protected]>

Isn't that what "Co-developed-by:" is for, or "Suggested-by:"?

I haven't seen "Credits-to:" before, where is that documented?

Hello Greg, thank you. Sorry, I had seen in some of the patches Example https://patchwork.freedesktop.org/patch/404900/
I will change it to Suggested-by.

Regards
Vidya

Quoted 4 lines

thanks,

greg k-h