[Intel-gfx] [PATCH] drm/i915: Remove erroneous i915_is_ggtt check for I915_GEM_OBJECT_UNBIND_VM_TRYLOCK

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Apr 29 12:01:58 UTC 2021


We changed the locking hierarchy for both ppgtt and ggtt, so both locks
should be trylocked inside i915_gem_object_unbind().

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Fixes: bc6f80cce9ae ("drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.")
Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 07da6a9342e3..d0018c5f88bd 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -158,8 +158,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj,
 			ret = -EBUSY;
 			if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE ||
 			    !i915_vma_is_active(vma)) {
-				if (i915_is_ggtt(vma->vm) &&
-				    flags & I915_GEM_OBJECT_UNBIND_VM_TRYLOCK) {
+				if (flags & I915_GEM_OBJECT_UNBIND_VM_TRYLOCK) {
 					if (mutex_trylock(&vma->vm->mutex)) {
 						ret = __i915_vma_unbind(vma);
 						mutex_unlock(&vma->vm->mutex);
-- 
2.31.0



More information about the Intel-gfx mailing list