drm/i915/guc: Use GUC prefix for CORE_FAMILY definitions
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 4 Apr 2017 13:38:36 +0000 (13:38 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 5 Apr 2017 09:06:38 +0000 (10:06 +0100)
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@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170404133836.125736-1-michal.wajdeczko@intel.com
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_guc_fwif.h
drivers/gpu/drm/i915/intel_guc_loader.c

index cb36cbf3818f3386aa0ca6b490a23e4b630dc5f0..6156845641a3c9a228effd351c0fe2b37c8ff081 100644 (file)
@@ -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
index 8a1a023e48b28c838a2b4910f3d9b656ce4d3081..2793c01767b831d76fcd56aefd4ebea916295680 100644 (file)
@@ -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;
        }
 }