From 47c07e46c86f310bed73b9c895155a49df3d5e71 Mon Sep 17 00:00:00 2001 From: Maíra Canal Date: Thu, 2 Feb 2023 08:19:43 -0300 Subject: drm/vc4: replace drm_gem_dma_object for drm_gem_object in vc4_exec_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The array of BOs that are lookup at the start of exec doesn't need to be instantiated as drm_gem_dma_object, as it doesn't benefit from its attributes. So, simplify the code by replacing the array of drm_gem_dma_object for an array of drm_gem_object in the struct vc4_exec_info. Suggested-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: André Almeida Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230202111943.111757-2-mcanal@igalia.com --- drivers/gpu/drm/vc4/vc4_validate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/vc4/vc4_validate.c') diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c index 520231af4df9..7dff3ca5af6b 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -117,7 +117,7 @@ vc4_use_bo(struct vc4_exec_info *exec, uint32_t hindex) hindex, exec->bo_count); return NULL; } - obj = exec->bo[hindex]; + obj = to_drm_gem_dma_obj(exec->bo[hindex]); bo = to_vc4_bo(&obj->base); if (bo->validated_shader) { @@ -810,7 +810,7 @@ validate_gl_shader_rec(struct drm_device *dev, return -EINVAL; } - bo[i] = exec->bo[src_handles[i]]; + bo[i] = to_drm_gem_dma_obj(exec->bo[src_handles[i]]); if (!bo[i]) return -EINVAL; } -- cgit