diff mbox

drm/i915/guc: suppress GuC-related message on non-GuC platforms

Message ID 1465575685-34169-1-git-send-email-david.s.gordon@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dave Gordon June 10, 2016, 4:21 p.m. UTC
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>
---
 drivers/gpu/drm/i915/intel_guc_loader.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Tvrtko Ursulin June 13, 2016, 9 a.m. UTC | #1
On 10/06/16 17:21, Dave Gordon wrote:
> 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>
> ---
>   drivers/gpu/drm/i915/intel_guc_loader.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index 41f7c7d..05732e3 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -525,12 +525,14 @@ int intel_guc_setup(struct drm_device *dev)
>   		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)
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 41f7c7d..05732e3 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -525,12 +525,14 @@  int intel_guc_setup(struct drm_device *dev)
 		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)