From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> --- drivers/gpu/drm/i915/intel_display.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f7a3cefaaaed..5d1d67a7c368 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -13848,23 +13848,22 @@ static u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv, uint64_t fb_modifier, uint32_t pixel_format) { - u32 gen = INTEL_GEN(dev_priv); - - if (gen >= 9) { + if (IS_GEN(dev_priv, 9, GEN_FOREVER)) { int cpp = drm_format_plane_cpp(pixel_format, 0); /* "The stride in bytes must not exceed the of the size of 8K * pixels and 32K bytes." */ return min(8192 * cpp, 32768); - } else if (gen >= 5 && !HAS_GMCH_DISPLAY(dev_priv)) { + } else if (IS_GEN(dev_priv, 5, GEN_FOREVER) && + !HAS_GMCH_DISPLAY(dev_priv)) { return 32*1024; - } else if (gen >= 4) { + } else if (IS_GEN(dev_priv, 4, GEN_FOREVER)) { if (fb_modifier == I915_FORMAT_MOD_X_TILED) return 16*1024; else return 32*1024; - } else if (gen >= 3) { + } else if (IS_GEN(dev_priv, 3, GEN_FOREVER)) { if (fb_modifier == I915_FORMAT_MOD_X_TILED) return 8*1024; else -- 2.27.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx