On 4/22/21 7:57 AM, Christian König wrote:
From: Shiwu Zhang <[email protected]>
In case that all pre-allocated BOs are busy, just continue to populate
BOs since likely half of system memory in total is still free.
v4 (chk): fix code moved to VMWGFX as well
Signed-off-by: Shiwu Zhang <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Christian König <[email protected]>
---
drivers/gpu/drm/ttm/ttm_device.c | 2 +-
drivers/gpu/drm/ttm/ttm_tt.c | 2 ++
drivers/gpu/drm/vmwgfx/ttm_memory.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 1f2024164d72..5dc92b056f0a 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -112,7 +112,7 @@ int ttm_global_swapout(struct ttm_operation_ctx *ctx, gfp_t
gfp_flags)
{
struct ttm_global *glob = &ttm_glob;
struct ttm_device *bdev;
- int ret = -EBUSY;
+ int ret = 0;
Looks good to me. Updating the comment above that function to note it returns
either tge number of pages swapped out or an error might be a good idea because
it's not obvious from the name.
Reviewed-by: Zack Rusin <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel