diff mbox series

[10/20] drm/i915/fbc: Reoder CFB max height platform checks

Message ID 20240705145254.3355-11-ville.syrjala@linux.intel.com (mailing list archive)
State New
Headers show
Series drm/{i915, xe}: FBC cleanups + tweak fbdev stolen usage | expand

Commit Message

Ville Syrjälä July 5, 2024, 2:52 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Rearrange the max CFB max height platform into the
more common "new first, old last" order.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 4d25ebb5ae9d..cf5750ed4681 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -206,10 +206,10 @@  static unsigned int intel_fbc_cfb_size(const struct intel_plane_state *plane_sta
 	struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
 	int height = drm_rect_height(&plane_state->uapi.src) >> 16;
 
-	if (DISPLAY_VER(display) == 7)
-		height = min(height, 2048);
-	else if (DISPLAY_VER(display) >= 8)
+	if (DISPLAY_VER(display) >= 8)
 		height = min(height, 2560);
+	else if (DISPLAY_VER(display) == 7)
+		height = min(height, 2048);
 
 	return height * intel_fbc_cfb_stride(plane_state);
 }