]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/lima: remove guilty drm_sched context handling
authorErico Nunes <nunes.erico@gmail.com>
Wed, 24 Jan 2024 02:59:45 +0000 (03:59 +0100)
committerQiang Yu <yuq825@gmail.com>
Mon, 12 Feb 2024 08:27:28 +0000 (16:27 +0800)
Marking the context as guilty currently only makes the application which
hits a single timeout problem to stop its rendering context entirely.
All jobs submitted later are dropped from the guilty context.

Lima runs on fairly underpowered hardware for modern standards and it is
not entirely unreasonable that a rendering job may time out occasionally
due to high system load or too demanding application stack. In this case
it would be generally preferred to report the error but try to keep the
application going.

Other similar embedded GPU drivers don't make use of the guilty context
flag. Now that there are reliability improvements to the lima timeout
recovery handling, drop the guilty contexts to let the application keep
running in this case.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240124025947.2110659-7-nunes.erico@gmail.com
drivers/gpu/drm/lima/lima_ctx.c
drivers/gpu/drm/lima/lima_ctx.h
drivers/gpu/drm/lima/lima_sched.c
drivers/gpu/drm/lima/lima_sched.h

index 8389f2d7d021fb69ee75acd070883e7edad8498d..0e668fc1e0f9e7823cc406346662e56013ff6bfc 100644 (file)
@@ -19,7 +19,7 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
        kref_init(&ctx->refcnt);
 
        for (i = 0; i < lima_pipe_num; i++) {
-               err = lima_sched_context_init(dev->pipe + i, ctx->context + i, &ctx->guilty);
+               err = lima_sched_context_init(dev->pipe + i, ctx->context + i);
                if (err)
                        goto err_out0;
        }
index 74e2be09090f65ef24872c6c534ff0a419c17e88..5b1063ce968bd3263669252bb78fa30004b60407 100644 (file)
@@ -13,7 +13,6 @@ struct lima_ctx {
        struct kref refcnt;
        struct lima_device *dev;
        struct lima_sched_context context[lima_pipe_num];
-       atomic_t guilty;
 
        /* debug info */
        char pname[TASK_COMM_LEN];
index 814428564637750cdb53801aaae06bbc38db57c5..c2e78605e43e98f5766a8021d817891391d45eb5 100644 (file)
@@ -154,13 +154,12 @@ void lima_sched_task_fini(struct lima_sched_task *task)
 }
 
 int lima_sched_context_init(struct lima_sched_pipe *pipe,
-                           struct lima_sched_context *context,
-                           atomic_t *guilty)
+                           struct lima_sched_context *context)
 {
        struct drm_gpu_scheduler *sched = &pipe->base;
 
        return drm_sched_entity_init(&context->base, DRM_SCHED_PRIORITY_NORMAL,
-                                    &sched, 1, guilty);
+                                    &sched, 1, NULL);
 }
 
 void lima_sched_context_fini(struct lima_sched_pipe *pipe,
index 6a11764d87b389ad24f10746e2de7f2ff3126d2d..6bd4f3b70109133d494d3f5f9cb1019ab6e207f8 100644 (file)
@@ -91,8 +91,7 @@ int lima_sched_task_init(struct lima_sched_task *task,
 void lima_sched_task_fini(struct lima_sched_task *task);
 
 int lima_sched_context_init(struct lima_sched_pipe *pipe,
-                           struct lima_sched_context *context,
-                           atomic_t *guilty);
+                           struct lima_sched_context *context);
 void lima_sched_context_fini(struct lima_sched_pipe *pipe,
                             struct lima_sched_context *context);
 struct dma_fence *lima_sched_context_queue_task(struct lima_sched_task *task);