Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/gt: perform uc late init after probe error injection
@ 2023-03-14 15:19 Andrzej Hajda
  2023-03-14 15:33 ` Andi Shyti
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Andrzej Hajda @ 2023-03-14 15:19 UTC (permalink / raw)
  To: intel-gfx
  Cc: Andrzej Hajda, Matthew Auld, Rodrigo Vivi, chris.p.wilson,
	Nirmoy Das

Probe pseudo errors should be injected only in places where real errors
can be encountered, otherwise unwinding code can be broken.
Placing intel_uc_init_late before i915_inject_probe_error violated
this rule, resulting in following bug:
__intel_gt_disable:655 GEM_BUG_ON(intel_gt_pm_is_awake(gt))

Fixes: 481d458caede ("drm/i915/guc: Add golden context to GuC ADS")
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index 6ca944d01eb677..38c62e4ad3eba2 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -736,12 +736,12 @@ int intel_gt_init(struct intel_gt *gt)
 	if (err)
 		goto err_gt;
 
-	intel_uc_init_late(&gt->uc);
-
 	err = i915_inject_probe_error(gt->i915, -EIO);
 	if (err)
 		goto err_gt;
 
+	intel_uc_init_late(&gt->uc);
+
 	intel_migrate_init(&gt->migrate, gt);
 
 	goto out_fw;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-17  9:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 15:19 [Intel-gfx] [PATCH] drm/i915/gt: perform uc late init after probe error injection Andrzej Hajda
2023-03-14 15:33 ` Andi Shyti
2023-03-15 10:05 ` Das, Nirmoy
2023-03-17  9:15   ` Andrzej Hajda
2023-03-17  1:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: perform uc late init after probe error injection (rev2) Patchwork
2023-03-17  4:56 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox