* [PATCH] drm/ttm: Skip swapout if ttm object is not populated
@ 2021-05-21 8:31 ` xinhui pan
0 siblings, 0 replies; 4+ messages in thread
From: xinhui pan @ 2021-05-21 8:31 UTC (permalink / raw)
To: amd-gfx; +Cc: xinhui pan, christian.koenig, dri-devel
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>
---
drivers/gpu/drm/ttm/ttm_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 510e3e001dab..a1dcf7d55c90 100644
--- 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;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm/ttm: Skip swapout if ttm object is not populated
@ 2021-05-21 8:31 ` xinhui pan
0 siblings, 0 replies; 4+ messages in thread
From: xinhui pan @ 2021-05-21 8:31 UTC (permalink / raw)
To: amd-gfx; +Cc: daniel, xinhui pan, christian.koenig, dri-devel
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>
---
drivers/gpu/drm/ttm/ttm_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 510e3e001dab..a1dcf7d55c90 100644
--- 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;
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/ttm: Skip swapout if ttm object is not populated
2021-05-21 8:31 ` xinhui pan
@ 2021-05-21 8:43 ` Christian König
-1 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2021-05-21 8:43 UTC (permalink / raw)
To: xinhui pan, amd-gfx; +Cc: dri-devel, christian.koenig
Am 21.05.21 um 10:31 schrieb xinhui pan:
> 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>
Going to add a CC: stable and pushing that to drm-misc-fixes in a minute.
> ---
> drivers/gpu/drm/ttm/ttm_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
> index 510e3e001dab..a1dcf7d55c90 100644
> --- 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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/ttm: Skip swapout if ttm object is not populated
@ 2021-05-21 8:43 ` Christian König
0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2021-05-21 8:43 UTC (permalink / raw)
To: xinhui pan, amd-gfx; +Cc: dri-devel, christian.koenig, daniel
Am 21.05.21 um 10:31 schrieb xinhui pan:
> 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>
Going to add a CC: stable and pushing that to drm-misc-fixes in a minute.
> ---
> drivers/gpu/drm/ttm/ttm_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
> index 510e3e001dab..a1dcf7d55c90 100644
> --- 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;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-21 8:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 8:31 [PATCH] drm/ttm: Skip swapout if ttm object is not populated xinhui pan
2021-05-21 8:31 ` xinhui pan
2021-05-21 8:43 ` Christian König
2021-05-21 8:43 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.