projects
/
wrapfs-5.3.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b60edf3
)
drm/ttm: fix eviction valuable range check.
author
Dave Airlie
<airlied@redhat.com>
Mon, 19 Oct 2020 22:22:53 +0000
(08:22 +1000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:43:35 +0000
(11:43 +0100)
commit
fea456d82c19d201c21313864105876deabe148b
upstream.
This was adding size to start, but pfn and start are in pages,
so it should be using num_pages.
Not sure this fixes anything in the real world, just noticed it
during refactoring.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Link:
https://patchwork.freedesktop.org/patch/msgid/20201019222257.1684769-2-airlied@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/ttm/ttm_bo.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_bo.c
b/drivers/gpu/drm/ttm/ttm_bo.c
index 3ce8ad7603c7f18dca951f462816408316be7636..3ffcbaa1387883eeca111dfdd60a5d2597f5013f 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_bo.c
+++ b/
drivers/gpu/drm/ttm/ttm_bo.c
@@
-761,7
+761,7
@@
bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
/* Don't evict this BO if it's outside of the
* requested placement range
*/
- if (place->fpfn >= (bo->mem.start + bo->mem.
size
) ||
+ if (place->fpfn >= (bo->mem.start + bo->mem.
num_pages
) ||
(place->lpfn && place->lpfn <= bo->mem.start))
return false;