Skip to content

Commit 698e19d

Browse files
zhanjunjohnharr-intel
authored andcommitted
drm/i915: Skip pxp init if gt is wedged
The gt wedged could be triggered by missing guc firmware file, HW not working, etc. Once triggered, it means all gt usage is dead, therefore we can't enable pxp under this fatal error condition. v2: Updated commit message. v3: Updated return code check. Signed-off-by: Zhanjun Dong <[email protected]> Reviewed-by: Alan Previn <[email protected]> Signed-off-by: John Harrison <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0eec708 commit 698e19d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/gpu/drm/i915/i915_driver.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,9 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
804804
if (ret)
805805
goto out_cleanup_modeset2;
806806

807-
intel_pxp_init(i915);
807+
ret = intel_pxp_init(i915);
808+
if (ret != -ENODEV)
809+
drm_dbg(&i915->drm, "pxp init failed with %d\n", ret);
808810

809811
ret = intel_display_driver_probe(i915);
810812
if (ret)

drivers/gpu/drm/i915/pxp/intel_pxp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ int intel_pxp_init(struct drm_i915_private *i915)
199199
struct intel_gt *gt;
200200
bool is_full_feature = false;
201201

202+
if (intel_gt_is_wedged(to_gt(i915)))
203+
return -ENOTCONN;
204+
202205
/*
203206
* NOTE: Get the ctrl_gt before checking intel_pxp_is_supported since
204207
* we still need it if PXP's backend tee transport is needed.

0 commit comments

Comments
 (0)