Skip to content

Commit cb345f9

Browse files
Philipp StannerSteven Price
authored andcommitted
drm/panfrost: Fix scheduler workqueue bug
When the GPU scheduler was ported to using a struct for its initialization parameters, it was overlooked that panfrost creates a distinct workqueue for timeout handling. The pointer to this new workqueue is not initialized to the struct, resulting in NULL being passed to the scheduler, which then uses the system_wq for timeout handling. Set the correct workqueue to the init args struct. Cc: [email protected] # 6.15+ Fixes: 796a9f5 ("drm/sched: Use struct for drm_sched_init() params") Reported-by: Tvrtko Ursulin <[email protected]> Closes: https://lore.kernel.org/dri-devel/[email protected]/ Signed-off-by: Philipp Stanner <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Reviewed-by: Steven Price <[email protected]> Signed-off-by: Steven Price <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e547816 commit cb345f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/panfrost/panfrost_job.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,6 @@ int panfrost_job_init(struct panfrost_device *pfdev)
841841
.num_rqs = DRM_SCHED_PRIORITY_COUNT,
842842
.credit_limit = 2,
843843
.timeout = msecs_to_jiffies(JOB_TIMEOUT_MS),
844-
.timeout_wq = pfdev->reset.wq,
845844
.name = "pan_js",
846845
.dev = pfdev->dev,
847846
};
@@ -879,6 +878,7 @@ int panfrost_job_init(struct panfrost_device *pfdev)
879878
pfdev->reset.wq = alloc_ordered_workqueue("panfrost-reset", 0);
880879
if (!pfdev->reset.wq)
881880
return -ENOMEM;
881+
args.timeout_wq = pfdev->reset.wq;
882882

883883
for (j = 0; j < NUM_JOB_SLOTS; j++) {
884884
js->queue[j].fence_context = dma_fence_context_alloc(1);

0 commit comments

Comments
 (0)