From 6cf9dc238cacee9b0e519d4530181a45639d4503 Mon Sep 17 00:00:00 2001 From: Christian König Date: Thu, 11 Feb 2021 13:00:25 +0100 Subject: drm/vmwgfx: clean up vmw_move_notify v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of swapping bo->mem just give old and new as parameters. Also drop unused parameters and code. v2: cleanup stale documentation as well. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210315191432.153826-3-christian.koenig@amd.com --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_resource.c') diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index c3a724e37104..35f02958ee2c 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c @@ -847,13 +847,15 @@ int vmw_query_readback_all(struct vmw_buffer_object *dx_query_mob) * vmw_query_move_notify - Read back cached query states * * @bo: The TTM buffer object about to move. - * @mem: The memory region @bo is moving to. + * @old_mem: The memory region @bo is moving from. + * @new_mem: The memory region @bo is moving to. * * Called before the query MOB is swapped out to read back cached query * states from the device. */ void vmw_query_move_notify(struct ttm_buffer_object *bo, - struct ttm_resource *mem) + struct ttm_resource *old_mem, + struct ttm_resource *new_mem) { struct vmw_buffer_object *dx_query_mob; struct ttm_device *bdev = bo->bdev; @@ -871,7 +873,8 @@ void vmw_query_move_notify(struct ttm_buffer_object *bo, } /* If BO is being moved from MOB to system memory */ - if (mem->mem_type == TTM_PL_SYSTEM && bo->mem.mem_type == VMW_PL_MOB) { + if (new_mem->mem_type == TTM_PL_SYSTEM && + old_mem->mem_type == VMW_PL_MOB) { struct vmw_fence_obj *fence; (void) vmw_query_readback_all(dx_query_mob); -- cgit