[Intel-gfx] [PATCH 3/4] drm/i915/guc: Inject probe errors for MMIO send

Thanneeru Srinivasulu
2021-10-11T15:19:56Z

Injecting probe errors -ENXIO for MMIO send.

Signed-off-by: Thanneeru Srinivasulu <thanneeru.srinivasulu@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
index 8f8182bf7c11..490d66712afc 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
@@ -403,6 +403,10 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len,
int i;
int ret;

+ ret = i915_inject_probe_error(i915, -ENXIO);
+ if (ret)
+ return ret;
+
GEM_BUG_ON(!len);
GEM_BUG_ON(len > guc->send_regs.count);

--
2.25.1