[Intel-gfx] [PATCH] drm/i915/guc: Use GUC prefix for CORE_FAMILY definitions

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Apr 4 13:52:06 UTC 2017


On 04/04/2017 14:38, Michal Wajdeczko wrote:
> Almost all other GuC fw definitions are using GUC|guc prefix.
> While around, in get_core_family() change explicit WARN into MISSING_CASE
> as it looks more appropriate, since GuC support capability we are controlling
> by intel_device_info.has_guc flag.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc_fwif.h   | 4 ++--
>  drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
> index cb36cbf..6156845 100644
> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
> @@ -23,8 +23,8 @@
>  #ifndef _INTEL_GUC_FWIF_H
>  #define _INTEL_GUC_FWIF_H
>
> -#define GFXCORE_FAMILY_GEN9		12
> -#define GFXCORE_FAMILY_UNKNOWN		0x7fffffff
> +#define GUC_CORE_FAMILY_GEN9		12
> +#define GUC_CORE_FAMILY_UNKNOWN		0x7fffffff
>
>  #define GUC_CLIENT_PRIORITY_KMD_HIGH	0
>  #define GUC_CLIENT_PRIORITY_HIGH	1
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index 8a1a023..2793c01 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -86,11 +86,11 @@ static u32 get_core_family(struct drm_i915_private *dev_priv)
>
>  	switch (gen) {
>  	case 9:
> -		return GFXCORE_FAMILY_GEN9;
> +		return GUC_CORE_FAMILY_GEN9;
>
>  	default:
> -		WARN(1, "GEN%d does not support GuC operation!\n", gen);
> -		return GFXCORE_FAMILY_UNKNOWN;
> +		MISSING_CASE(gen);
> +		return GUC_CORE_FAMILY_UNKNOWN;
>  	}
>  }
>
>

I agree that this is much more appropriate error handling for this 
layer. Prefix also makes sense.

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

Regards,

Tvrtko


More information about the Intel-gfx mailing list