[Intel-gfx] [RFC 26/28] drm/i915: Use IS_GEN in intel_guc.c
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Apr 14 11:50:26 UTC 2021
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/intel_guc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
index 21140ccd7a97..e67283947624 100644
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -208,14 +208,10 @@ static u32 get_gt_type(struct drm_i915_private *dev_priv)
static u32 get_core_family(struct drm_i915_private *dev_priv)
{
- u32 gen = INTEL_GEN(dev_priv);
-
- switch (gen) {
- case 9:
+ if (IS_GEN9(dev_priv)) {
return GUC_CORE_FAMILY_GEN9;
-
- default:
- MISSING_CASE(gen);
+ } else {
+ MISSING_CASE(INTEL_GEN(dev_priv));
return GUC_CORE_FAMILY_UNKNOWN;
}
}
--
2.27.0
More information about the Intel-gfx
mailing list