]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/vc4: plane: YUV planes require vertical scaling to always be enabled
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Fri, 21 Jun 2024 15:20:39 +0000 (16:20 +0100)
committerDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 9 Sep 2024 12:02:53 +0000 (13:02 +0100)
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.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-16-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_plane.c

index d078a2d21eeae04a1109dd1a8d6d44ae17326f4c..4cd1721d2389ec876704f38768afdb8024b0323b 100644 (file)
@@ -517,6 +517,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;