[PATCH 04/27] drm/i915/uc: Stop talking with GuC when resetting

Michal Wajdeczko michal.wajdeczko at intel.com
Thu May 16 20:27:16 UTC 2019


Knowing that GuC will be reset soon, we may stop all communication
immediately without doing graceful cleanup as it is not needed.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
---
 drivers/gpu/drm/i915/intel_uc.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 9d86cd831ea7..4141cb880702 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -224,6 +224,12 @@ static int guc_enable_communication(struct intel_guc *guc)
 	return 0;
 }
 
+static void guc_stop_communication(struct intel_guc *guc)
+{
+	guc->send = intel_guc_send_nop;
+	guc->handler = intel_guc_to_host_event_handler_nop;
+}
+
 static void guc_disable_communication(struct intel_guc *guc)
 {
 	struct drm_i915_private *i915 = guc_to_i915(guc);
@@ -233,8 +239,7 @@ static void guc_disable_communication(struct intel_guc *guc)
 
 	gen9_disable_guc_interrupts(i915);
 
-	guc->send = intel_guc_send_nop;
-	guc->handler = intel_guc_to_host_event_handler_nop;
+	guc_stop_communication(guc);
 }
 
 int intel_uc_init_misc(struct drm_i915_private *i915)
@@ -488,7 +493,7 @@ void intel_uc_reset_prepare(struct drm_i915_private *i915)
 	if (!USES_GUC(i915))
 		return;
 
-	guc_disable_communication(guc);
+	guc_stop_communication(guc);
 	__uc_sanitize(i915);
 }
 
-- 
2.19.2



More information about the Intel-gfx-trybot mailing list