intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Don't try to handle GuC when GuC is not supported.
@ 2016-09-21 18:22 Rodrigo Vivi
  2016-09-21 18:49 ` ✓ Fi.CI.BAT: success for " Patchwork
  2016-09-21 21:00 ` [PATCH] " Paulo Zanoni
  0 siblings, 2 replies; 9+ messages in thread
From: Rodrigo Vivi @ 2016-09-21 18:22 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Rodrigo Vivi

Avoid any kind of GuC handling if GuC is not supported
on a giving platform.

Besides being useless handling, our driver needs
to be smarter than the user trying to use an invalid paramenter.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Christophe Prigent <christophe.prigent@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97573
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_loader.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 6fd39ef..da0f5ed 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -720,6 +720,13 @@ void intel_guc_init(struct drm_device *dev)
 	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
 	const char *fw_path;
 
+	if (!HAS_GUC(dev)) {
+		i915.enable_guc_loading = 0;
+		i915.enable_guc_submission = 0;
+		fw_path = NULL;
+		return;
+	}
+
 	/* A negative value means "use platform default" */
 	if (i915.enable_guc_loading < 0)
 		i915.enable_guc_loading = HAS_GUC_UCODE(dev);
-- 
1.9.1

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

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

end of thread, other threads:[~2016-10-06 20:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 18:22 [PATCH] drm/i915: Don't try to handle GuC when GuC is not supported Rodrigo Vivi
2016-09-21 18:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-09-21 21:00 ` [PATCH] " Paulo Zanoni
2016-09-22 16:55   ` Vivi, Rodrigo
2016-10-05 13:50     ` Daniel Vetter
2016-10-05 23:37       ` Vivi, Rodrigo
2016-10-06 12:36         ` Paulo Zanoni
2016-10-06 13:31           ` Jani Nikula
2016-10-06 20:56           ` Vivi, Rodrigo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).