drm/i915: Fix ADL+ tiled plane stride when the POT stride is smaller than the original
authorjsg <jsg@openbsd.org>
Mon, 1 Jan 2024 23:58:00 +0000 (23:58 +0000)
committerjsg <jsg@openbsd.org>
Mon, 1 Jan 2024 23:58:00 +0000 (23:58 +0000)
From Ville Syrjala
900c1b3c62f920a50352f5dff6995bca5836b0c7 in linux-6.1.y/6.1.70
324b70e997aab0a7deab8cb90711faccda4e98c8 in mainline linux

sys/dev/pci/drm/i915/display/intel_fb.c

index 99ee0e6..2a3e37c 100644 (file)
@@ -1316,7 +1316,8 @@ plane_view_scanout_stride(const struct intel_framebuffer *fb, int color_plane,
        struct drm_i915_private *i915 = to_i915(fb->base.dev);
        unsigned int stride_tiles;
 
-       if (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14)
+       if ((IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14) &&
+           src_stride_tiles < dst_stride_tiles)
                stride_tiles = src_stride_tiles;
        else
                stride_tiles = dst_stride_tiles;