Commit 2dfa597d authored by Thomas Hellström's avatar Thomas Hellström

drm/i915/gem: Fix a lockdep warning the __i915_gem_is_lmem() function

Somehow we managed to invert the test for i915_gem_object_evictable(),
which causes a warning in DG1 BAT, igt@debugfs_test@read_all_entries.

Fix the lock check to only warn if the object *is* indeed evictable and
not protected from eviction by fences.

Cc: Matthew Brost <matthew.brost@intel.com>
Fixes: 91160c83 ("drm/i915: Take pinning into account in __i915_gem_object_is_lmem")
Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210922083807.888206-2-thomas.hellstrom@linux.intel.com
parent 017792a0
...@@ -67,7 +67,7 @@ bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj) ...@@ -67,7 +67,7 @@ bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj)
#ifdef CONFIG_LOCKDEP #ifdef CONFIG_LOCKDEP
GEM_WARN_ON(dma_resv_test_signaled(obj->base.resv, true) && GEM_WARN_ON(dma_resv_test_signaled(obj->base.resv, true) &&
!i915_gem_object_evictable(obj)); i915_gem_object_evictable(obj));
#endif #endif
return mr && (mr->type == INTEL_MEMORY_LOCAL || return mr && (mr->type == INTEL_MEMORY_LOCAL ||
mr->type == INTEL_MEMORY_STOLEN_LOCAL); mr->type == INTEL_MEMORY_STOLEN_LOCAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment