Hi Chris, [...] > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c b/drivers/gpu/drm/i915/gem/i915_gem_domain.c > index 808eb327a29b..53e28e417cc9 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c > @@ -187,21 +187,23 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj, > { > int ret; > > - assert_object_held(obj); > - > if (obj->cache_level == cache_level) you're checking here... > return 0; > > - ret = i915_gem_object_unbind(obj, I915_GEM_OBJECT_UNBIND_ACTIVE); > + ret = i915_gem_object_lock_interruptible(obj); > if (ret) > return ret; > > - /* The cache-level will be applied when each vma is rebound. */ > + /* Always invalidate stale cachelines */ > + if (obj->cache_level != cache_level) { ... and here... you might want to get rid of this one? Andi > + i915_gem_object_set_cache_coherency(obj, cache_level); > + obj->cache_dirty = true; > + } > > - i915_gem_object_set_cache_coherency(obj, cache_level); > - obj->cache_dirty = true; /* Always invalidate stale cachelines */ > + i915_gem_object_unlock(obj); > > - return 0; > + /* The cache-level will be applied when each vma is rebound. */ > + return i915_gem_object_unbind(obj, I915_GEM_OBJECT_UNBIND_ACTIVE); > } _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx