Commit 6164807d authored by Dan Carpenter's avatar Dan Carpenter Committed by Matthew Auld

drm/i915/ttm: Fix error code in i915_ttm_eviction_valuable()

This function returns a bool type so returning -EBUSY is equivalent to
returning true.  It should return false instead.

Fixes: 7ae03459 ("drm/i915/ttm: add tt shmem backend")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211122061438.GA2492@kili
parent 8626afb1
...@@ -332,7 +332,7 @@ static bool i915_ttm_eviction_valuable(struct ttm_buffer_object *bo, ...@@ -332,7 +332,7 @@ static bool i915_ttm_eviction_valuable(struct ttm_buffer_object *bo,
* but we would like to avoid grabbing locks for no good reason. * but we would like to avoid grabbing locks for no good reason.
*/ */
if (bo->ttm && bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL) if (bo->ttm && bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL)
return -EBUSY; return false;
/* Will do for now. Our pinned objects are still on TTM's LRU lists */ /* Will do for now. Our pinned objects are still on TTM's LRU lists */
return i915_gem_object_evictable(obj); return i915_gem_object_evictable(obj);
......
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