aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_uc.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2019-05-23 17:25:55 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-05-23 21:58:36 +0100
commita2ce23147348cc040469a617d4fe72ed8d1767e9 (patch)
tree9ba4221a455b7eff69a4f796628e8eb2dd2c2263 /drivers/gpu/drm/i915/intel_uc.c
parentdrm/i915/uc: Skip GuC HW unwinding if GuC is already dead (diff)
downloadlinux-dev-a2ce23147348cc040469a617d4fe72ed8d1767e9.tar.xz
linux-dev-a2ce23147348cc040469a617d4fe72ed8d1767e9.zip
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: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190523172555.2780-1-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_uc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 3d81a512e5c8..f17cb3dad90b 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -224,6 +224,17 @@ static int guc_enable_communication(struct intel_guc *guc)
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)
{
struct drm_i915_private *i915 = guc_to_i915(guc);
@@ -485,7 +496,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);
}