drm/i915/guc: suppress GuC-related message on non-GuC platforms
authorDave Gordon <david.s.gordon@intel.com>
Fri, 10 Jun 2016 16:21:25 +0000 (17:21 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 13 Jun 2016 09:02:51 +0000 (10:02 +0100)
If the user doesn't override the default values of the GuC-related
kernel parameters, then on a non-GuC-based platform we shouldn't
mention that we haven't loaded the GuC firmware.

The various messages have been reordered into a least->most severe
cascade (none/INFO/INFO/ERROR) for ease of comprehension.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465575685-34169-1-git-send-email-david.s.gordon@intel.com
drivers/gpu/drm/i915/intel_guc_loader.c

index 41f7c7d7ed1ea2aa6a41a379f5118242af3338d4..05732e31f6cc1a34e6036cc6c0743c83aee3a485 100644 (file)
@@ -525,12 +525,14 @@ fail:
                ret = 0;
        }
 
-       if (err == 0)
+       if (err == 0 && !HAS_GUC_UCODE(dev))
+               ;       /* Don't mention the GuC! */
+       else if (err == 0)
                DRM_INFO("GuC firmware load skipped\n");
-       else if (ret == -EIO)
-               DRM_ERROR("GuC firmware load failed: %d\n", err);
-       else
+       else if (ret != -EIO)
                DRM_INFO("GuC firmware load failed: %d\n", err);
+       else
+               DRM_ERROR("GuC firmware load failed: %d\n", err);
 
        if (i915.enable_guc_submission) {
                if (fw_path == NULL)