[Intel-gfx] [PATCH] drm/i915/guc: Check if reset is supported before attempting to reset GuC
Michał Winiarski
michal.winiarski at intel.com
Fri Jun 14 13:02:07 UTC 2019
Let's trust both the user (i915.reset modparam) and device caps instead
of attempting to reset unconditionally.
Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Stuart Summers <stuart.summers at intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/intel_uc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index a8e7f0ba7c3b..0752fb77b6fe 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -38,6 +38,11 @@ static int __intel_uc_reset_hw(struct drm_i915_private *dev_priv)
int ret;
u32 guc_status;
+ if (!intel_has_gpu_reset(dev_priv)) {
+ DRM_DEBUG_DRIVER("GPU reset disabled, skipping GuC reset\n");
+ return 0;
+ }
+
ret = intel_reset_guc(dev_priv);
if (ret) {
DRM_ERROR("Failed to reset GuC, ret = %d\n", ret);
--
2.21.0
More information about the Intel-gfx
mailing list