All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/vmwgfx: free bo resource before assigning new one
@ 2021-06-08 15:09 Nirmoy Das
  2021-06-08 17:28 ` Christian König
  0 siblings, 1 reply; 8+ messages in thread
From: Nirmoy Das @ 2021-06-08 15:09 UTC (permalink / raw)
  To: dri-devel
  Cc: thomas_os, Nirmoy Das, linux-graphics-maintainer, Christian.Koenig

ttm_bo_assign_mem() expects bo->resource to be free.
Fixes: bfa3357ef9abc ("drm/ttm: allocate resource object instead of embedding it v2")

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

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index bfcf31bf7e37..7281912436bb 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -733,6 +733,7 @@ static int vmw_move(struct ttm_buffer_object *bo,
 
 	if (old_man->use_tt && new_man->use_tt) {
 		if (bo->resource->mem_type == TTM_PL_SYSTEM) {
+			ttm_resource_free(bo, &bo->resource);
 			ttm_bo_assign_mem(bo, new_mem);
 			return 0;
 		}
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-09  9:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 15:09 [PATCH 1/1] drm/vmwgfx: free bo resource before assigning new one Nirmoy Das
2021-06-08 17:28 ` Christian König
2021-06-08 17:54   ` Das, Nirmoy
2021-06-08 18:01   ` Nirmoy Das
2021-06-08 18:05     ` Das, Nirmoy
2021-06-08 18:13   ` [PATCH 1/1] drm/vmwgfx: use ttm_bo_move_null() when there is nothing to move Nirmoy Das
2021-06-09  6:38     ` Christian König
2021-06-09  9:05       ` Das, Nirmoy

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.