drm/vmwgfx: free ttm resource before assigning a new one
Subsystems (3)
PATCH 1/1 drm/vmwgfx: free ttm resource before assigning a new one
TTM BO resource need to be freed before calling ttm_bo_assign_mem().
--- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +1 -0
@@ -738,6 +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_resource_free (bo, &bo->mem);ttm_bo_assign_mem (bo, new_mem);return 0 ; }
Signature · 6 lines
2.31.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 03.05.21 um 19:26 schrieb Nirmoy Das:
Quoted 12 lines
TTM BO resource need to be freed before calling
ttm_bo_assign_mem().Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +0
-0
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c static int vmw_move(struct ttm_buffer_object *bo, · line 742
Quoted 5 lines
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +1
-0@@ -738,6 +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_resource_free (bo, &bo->mem);ttm_bo_assign_mem (bo, new_mem);
Mhm, we should probably rather call ttm_bo_move_null here like other drivers do.
Christian.
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c static int vmw_move(struct ttm_buffer_object *bo, · line 744
Quoted 2 lines
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +0
-0return 0 ; }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Christian König
Am 03.05.21 um 19:26 schrieb Nirmoy Das:
Quoted 7 lines
TTM BO resource need to be freed before calling
ttm_bo_assign_mem().Signed-off-by Nirmoy Das <[email protected]>---
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c| 1 +1 file changed, 1 insertion(+)
Quoted 12 lines
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c static int vmw_move(struct ttm_buffer_object *bo, · line 741
Quoted 9 lines
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +1
-0@@ -738,6 +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_resource_free(bo, &bo->mem); ttm_bo_assign_mem(bo, new_mem);Mhm, we should probably rather call
ttm_bo_move_nullhere like other drivers do.
Thanks Christian, I will send a updated patch.
Nirmoy
Quoted 5 lines
Christian.
Quoted 2 lines
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +0
-0return 0; }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel