All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dpt: Make DPT object unshrinkable
@ 2024-05-20 15:24 Srinivas, Vidya
  2024-05-20 16:15 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Srinivas, Vidya @ 2024-05-20 15:24 UTC (permalink / raw)
  To: intel-gfx; +Cc: ville.syrjala, shawn.c.lee, Srinivas, 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 <ville.syrjala@linux.intel.com>
	    Shawn Lee <shawn.c.lee@intel.com>

Signed-off-by: Srinivas, Vidya <vidya.srinivas@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index 3560a062d287..e6b485fc54d4 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -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
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread
* [PATCH] drm/i915/dpt: Make DPT object unshrinkable
@ 2024-05-20 16:50 Vidya Srinivas
  2024-05-20 18:19 ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Vidya Srinivas @ 2024-05-20 16:50 UTC (permalink / raw)
  To: vidya.srinivas; +Cc: stable

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 <ville.syrjala@linux.intel.com>
	    Shawn Lee <shawn.c.lee@intel.com>

Cc: stable@vger.kernel.org
Fixes: 0dc987b699ce ("drm/i915/display: Add smem fallback allocation for dpt")
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_object.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index 3560a062d287..e6b485fc54d4 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -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
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-05-23 13:52 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 15:24 [PATCH] drm/i915/dpt: Make DPT object unshrinkable Srinivas, Vidya
2024-05-20 16:15 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2024-05-20 16:26 ` ✓ Fi.CI.BAT: success " Patchwork
2024-05-20 16:39 ` [PATCH] " Ville Syrjälä
2024-05-20 17:14   ` Srinivas, Vidya
2024-05-20 16:56 ` Vidya Srinivas
2024-05-22 15:29   ` Vidya Srinivas
2024-05-23  8:25     ` Tvrtko Ursulin
2024-05-23 11:19       ` Ville Syrjälä
2024-05-23 12:07         ` Tvrtko Ursulin
2024-05-23 12:24           ` Ville Syrjälä
2024-05-23 13:14             ` Tvrtko Ursulin
2024-05-23 13:52               ` Ville Syrjälä
2024-05-20 18:35 ` ✗ Fi.CI.SPARSE: warning for drm/i915/dpt: Make DPT object unshrinkable (rev2) Patchwork
2024-05-20 18:46 ` ✓ Fi.CI.BAT: success " Patchwork
2024-05-21  5:38 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-05-22 15:58 ` ✗ Fi.CI.BUILD: failure for drm/i915/dpt: Make DPT object unshrinkable (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-05-20 16:50 [PATCH] drm/i915/dpt: Make DPT object unshrinkable Vidya Srinivas
2024-05-20 18:19 ` Greg KH
2024-05-21  2:34   ` Srinivas, Vidya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.