All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: Fix detection of GuC submission in use
@ 2019-09-05 11:16 Janusz Krzysztofik
  2019-09-05 12:08 ` Michal Wajdeczko
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Janusz Krzysztofik @ 2019-09-05 11:16 UTC (permalink / raw)
  To: Michal Wajdeczko, Daniele Ceraolo Spurio; +Cc: intel-gfx

The driver always assumes active GuC submission mode if it is
supported.  That's not true if GuC initialization fails for some
reason.  That may lead to kernel panics, caused e.g. by execlists
fallback submission mode incorrectly detecting GuC submission in use.

Fix it by also checking for GuC enabled status.

Fixes: 356c484822e6 ("drm/i915/uc: Add explicit DISABLED state for firmware")
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.h b/drivers/gpu/drm/i915/gt/uc/intel_uc.h
index 527995c21196..b28bab64a280 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.h
@@ -51,7 +51,8 @@ static inline bool intel_uc_supports_guc_submission(struct intel_uc *uc)
 
 static inline bool intel_uc_uses_guc_submission(struct intel_uc *uc)
 {
-	return intel_guc_is_submission_supported(&uc->guc);
+	return intel_guc_is_enabled(&uc->guc) &&
+	       intel_guc_is_submission_supported(&uc->guc);
 }
 
 static inline bool intel_uc_supports_huc(struct intel_uc *uc)
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-05 16:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 11:16 [PATCH] drm/i915/guc: Fix detection of GuC submission in use Janusz Krzysztofik
2019-09-05 12:08 ` Michal Wajdeczko
2019-09-05 12:34   ` Janusz Krzysztofik
2019-09-05 13:19 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-09-05 16:14 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.