]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915: Reverse the scanline_offset if ladder
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 Feb 2025 21:54:05 +0000 (23:54 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 25 Mar 2025 13:46:31 +0000 (15:46 +0200)
Make intel_crtc_scanline_offset() a bit less confusing by
fully reordering the if ladder to use the new->old platform
order.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250207215406.19348-3-ville.syrjala@linux.intel.com
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
drivers/gpu/drm/i915/display/intel_vblank.c

index 7b240ce681a01afb12de2da836d8b3fec31ba626..dd928d890e3aa2cf2bcac82b2ddc57ec7710c289 100644 (file)
@@ -224,12 +224,12 @@ int intel_crtc_scanline_offset(const struct intel_crtc_state *crtc_state)
         */
        if (DISPLAY_VER(display) >= 20 || display->platform.battlemage)
                return 1;
-       else if (DISPLAY_VER(display) == 2)
-               return -1;
        else if (HAS_DDI(display) && intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
                return 2;
-       else
+       else if (DISPLAY_VER(display) >= 3)
                return 1;
+       else
+               return -1;
 }
 
 /*