diff options
author | Dan Carpenter <[email protected]> | 2021-11-22 10:41:47 +0300 |
---|---|---|
committer | Matthew Auld <[email protected]> | 2021-11-22 14:20:44 +0000 |
commit | 6164807dd2989fd4c1435a6b3c61453e63c4e37e (patch) | |
tree | 1a97a34d66b35a4e02b6241e9bf872b29647f554 | |
parent | 8626afb170dc44ed0512e04131e4d8eac0c5ec57 (diff) |
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: 7ae034590cea ("drm/i915/ttm: add tt shmem backend")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Signed-off-by: Matthew Auld <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20211122061438.GA2492@kili
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index d08a270b0921..753f0f5458b6 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c @@ -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. */ 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 */ return i915_gem_object_evictable(obj); |