Skip to content

Commit 09c452d

Browse files
baluvivekLucas De Marchi
authored andcommitted
drm/xe/gt: Synchronize GT reset with device unbind
When unbinding wait for any GT reset in progress to complete. Unbinding will release the mmio mapping but mmio operations are performed during GT reset causing Kernel panic. Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patch.msgid.link/20251103123144.3231829-5-balasubramani.vivekanandan@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 1f8a87b commit 09c452d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/gpu/drm/xe/xe_gt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@ static void xe_gt_fini(void *arg)
607607
struct xe_gt *gt = arg;
608608
int i;
609609

610+
if (disable_work_sync(&gt->reset.worker))
611+
/*
612+
* If gt_reset_worker was halted from executing, take care of
613+
* releasing the rpm reference here.
614+
*/
615+
xe_pm_runtime_put(gt_to_xe(gt));
616+
610617
for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
611618
xe_hw_fence_irq_finish(&gt->fence_irq[i]);
612619

0 commit comments

Comments
 (0)