[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251203094100.5b07fc0b@fedora>
Date: Wed, 3 Dec 2025 09:41:00 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Chia-I Wu <olvaffe@...il.com>
Cc: Steven Price <steven.price@....com>, Liviu Dudau <liviu.dudau@....com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard
<mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, David Airlie
<airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Grant Likely
<grant.likely@...aro.org>, Heiko Stuebner <heiko@...ech.de>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
ashley.smith@...labora.com
Subject: Re: [PATCH v2] drm/panthor: fix queue_reset_timeout_locked
On Tue, 2 Dec 2025 13:31:02 -0800
Chia-I Wu <olvaffe@...il.com> wrote:
> queue_check_job_completion calls queue_reset_timeout_locked to reset the
> timeout when progress is made. We want the reset to happen when the
> timeout is running, not when it is suspended.
>
> Fixes: 345c5b7cc0f85 ("drm/panthor: Make the timeout per-queue instead of per-job")
> Signed-off-by: Chia-I Wu <olvaffe@...il.com>
Reviewed-by: Boris Brezillon <boris.brezillon@...labora.com>
>
> ---
> v2: reset queue->timeout.remaining when suspended (Boris)
> ---
> drivers/gpu/drm/panthor/panthor_sched.c | 26 +++++++++++++------------
> 1 file changed, 14 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index 389d508b3848e..95ae42168ce18 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -1052,18 +1052,6 @@ group_is_idle(struct panthor_group *group)
> return hweight32(inactive_queues) == group->queue_count;
> }
>
> -static void
> -queue_reset_timeout_locked(struct panthor_queue *queue)
> -{
> - lockdep_assert_held(&queue->fence_ctx.lock);
> -
> - if (queue->timeout.remaining != MAX_SCHEDULE_TIMEOUT) {
> - mod_delayed_work(queue->scheduler.timeout_wq,
> - &queue->timeout.work,
> - msecs_to_jiffies(JOB_TIMEOUT_MS));
> - }
> -}
> -
> static bool
> group_can_run(struct panthor_group *group)
> {
> @@ -1080,6 +1068,20 @@ queue_timeout_is_suspended(struct panthor_queue *queue)
> return queue->timeout.remaining != MAX_SCHEDULE_TIMEOUT;
> }
>
> +static void
> +queue_reset_timeout_locked(struct panthor_queue *queue)
> +{
> + lockdep_assert_held(&queue->fence_ctx.lock);
> +
> + if (queue_timeout_is_suspended(queue)) {
> + queue->timeout.remaining = msecs_to_jiffies(JOB_TIMEOUT_MS);
> + } else {
> + mod_delayed_work(queue->scheduler.timeout_wq,
> + &queue->timeout.work,
> + msecs_to_jiffies(JOB_TIMEOUT_MS));
> + }
> +}
> +
> static void
> queue_suspend_timeout_locked(struct panthor_queue *queue)
> {
Powered by blists - more mailing lists