[PATCH 3/3] drm/i915/guc: Inject probe errors for CT send

Thanneeru Srinivasulu thanneeru.srinivasulu at intel.com
Wed Oct 6 11:46:47 UTC 2021


Inject probe errors -ENXIO, -EBUSY for CT send.

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

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index 83764db0fd6d..8ffef3abd3da 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -765,6 +765,14 @@ int intel_guc_ct_send(struct intel_guc_ct *ct, const u32 *action, u32 len,
 	u32 status = ~0; /* undefined */
 	int ret;
 
+	ret = i915_inject_probe_error(ct_to_i915(ct), -ENXIO);
+	if (ret)
+		return ret;
+
+	ret = i915_inject_probe_error(ct_to_i915(ct), -EBUSY);
+	if (ret)
+		return ret;
+
 	if (unlikely(!ct->enabled)) {
 		struct intel_guc *guc = ct_to_guc(ct);
 		struct intel_uc *uc = container_of(guc, struct intel_uc, guc);
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list