summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_exec.c
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2023-11-14 01:27:25 +0100
committerDanilo Krummrich <dakr@redhat.com>2023-11-24 21:24:51 +0100
commit46990918f35c1bf6e367cf8e0423e7344fec9fcb (patch)
tree52c25ddbd2cae0cfb55422fe71c70aa4fb029c0e /drivers/gpu/drm/nouveau/nouveau_exec.c
parent5f03a507b29e44a848f315c7240c19894dd8be4f (diff)
drm/nouveau: enable dynamic job-flow control
Make use of the scheduler's credit limit and scheduler job's credit count to account for the actual size of a job, such that we fill up the ring efficiently. Signed-off-by: Danilo Krummrich <dakr@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231114002728.3491-2-dakr@redhat.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_exec.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_exec.c b/drivers/gpu/drm/nouveau/nouveau_exec.c
index a179eeb6df09..bc5d71b79ab2 100644
--- a/drivers/gpu/drm/nouveau/nouveau_exec.c
+++ b/drivers/gpu/drm/nouveau/nouveau_exec.c
@@ -231,10 +231,12 @@ nouveau_exec_job_init(struct nouveau_exec_job **pjob,
}
}
+ args.file_priv = __args->file_priv;
job->chan = __args->chan;
args.sched = __args->sched;
- args.file_priv = __args->file_priv;
+ /* Plus one to account for the HW fence. */
+ args.credits = job->push.count + 1;
args.in_sync.count = __args->in_sync.count;
args.in_sync.s = __args->in_sync.s;