projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cfc4ea
)
drm/ttm: Skip swapout if ttm object is not populated
author
xinhui pan
<xinhui.pan@amd.com>
Fri, 21 May 2021 08:31:12 +0000
(16:31 +0800)
committer
Christian König
<christian.koenig@amd.com>
Wed, 26 May 2021 13:02:47 +0000
(15:02 +0200)
Swapping a ttm object which has no backend pages makes no sense.
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20210521083112.33176-1-xinhui.pan@amd.com
CC: stable@kernel.org
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_device.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_device.c
b/drivers/gpu/drm/ttm/ttm_device.c
index 510e3e001dabe02c196c09d2cc10b0843daa9d7e..a1dcf7d55c903fb546b21ceea1f0a6a6f8bc35a7 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_device.c
+++ b/
drivers/gpu/drm/ttm/ttm_device.c
@@
-145,7
+145,7
@@
int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
list_for_each_entry(bo, &man->lru[j], lru) {
uint32_t num_pages;
- if (!bo->ttm ||
+ if (!bo->ttm ||
!ttm_tt_is_populated(bo->ttm) ||
bo->ttm->page_flags & TTM_PAGE_FLAG_SG ||
bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED)
continue;