diff mbox series

[2/2] drm/ttm: Fix swapout in ttm_tt_populate

Message ID 20210428053338.11560-2-Felix.Kuehling@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/ttm: Don't evict SG BOs | expand

Commit Message

Felix Kuehling April 28, 2021, 5:33 a.m. UTC
ttm_bo_swapout returns a non-0 value on success. Don't treat that as an
error in ttm_tt_populate.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian König April 28, 2021, 7:03 a.m. UTC | #1
That is already fixed upstream.

Am 28.04.21 um 07:33 schrieb Felix Kuehling:
> ttm_bo_swapout returns a non-0 value on success. Don't treat that as an
> error in ttm_tt_populate.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
>   drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index 5d8820725b75..1858a7fb9169 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -326,7 +326,7 @@ int ttm_tt_populate(struct ttm_device *bdev,
>   	       ttm_dma32_pages_limit) {
>   
>   		ret = ttm_bo_swapout(ctx, GFP_KERNEL);
> -		if (ret)
> +		if (ret < 0)
>   			goto error;
>   	}
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 5d8820725b75..1858a7fb9169 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -326,7 +326,7 @@  int ttm_tt_populate(struct ttm_device *bdev,
 	       ttm_dma32_pages_limit) {
 
 		ret = ttm_bo_swapout(ctx, GFP_KERNEL);
-		if (ret)
+		if (ret < 0)
 			goto error;
 	}