Skip to content

Commit

Permalink
drm/i915/gt: perform uc late init after probe error injection
Browse files Browse the repository at this point in the history
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: 481d458 ("drm/i915/guc: Add golden context to GuC ADS")
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314151920.1065847-1-andrzej.hajda@intel.com
  • Loading branch information
ahajda committed Mar 17, 2023
1 parent ae1da08 commit c4252a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/gt/intel_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,12 +737,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;
Expand Down

0 comments on commit c4252a1

Please sign in to comment.