[Intel-gfx] [RFC 23/28] drm/i915: Use IS_GEN in intel_bios.c

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Apr 14 11:50:23 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_bios.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index aa4df6548771..15c18d24e4e9 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -391,15 +391,12 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
 static int intel_bios_ssc_frequency(struct drm_i915_private *dev_priv,
 				    bool alternate)
 {
-	switch (INTEL_GEN(dev_priv)) {
-	case 2:
+	if (IS_GEN2(dev_priv))
 		return alternate ? 66667 : 48000;
-	case 3:
-	case 4:
+	else if (IS_GEN(dev_priv, 3, 4))
 		return alternate ? 100000 : 96000;
-	default:
+	else
 		return alternate ? 100000 : 120000;
-	}
 }
 
 static void
-- 
2.27.0



More information about the Intel-gfx mailing list