All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Chia-I Wu <olvaffe@gmail.com>
Cc: "Steven Price" <steven.price@arm.com>,
	"Liviu Dudau" <liviu.dudau@arm.com>,
	"Adrián Larumbe" <adrian.larumbe@collabora.com>,
	dri-devel@lists.freedesktop.org,
	"Florent Tomasin" <florent.tomasin@arm.com>,
	"Heinrich Fink" <hfink@snap.com>,
	kernel@collabora.com
Subject: Re: [PATCH v2 7/8] drm/panthor: Make sure we resume the tick when new jobs are submitted
Date: Thu, 27 Nov 2025 15:46:58 +0100	[thread overview]
Message-ID: <20251127154658.4b90cc57@fedora> (raw)
In-Reply-To: <CAPaKu7SDz8MjHdpEUGBmNfh6Z2EC4CB6vXo74ZzVQUOC_=9nHg@mail.gmail.com>

On Wed, 26 Nov 2025 14:57:32 -0800
Chia-I Wu <olvaffe@gmail.com> wrote:

> >  static void queue_stop(struct panthor_queue *queue,
> > @@ -3202,6 +3215,18 @@ queue_run_job(struct drm_sched_job *sched_job)
> >
> >                 group_schedule_locked(group, BIT(job->queue_idx));
> >         } else {
> > +               u32 queue_mask = BIT(job->queue_idx);
> > +               bool resume_tick = group_is_idle(group) &&
> > +                                  (group->idle_queues & queue_mask) &&
> > +                                  !(group->blocked_queues & queue_mask) &&
> > +                                  sched->resched_target == U64_MAX;  
> The logic here should be the same as the first part of
> group_schedule_locked. I wonder if we can refactor that as well.

I addressed everything you pointed out, except for this. The tests in
group_schedule_locked() are two intricated with the rest of the logic to
be easily extracted into some helper. I'm happy to review such a patch
though.

> 
> > +
> > +               /* We just added something to the queue, so it's no longer idle. */
> > +               group->idle_queues &= ~BIT(job->queue_idx);  
> group->idle_queues &= queue_mask;
> 
> > +
> > +               if (resume_tick)
> > +                       sched_resume_tick(ptdev);
> > +
> >                 gpu_write(ptdev, CSF_DOORBELL(queue->doorbell_id), 1);
> >                 if (!sched->pm.has_ref &&
> >                     !(group->blocked_queues & BIT(job->queue_idx))) {

  parent reply	other threads:[~2025-11-27 14:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 11:51 [PATCH v2 0/8] drm/panthor: Misc scheduler fixes Boris Brezillon
2025-11-12 11:51 ` [PATCH v2 1/8] drm/panthor: Simplify group idleness tracking Boris Brezillon
2025-11-12 11:51 ` [PATCH v2 2/8] drm/panthor: Don't try to enable extract events Boris Brezillon
2025-11-12 11:51 ` [PATCH v2 3/8] drm/panthor: Fix the group priority rotation logic Boris Brezillon
2025-11-26 21:48   ` Chia-I Wu
2025-11-12 11:51 ` [PATCH v2 4/8] drm/panthor: Fix the full_tick check Boris Brezillon
2025-11-12 11:51 ` [PATCH v2 5/8] drm/panthor: Fix immediate ticking on a disabled tick Boris Brezillon
2025-11-12 11:51 ` [PATCH v2 6/8] drm/panthor: Fix the logic that decides when to stop ticking Boris Brezillon
2025-11-26 22:28   ` Chia-I Wu
2025-11-12 11:51 ` [PATCH v2 7/8] drm/panthor: Make sure we resume the tick when new jobs are submitted Boris Brezillon
2025-11-26 22:57   ` Chia-I Wu
2025-11-27  8:41     ` Boris Brezillon
2025-11-27 14:46     ` Boris Brezillon [this message]
2025-11-27 18:08       ` Chia-I Wu
2025-11-12 11:51 ` [PATCH v2 8/8] drm/panthor: Kill panthor_sched_immediate_tick() Boris Brezillon
2025-11-26 12:14 ` [PATCH v2 0/8] drm/panthor: Misc scheduler fixes Boris Brezillon
2025-11-26 16:06   ` Steven Price
2025-11-26 23:02     ` Chia-I Wu

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=20251127154658.4b90cc57@fedora \
    --to=boris.brezillon@collabora.com \
    --cc=adrian.larumbe@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 \
    --cc=olvaffe@gmail.com \
    --cc=steven.price@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.