diff mbox series

[1/1] drm/vmwgfx: use ttm_bo_move_null() when there is nothing to move

Message ID 20210503190013.91732-1-nirmoy.das@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/1] drm/vmwgfx: use ttm_bo_move_null() when there is nothing to move | expand

Commit Message

Das, Nirmoy May 3, 2021, 7 p.m. UTC
Use ttm_bo_move_null() instead of ttm_bo_assign_mem().

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian König May 3, 2021, 7:02 p.m. UTC | #1
Am 03.05.21 um 21:00 schrieb Nirmoy Das:
> Use ttm_bo_move_null() instead of ttm_bo_assign_mem().
>
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> index 2dc031fe4a90..beaf42f84f03 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> @@ -738,7 +738,7 @@ static int vmw_move(struct ttm_buffer_object *bo,
>   
>   	if (old_man->use_tt && new_man->use_tt) {
>   		if (bo->mem.mem_type == TTM_PL_SYSTEM) {
> -			ttm_bo_assign_mem(bo, new_mem);
> +			ttm_bo_move_null(bo, new_mem);
>   			return 0;
>   		}
>   		ret = ttm_bo_wait_ctx(bo, ctx);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index 2dc031fe4a90..beaf42f84f03 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -738,7 +738,7 @@  static int vmw_move(struct ttm_buffer_object *bo,
 
 	if (old_man->use_tt && new_man->use_tt) {
 		if (bo->mem.mem_type == TTM_PL_SYSTEM) {
-			ttm_bo_assign_mem(bo, new_mem);
+			ttm_bo_move_null(bo, new_mem);
 			return 0;
 		}
 		ret = ttm_bo_wait_ctx(bo, ctx);