diff mbox series

[01/17] drm/i915/guc: skip disabling CTBs before sanitizing the GuC

Message ID 20210525211541.87696-2-matthew.brost@intel.com (mailing list archive)
State New, archived
Headers show
Series Non-interface changing GuC CTBs updates | expand

Commit Message

Matthew Brost May 25, 2021, 9:15 p.m. UTC
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

If we're about to sanitize the GuC, something might have going wrong
beforehand, so we should avoid trying to talk to it. Even if GuC is
still running fine, the sanitize will reset its internal state and clear
the CTB registration, so there is still no need to explicitly do so.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/2469
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
 drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff mbox series


diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index 6abb8f2dc33d..892c1315ce49 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -504,7 +504,7 @@  static int __uc_init_hw(struct intel_uc *uc)
 	ret = intel_guc_sample_forcewake(guc);
 	if (ret)
-		goto err_communication;
+		goto err_log_capture;
 	if (intel_uc_uses_guc_submission(uc))
@@ -529,8 +529,6 @@  static int __uc_init_hw(struct intel_uc *uc)
 	 * We've failed to load the firmware :(
-	guc_disable_communication(guc);
@@ -558,9 +556,6 @@  static void __uc_fini_hw(struct intel_uc *uc)
 	if (intel_uc_uses_guc_submission(uc))
-	if (guc_communication_enabled(guc))
-		guc_disable_communication(guc);
@@ -577,7 +572,6 @@  void intel_uc_reset_prepare(struct intel_uc *uc)
 	if (!intel_guc_is_ready(guc))
-	guc_disable_communication(guc);