4a51862487c24e79f27bee47e9fce7dd468d7a27
[openwrt/staging/xback.git] /
1 From 03e0e348df7b685439f2db61ec2d8c8da25d1217 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 23 Aug 2023 17:48:23 +0100
4 Subject: [PATCH] drm/vc4: UV planes vertical scaling must always be enabled
5
6 It has been observed that a YUV422 unity scaled plane isn't displayed.
7 Enabling vertical scaling on the UV planes solves this. There is
8 already a similar clause to always enable horizontal scaling on the
9 UV planes.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 drivers/gpu/drm/vc4/vc4_plane.c | 6 ++++++
14 1 file changed, 6 insertions(+)
15
16 --- a/drivers/gpu/drm/vc4/vc4_plane.c
17 +++ b/drivers/gpu/drm/vc4/vc4_plane.c
18 @@ -522,6 +522,12 @@ static int vc4_plane_setup_clipping_and_
19 */
20 if (vc4_state->x_scaling[1] == VC4_SCALING_NONE)
21 vc4_state->x_scaling[1] = VC4_SCALING_PPF;
22 +
23 + /* Similarly UV needs vertical scaling to be enabled.
24 + * Without this a 1:1 scaled YUV422 plane isn't rendered.
25 + */
26 + if (vc4_state->y_scaling[1] == VC4_SCALING_NONE)
27 + vc4_state->y_scaling[1] = VC4_SCALING_PPF;
28 } else {
29 vc4_state->is_yuv = false;
30 vc4_state->x_scaling[1] = VC4_SCALING_NONE;