drm/vc4: plane: Enable scaler for YUV444 on GEN6

GEN6 requires the luma scaler to be enabled for YUV444 to
be rendered at 1:1, otherwise the source plane isn't rendered.

Fixes: 076eedaf76 ("drm/vc4: hvs: Add support for BCM2712 HVS")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2025-04-15 17:46:08 +01:00
committed by Dom Cobley
parent 836f5c8686
commit 0e9d8f8e33

View File

@@ -1860,6 +1860,24 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
if (ret)
return ret;
if (state->fb->format->format == DRM_FORMAT_YUV444 ||
state->fb->format->format == DRM_FORMAT_YVU444) {
/* Similar to YUV422 requiring the chroma scaler to always be
* enabled that is handled in vc4_plane_setup_clipping_and_scaling,
* GEN6 requires the scaler for the luma channel to be enabled
* for YUV444.
*/
if (vc4_state->x_scaling[0] == VC4_SCALING_NONE) {
vc4_state->x_scaling[0] = VC4_SCALING_PPF;
vc4_state->is_unity = false;
}
if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) {
vc4_state->y_scaling[0] = VC4_SCALING_PPF;
vc4_state->is_unity = false;
}
}
if (!vc4_state->src_w[0] || !vc4_state->src_h[0] ||
!vc4_state->crtc_w || !vc4_state->crtc_h) {
/* 0 source size probably means the plane is offscreen.