On Thu, Jun 25, 2026 at 02:40:32PM +0200, Boris Brezillon wrote:
> We schedule immediate ticks when we need to process events on CSGs,
> but those immediate ticks don't change the resched_target because we
> want the other groups to stay scheduled for the remaining of the GPU
> timeslot they were given. Make sure these immediate ticks don't get
> overruled by a sched_queue_delayed_work() that would delay the tick
> execution.
> 
> Fixes: 99820b4b7e50 ("drm/panthor: Make sure we resume the tick when new jobs 
> are submitted")
> Reported-by: [email protected]
> Closes: 
> https://sashiko.dev/#/patchset/[email protected]?part=9
> Signed-off-by: Boris Brezillon <[email protected]>
> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c 
> b/drivers/gpu/drm/panthor/panthor_sched.c
> index 8fd4d97b062e..ab3e13e44a26 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -2667,7 +2667,14 @@ static void sched_resume_tick(struct panthor_device 
> *ptdev)
>       else
>               delay_jiffies = 0;
>  
> -     sched_queue_delayed_work(sched, tick, delay_jiffies);
> +     /* We schedule immediate ticks when we need to process events on CSGs,
> +      * but those don't change the resched_target because we want the other
> +      * groups to stay scheduled for the remaining of the GPU timeslot they
> +      * were given. Make sure those immediate ticks don't get overruled by
> +      * a sched_queue_delayed_work() that would delay the tick execution.
> +      */
> +     if (!delayed_work_pending(&sched->tick_work))
> +             sched_queue_delayed_work(sched, tick, delay_jiffies);

Maybe I'm having a Friday heat brain freeze, but it feels like the comment and 
the code
are going in a different direction. It doesn't help that the commit message 
copies the
comment so I can't tell if I'm misreading the comment or there was a different 
intent.

Best regards,
Liviu

>  }
>  
>  static void group_schedule_locked(struct panthor_group *group, u32 
> queue_mask)
> 
> -- 
> 2.54.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

Reply via email to