Skip to content

Commit be2d3e9

Browse files
committed
drm/panthor: Kill the faulty_slots variable in panthor_sched_suspend()
We can use upd_ctx.timedout_mask directly, and the faulty_slots update in the flush_caches_failed situation is never used. Suggested-by: Suggested-by: Steven Price <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Steven Price <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 4a56c0e commit be2d3e9

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/gpu/drm/panthor/panthor_sched.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2546,8 +2546,8 @@ void panthor_sched_suspend(struct panthor_device *ptdev)
25462546
{
25472547
struct panthor_scheduler *sched = ptdev->scheduler;
25482548
struct panthor_csg_slots_upd_ctx upd_ctx;
2549-
u32 suspended_slots, faulty_slots;
25502549
struct panthor_group *group;
2550+
u32 suspended_slots;
25512551
u32 i;
25522552

25532553
mutex_lock(&sched->lock);
@@ -2566,10 +2566,9 @@ void panthor_sched_suspend(struct panthor_device *ptdev)
25662566

25672567
csgs_upd_ctx_apply_locked(ptdev, &upd_ctx);
25682568
suspended_slots &= ~upd_ctx.timedout_mask;
2569-
faulty_slots = upd_ctx.timedout_mask;
25702569

2571-
if (faulty_slots) {
2572-
u32 slot_mask = faulty_slots;
2570+
if (upd_ctx.timedout_mask) {
2571+
u32 slot_mask = upd_ctx.timedout_mask;
25732572

25742573
drm_err(&ptdev->base, "CSG suspend failed, escalating to termination");
25752574
csgs_upd_ctx_init(&upd_ctx);
@@ -2620,9 +2619,6 @@ void panthor_sched_suspend(struct panthor_device *ptdev)
26202619

26212620
slot_mask &= ~BIT(csg_id);
26222621
}
2623-
2624-
if (flush_caches_failed)
2625-
faulty_slots |= suspended_slots;
26262622
}
26272623

26282624
for (i = 0; i < sched->csg_slot_count; i++) {

0 commit comments

Comments
 (0)