]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/nouveau: Improve variable name in nouveau_sched_init()
authorPhilipp Stanner <pstanner@redhat.com>
Fri, 12 Jul 2024 06:26:18 +0000 (08:26 +0200)
committerDanilo Krummrich <dakr@redhat.com>
Fri, 12 Jul 2024 17:36:28 +0000 (19:36 +0200)
nouveau_sched_init() uses the function drm_sched_init(). The latter
function has parameters called "hang_limit" and "timeout" in its API
documentation.

nouveau_sched_init(), however, defines a variable called
"job_hang_limit" which is passed to drm_sched_init()'s "timeout"
parameter. The actual "hang_limit" parameter is directly set to 0.

Rename "job_hang_limit" to "timeout".

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240712062618.8057-1-pstanner@redhat.com
drivers/gpu/drm/nouveau/nouveau_sched.c

index 32fa2e273965bf140a4cb2e05262b638c312cd6e..ba4139288a6df85d2254579567e30a374a551adb 100644 (file)
@@ -404,7 +404,7 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
 {
        struct drm_gpu_scheduler *drm_sched = &sched->base;
        struct drm_sched_entity *entity = &sched->entity;
-       long job_hang_limit = msecs_to_jiffies(NOUVEAU_SCHED_JOB_TIMEOUT_MS);
+       const long timeout = msecs_to_jiffies(NOUVEAU_SCHED_JOB_TIMEOUT_MS);
        int ret;
 
        if (!wq) {
@@ -418,7 +418,7 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
 
        ret = drm_sched_init(drm_sched, &nouveau_sched_ops, wq,
                             NOUVEAU_SCHED_PRIORITY_COUNT,
-                            credit_limit, 0, job_hang_limit,
+                            credit_limit, 0, timeout,
                             NULL, NULL, "nouveau_sched", drm->dev->dev);
        if (ret)
                goto fail_wq;