From: Dave Stevenson Date: Wed, 23 Aug 2023 16:48:23 +0000 (+0100) Subject: drm/vc4: UV planes vertical scaling must always be enabled X-Git-Tag: accepted/tizen/unified/20240422.153132~384 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4d546bc1119c2f52928b028c72fa43f428e5a80;p=platform%2Fkernel%2Flinux-rpi.git drm/vc4: UV planes vertical scaling must always be enabled 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 --- diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 5680cbb..f22d4d1 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -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;