From: Steven Price <steven.price@arm.com>
To: "Boris Brezillon" <boris.brezillon@collabora.com>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: dri-devel@lists.freedesktop.org,
Florent Tomasin <florent.tomasin@arm.com>,
Heinrich Fink <hfink@snap.com>,
kernel@collabora.com
Subject: Re: [PATCH v1 4/8] drm/panthor: Fix the full_tick check
Date: Thu, 6 Nov 2025 16:20:50 +0000 [thread overview]
Message-ID: <8a1dd381-9173-46de-91a9-8cfdab9a269b@arm.com> (raw)
In-Reply-To: <20251106144656.1012274-5-boris.brezillon@collabora.com>
On 06/11/2025 14:46, Boris Brezillon wrote:
> We have a full tick when the remaining time to the next tick is zero,
> not the other way around. Declare a full_tick variable so we don't get
> that test wrong in other places.
>
> Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> drivers/gpu/drm/panthor/panthor_sched.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index 69cc1b4c23f2..b6489e9ba1f0 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -2349,6 +2349,7 @@ static void tick_work(struct work_struct *work)
> u64 remaining_jiffies = 0, resched_delay;
> u64 now = get_jiffies_64();
> int prio, ret, cookie;
> + bool full_tick;
>
> if (!drm_dev_enter(&ptdev->base, &cookie))
> return;
> @@ -2360,15 +2361,17 @@ static void tick_work(struct work_struct *work)
> if (time_before64(now, sched->resched_target))
> remaining_jiffies = sched->resched_target - now;
>
> + full_tick = remaining_jiffies == 0;
> +
> mutex_lock(&sched->lock);
> if (panthor_device_reset_is_pending(sched->ptdev))
> goto out_unlock;
>
> - tick_ctx_init(sched, &ctx, remaining_jiffies != 0);
> + tick_ctx_init(sched, &ctx, full_tick);
> if (ctx.csg_upd_failed_mask)
> goto out_cleanup_ctx;
>
> - if (remaining_jiffies) {
> + if (!full_tick) {
> /* Scheduling forced in the middle of a tick. Only RT groups
> * can preempt non-RT ones. Currently running RT groups can't be
> * preempted.
next prev parent reply other threads:[~2025-11-06 16:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 14:46 [PATCH v1 0/8] drm/panthor: Misc scheduler fixes Boris Brezillon
2025-11-06 14:46 ` [PATCH v1 1/8] drm/panthor: Simplify group idleness tracking Boris Brezillon
2025-11-06 16:15 ` Steven Price
2025-11-06 14:46 ` [PATCH v1 2/8] drm/panthor: Don't try to enable extract events Boris Brezillon
2025-11-06 16:17 ` Steven Price
2025-11-06 14:46 ` [PATCH v1 3/8] drm/panthor: Fix the group priority rotation logic Boris Brezillon
2025-11-06 16:18 ` Steven Price
2025-11-06 16:30 ` Boris Brezillon
2025-11-06 14:46 ` [PATCH v1 4/8] drm/panthor: Fix the full_tick check Boris Brezillon
2025-11-06 16:20 ` Steven Price [this message]
2025-11-06 14:46 ` [PATCH v1 5/8] drm/panthor: Fix immediate ticking on a disabled tick Boris Brezillon
2025-11-06 16:23 ` Steven Price
2025-11-06 16:33 ` Boris Brezillon
2025-11-06 14:46 ` [PATCH v1 6/8] drm/panthor: Fix the logic that decides when to stop ticking Boris Brezillon
2025-11-06 16:29 ` Steven Price
2025-11-06 14:46 ` [PATCH v1 7/8] drm/panthor: Make sure we resume the tick when new jobs are submitted Boris Brezillon
2025-11-06 16:39 ` Steven Price
2025-11-06 14:46 ` [PATCH v1 8/8] drm/panthor: Kill panthor_sched_immediate_tick() Boris Brezillon
2025-11-06 16:44 ` Steven Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a1dd381-9173-46de-91a9-8cfdab9a269b@arm.com \
--to=steven.price@arm.com \
--cc=adrian.larumbe@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=florent.tomasin@arm.com \
--cc=hfink@snap.com \
--cc=kernel@collabora.com \
--cc=liviu.dudau@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox