Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panthor: Fix the full_tick check

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.

v2:
- Add R-b

v3:
- Collect R-b

Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block")
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: https://patch.msgid.link/20251128094839.3856402-4-boris.brezillon@collabora.com
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>

+5 -2
+5 -2
drivers/gpu/drm/panthor/panthor_sched.c
··· 2448 2448 u64 remaining_jiffies = 0, resched_delay; 2449 2449 u64 now = get_jiffies_64(); 2450 2450 int prio, ret, cookie; 2451 + bool full_tick; 2451 2452 2452 2453 if (!drm_dev_enter(&ptdev->base, &cookie)) 2453 2454 return; ··· 2460 2459 if (time_before64(now, sched->resched_target)) 2461 2460 remaining_jiffies = sched->resched_target - now; 2462 2461 2462 + full_tick = remaining_jiffies == 0; 2463 + 2463 2464 mutex_lock(&sched->lock); 2464 2465 if (panthor_device_reset_is_pending(sched->ptdev)) 2465 2466 goto out_unlock; 2466 2467 2467 - tick_ctx_init(sched, &ctx, remaining_jiffies != 0); 2468 + tick_ctx_init(sched, &ctx, full_tick); 2468 2469 if (ctx.csg_upd_failed_mask) 2469 2470 goto out_cleanup_ctx; 2470 2471 2471 - if (remaining_jiffies) { 2472 + if (!full_tick) { 2472 2473 /* Scheduling forced in the middle of a tick. Only RT groups 2473 2474 * can preempt non-RT ones. Currently running RT groups can't be 2474 2475 * preempted.