Commit a2ce2314 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson

drm/i915/uc: Stop talking with GuC when resetting

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

This patch will also help us capture any unwanted/unexpected attempts
to talk with GuC after we decided to reset it. And we need to keep
'disable' part as current and upcoming firmware still expect graceful
cleanup.

v2: update commit msg
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190523172555.2780-1-michal.wajdeczko@intel.com
parent 0922f345
...@@ -96,4 +96,9 @@ void intel_guc_ct_fini(struct intel_guc_ct *ct); ...@@ -96,4 +96,9 @@ void intel_guc_ct_fini(struct intel_guc_ct *ct);
int intel_guc_ct_enable(struct intel_guc_ct *ct); int intel_guc_ct_enable(struct intel_guc_ct *ct);
void intel_guc_ct_disable(struct intel_guc_ct *ct); void intel_guc_ct_disable(struct intel_guc_ct *ct);
static inline void intel_guc_ct_stop(struct intel_guc_ct *ct)
{
ct->host_channel.enabled = false;
}
#endif /* _INTEL_GUC_CT_H_ */ #endif /* _INTEL_GUC_CT_H_ */
...@@ -224,6 +224,17 @@ static int guc_enable_communication(struct intel_guc *guc) ...@@ -224,6 +224,17 @@ static int guc_enable_communication(struct intel_guc *guc)
return 0; return 0;
} }
static void guc_stop_communication(struct intel_guc *guc)
{
struct drm_i915_private *i915 = guc_to_i915(guc);
if (HAS_GUC_CT(i915))
intel_guc_ct_stop(&guc->ct);
guc->send = intel_guc_send_nop;
guc->handler = intel_guc_to_host_event_handler_nop;
}
static void guc_disable_communication(struct intel_guc *guc) static void guc_disable_communication(struct intel_guc *guc)
{ {
struct drm_i915_private *i915 = guc_to_i915(guc); struct drm_i915_private *i915 = guc_to_i915(guc);
...@@ -485,7 +496,7 @@ void intel_uc_reset_prepare(struct drm_i915_private *i915) ...@@ -485,7 +496,7 @@ void intel_uc_reset_prepare(struct drm_i915_private *i915)
if (!USES_GUC(i915)) if (!USES_GUC(i915))
return; return;
guc_disable_communication(guc); guc_stop_communication(guc);
__uc_sanitize(i915); __uc_sanitize(i915);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment