Skip to content

Commit

Permalink
drm/i915: Remove erroneous i915_is_ggtt check for I915_GEM_OBJECT_UNB…
Browse files Browse the repository at this point in the history
…IND_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 <maarten.lankhorst@linux.intel.com>
Fixes: bc6f80c ("drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.")
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210429120158.1105318-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #irc
  • Loading branch information
Maarten Lankhorst committed Apr 30, 2021
1 parent fd5f262 commit 73552e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 73552e0

Please sign in to comment.