[PATCH 5/7] drm/i915/guc: Disallow guc log relay usage when FW is not loaded

Michał Winiarski michal.winiarski at intel.com
Tue Jun 5 09:00:24 UTC 2018

Now that we're leaving the driver in wedged state on FW load failure, we
should also disallow relay usage.
Failing to do so will result in futile attempts to inform GuC that it
needs to flush the log, which in turn will result in a WARN on our end.

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

diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index 401e1704d61e..b5add81b487a 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -547,6 +547,9 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
 	int ret;
+	if (!intel_uc_fw_is_loaded(&log_to_guc(log)->fw))
+		return -ENODEV;
 	if (intel_guc_log_relay_enabled(log)) {

More information about the Intel-gfx-trybot mailing list