Skip to contentSkip to conversation

drm/ttm: fix warning after moving resource to ghost obj

PATCH In review Christian König 2 participants 2 messages Jun 7, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ttm: fix warning after moving resource to ghost obj

After we moved the resource to the ghost the bo->resource pointer needs to be resetted since the owner of the resource is now the ghost.

---
 drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/ttm/ttm_bo_util.c +1 -0
index 1b326e70cb02..a2b97cd84d8f 100644
@@ -603,6 +603,7 @@ static int ttm_bo_move_to_ghost(struct ttm_buffer_object *bo,
 		ghost_obj->ttm = NULL;
 	else
 		bo->ttm = NULL;
+	bo->resource = NULL;
 
 	dma_resv_unlock(&ghost_obj->base._resv);
 	ttm_bo_put(ghost_obj);
Signature · 1 line
2.25.1