[PATCH] drm/i915/dpt: Restrict shrinker to DPT objects not mapped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Restricting all DPT objects as unshrinkable was causing
some chromebooks to run out of memory causing
DMA remap failures. Thanks to Brian Geffon for the
pointers on debug and suggesting usage of !obj->mm.mapping

Fixes: 43e2b37e2ab6 ("drm/i915/dpt: Make DPT object unshrinkable")

Credits-to: Brian Geffon <bgeffon@xxxxxxxxxx>
Suggested-by: Ville Syrj_l_ <ville.syrjala@xxxxxxxxxxxxxxx>
Signed-off-by: Vidya Srinivas <vidya.srinivas@xxxxxxxxx>
---
 drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 +-
 1 file changed, 1 insertion(+), 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 3dc61cbd2e11..b155f0139d4e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -285,7 +285,7 @@ i915_gem_object_is_shrinkable(const struct drm_i915_gem_object *obj)
 {
 	/* TODO: make DPT shrinkable when it has no bound vmas */
 	return i915_gem_object_type_has(obj, I915_GEM_OBJECT_IS_SHRINKABLE) &&
-		!obj->is_dpt;
+		!(obj->is_dpt && obj->mm.mapping);
 }
 
 static inline bool
-- 
2.34.1




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux