drm/vc4: UV planes vertical scaling must always be enabled
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 23 Aug 2023 16:48:23 +0000 (17:48 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:34:56 +0000 (11:34 +0000)
It has been observed that a YUV422 unity scaled plane isn't displayed.
Enabling vertical scaling on the UV planes solves this. There is
already a similar clause to always enable horizontal scaling on the
UV planes.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_plane.c

index 5680cbb96c80d2cf4d365200345ea7b4207783f3..f22d4d11f942ec4c35ec37f18be9ba1c553c0b8c 100644 (file)
@@ -522,6 +522,12 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
                 */
                if (vc4_state->x_scaling[1] == VC4_SCALING_NONE)
                        vc4_state->x_scaling[1] = VC4_SCALING_PPF;
+
+               /* Similarly UV needs vertical scaling to be enabled.
+                * Without this a 1:1 scaled YUV422 plane isn't rendered.
+                */
+               if (vc4_state->y_scaling[1] == VC4_SCALING_NONE)
+                       vc4_state->y_scaling[1] = VC4_SCALING_PPF;
        } else {
                vc4_state->is_yuv = false;
                vc4_state->x_scaling[1] = VC4_SCALING_NONE;