public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915/guc: fix GuC loading/submission check
@ 2016-06-07  8:14 Dave Gordon
  2016-06-07  8:14 ` [PATCH 2/3] drm/i915/guc: disable GuC submission earlier during GuC (re)load Dave Gordon
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Dave Gordon @ 2016-06-07  8:14 UTC (permalink / raw)
  To: intel-gfx

The last stage of the GuC loader also sanitises the GuC submission
settings, so should be called unconditionally (even on platforms
without a GuC) to ensure consistent settings; in particular, this
prevents any attempt to use GuC submission on GuCless platforms!

Also fix error path handling and clarify DRM_INFO fallback message.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c         |  8 +++-----
 drivers/gpu/drm/i915/intel_guc_loader.c | 12 ++++++++----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1bfc260..eae8d7a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4930,11 +4930,9 @@ int i915_gem_init_engines(struct drm_device *dev)
 	intel_mocs_init_l3cc_table(dev);
 
 	/* We can't enable contexts until all firmware is loaded */
-	if (HAS_GUC(dev)) {
-		ret = intel_guc_setup(dev);
-		if (ret)
-			goto out;
-	}
+	ret = intel_guc_setup(dev);
+	if (ret)
+		goto out;
 
 	/*
 	 * Increment the next seqno by 0x100 so we have a visible break
diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index f2b88c7..4e34c2e 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -425,9 +425,13 @@ int intel_guc_setup(struct drm_device *dev)
 	if (!i915.enable_guc_loading) {
 		err = 0;
 		goto fail;
-	} else if (fw_path == NULL || *fw_path == '\0') {
-		if (*fw_path == '\0')
-			DRM_INFO("No GuC firmware known for this platform\n");
+	} else if (fw_path == NULL) {
+		/* Device is known to have no uCode (e.g. no GuC) */
+		err = -ENXIO;
+		goto fail;
+	} else if (*fw_path == '\0') {
+		/* Device has a GuC but we don't know what f/w to load? */
+		DRM_INFO("No GuC firmware known for this platform\n");
 		err = -ENODEV;
 		goto fail;
 	}
@@ -535,7 +539,7 @@ int intel_guc_setup(struct drm_device *dev)
 		if (fw_path == NULL)
 			DRM_INFO("GuC submission without firmware not supported\n");
 		if (ret == 0)
-			DRM_INFO("Falling back to execlist mode\n");
+			DRM_INFO("Falling back from GuC submission to execlist mode\n");
 		else
 			DRM_ERROR("GuC init failed: %d\n", ret);
 	}
-- 
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] 19+ messages in thread

end of thread, other threads:[~2016-06-13  9:06 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-07  8:14 [PATCH 1/3] drm/i915/guc: fix GuC loading/submission check Dave Gordon
2016-06-07  8:14 ` [PATCH 2/3] drm/i915/guc: disable GuC submission earlier during GuC (re)load Dave Gordon
2016-06-07  9:51   ` Tvrtko Ursulin
2016-06-07 10:13     ` Dave Gordon
2016-06-07  8:14 ` [PATCH 3/3] drm/i915/guc: enable GuC loading & submission by default Dave Gordon
2016-06-07  9:53   ` Tvrtko Ursulin
2016-06-07  8:41 ` [PATCH 1/3] drm/i915/guc: fix GuC loading/submission check Tvrtko Ursulin
2016-06-09 11:04   ` Tvrtko Ursulin
2016-06-10 15:45     ` Dave Gordon
2016-06-10 16:21     ` [PATCH] drm/i915/guc: suppress GuC-related message on non-GuC platforms Dave Gordon
2016-06-13  9:00       ` Tvrtko Ursulin
2016-06-07  8:43 ` ✗ Ro.CI.BAT: failure for series starting with [1/3] drm/i915/guc: fix GuC loading/submission check Patchwork
2016-06-07 10:54   ` Dave Gordon
2016-06-07 13:23     ` Tvrtko Ursulin
2016-06-07 20:00       ` Chris Wilson
2016-06-08  8:18         ` Dave Gordon
2016-06-10 16:59 ` ✗ Ro.CI.BAT: failure for series starting with drm/i915/guc: suppress GuC-related message on non-GuC platforms (rev2) Patchwork
2016-06-10 18:14   ` Dave Gordon
2016-06-13  9:06     ` Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox