The struct v3d_job now carries its submission queue. The explicit queue
parameter passed alongside the job is therefore redundant, as it can be
read through job->queue directly.

Signed-off-by: Maíra Canal <[email protected]>
---
 drivers/gpu/drm/v3d/v3d_submit.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/v3d/v3d_submit.c b/drivers/gpu/drm/v3d/v3d_submit.c
index 46fc88bacc95..bfd99935c2ef 100644
--- a/drivers/gpu/drm/v3d/v3d_submit.c
+++ b/drivers/gpu/drm/v3d/v3d_submit.c
@@ -179,7 +179,7 @@ void v3d_job_put(struct v3d_job *job)
 
 static int
 v3d_job_add_syncobjs(struct v3d_job *job, struct drm_file *file_priv,
-                    u32 in_sync, struct v3d_submit_ext *se, enum v3d_queue 
queue)
+                    u32 in_sync, struct v3d_submit_ext *se)
 {
        bool has_multisync = se && (se->flags & DRM_V3D_EXT_ID_MULTI_SYNC);
        struct v3d_dev *v3d = job->v3d;
@@ -193,7 +193,7 @@ v3d_job_add_syncobjs(struct v3d_job *job, struct drm_file 
*file_priv,
                return ret;
        }
 
-       if (se->in_sync_count && se->wait_stage == queue) {
+       if (se->in_sync_count && se->wait_stage == job->queue) {
                struct drm_v3d_sem __user *handle = 
u64_to_user_ptr(se->in_syncs);
 
                for (int i = 0; i < se->in_sync_count; i++) {
@@ -481,8 +481,7 @@ v3d_setup_csd_jobs_and_bos(struct v3d_submit *submit,
        if (ret)
                return ret;
 
-       ret = v3d_job_add_syncobjs(&job->base, submit->file_priv, args->in_sync,
-                                  se, V3D_CSD);
+       ret = v3d_job_add_syncobjs(&job->base, submit->file_priv, 
args->in_sync, se);
        if (ret)
                return ret;
 
@@ -1112,7 +1111,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
                bin->qts = args->qts;
 
                ret = v3d_job_add_syncobjs(&bin->base, file_priv,
-                                          args->in_sync_bcl, &se, V3D_BIN);
+                                          args->in_sync_bcl, &se);
                if (ret)
                        goto fail;
        }
@@ -1129,8 +1128,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
        if (bin)
                bin->render = render;
 
-       ret = v3d_job_add_syncobjs(&render->base, file_priv, args->in_sync_rcl,
-                                  &se, V3D_RENDER);
+       ret = v3d_job_add_syncobjs(&render->base, file_priv, args->in_sync_rcl, 
&se);
        if (ret)
                goto fail;
 
@@ -1221,7 +1219,7 @@ v3d_submit_tfu_ioctl(struct drm_device *dev, void *data,
        if (ret)
                goto fail;
 
-       ret = v3d_job_add_syncobjs(&job->base, file_priv, args->in_sync, &se, 
V3D_TFU);
+       ret = v3d_job_add_syncobjs(&job->base, file_priv, args->in_sync, &se);
        if (ret)
                goto fail;
 
@@ -1413,7 +1411,7 @@ v3d_submit_cpu_ioctl(struct drm_device *dev, void *data,
 
        trace_v3d_submit_cpu_ioctl(dev, cpu_job->job_type);
 
-       ret = v3d_job_add_syncobjs(&cpu_job->base, file_priv, 0, &se, V3D_CPU);
+       ret = v3d_job_add_syncobjs(&cpu_job->base, file_priv, 0, &se);
        if (ret)
                goto fail;
 

-- 
2.54.0

Reply via email to