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 queue_reset_timeout_locked

queue_check_job_completion calls queue_reset_timeout_locked to reset the
timeout when progress is made. We want the reset to happen when the
timeout is running, not when it is suspended.

Fixes: 345c5b7cc0f85 ("drm/panthor: Make the timeout per-queue instead of per-job")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20251202174028.1600218-1-olvaffe@gmail.com

authored by

Chia-I Wu and committed by
Liviu Dudau
ac5b392a cedf6765

+12 -12
+12 -12
drivers/gpu/drm/panthor/panthor_sched.c
··· 1051 1051 return hweight32(inactive_queues) == group->queue_count; 1052 1052 } 1053 1053 1054 - static void 1055 - queue_reset_timeout_locked(struct panthor_queue *queue) 1056 - { 1057 - lockdep_assert_held(&queue->fence_ctx.lock); 1058 - 1059 - if (queue->timeout.remaining != MAX_SCHEDULE_TIMEOUT) { 1060 - mod_delayed_work(queue->scheduler.timeout_wq, 1061 - &queue->timeout.work, 1062 - msecs_to_jiffies(JOB_TIMEOUT_MS)); 1063 - } 1064 - } 1065 - 1066 1054 static bool 1067 1055 group_can_run(struct panthor_group *group) 1068 1056 { ··· 1065 1077 { 1066 1078 /* When running, the remaining time is set to MAX_SCHEDULE_TIMEOUT. */ 1067 1079 return queue->timeout.remaining != MAX_SCHEDULE_TIMEOUT; 1080 + } 1081 + 1082 + static void 1083 + queue_reset_timeout_locked(struct panthor_queue *queue) 1084 + { 1085 + lockdep_assert_held(&queue->fence_ctx.lock); 1086 + 1087 + if (!queue_timeout_is_suspended(queue)) { 1088 + mod_delayed_work(queue->scheduler.timeout_wq, 1089 + &queue->timeout.work, 1090 + msecs_to_jiffies(JOB_TIMEOUT_MS)); 1091 + } 1068 1092 } 1069 1093 1070 1094 static void