Skip to content

Commit 73552e0

Browse files
committed
drm/i915: Remove erroneous i915_is_ggtt check for I915_GEM_OBJECT_UNBIND_VM_TRYLOCK
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 <[email protected]> Fixes: bc6f80c ("drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.") Cc: Thomas Hellström <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Thomas Hellström <[email protected]> #irc
1 parent fd5f262 commit 73552e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/i915/i915_gem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj,
158158
ret = -EBUSY;
159159
if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE ||
160160
!i915_vma_is_active(vma)) {
161-
if (i915_is_ggtt(vma->vm) &&
162-
flags & I915_GEM_OBJECT_UNBIND_VM_TRYLOCK) {
161+
if (flags & I915_GEM_OBJECT_UNBIND_VM_TRYLOCK) {
163162
if (mutex_trylock(&vma->vm->mutex)) {
164163
ret = __i915_vma_unbind(vma);
165164
mutex_unlock(&vma->vm->mutex);

0 commit comments

Comments
 (0)