Skip to content

Commit c9a6542

Browse files
6by9rajeshkumarwr
authored andcommitted
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: 076eedaf762f ("drm/vc4: hvs: Add support for BCM2712 HVS") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent a0e1173 commit c9a6542

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,6 +1795,24 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
17951795
if (ret)
17961796
return ret;
17971797

1798+
if (state->fb->format->format == DRM_FORMAT_YUV444 ||
1799+
state->fb->format->format == DRM_FORMAT_YVU444) {
1800+
/* Similar to YUV422 requiring the chroma scaler to always be
1801+
* enabled that is handled in vc4_plane_setup_clipping_and_scaling,
1802+
* GEN6 requires the scaler for the luma channel to be enabled
1803+
* for YUV444.
1804+
*/
1805+
if (vc4_state->x_scaling[0] == VC4_SCALING_NONE) {
1806+
vc4_state->x_scaling[0] = VC4_SCALING_PPF;
1807+
vc4_state->is_unity = false;
1808+
}
1809+
1810+
if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) {
1811+
vc4_state->y_scaling[0] = VC4_SCALING_PPF;
1812+
vc4_state->is_unity = false;
1813+
}
1814+
}
1815+
17981816
if (!vc4_state->src_w[0] || !vc4_state->src_h[0] ||
17991817
!vc4_state->crtc_w || !vc4_state->crtc_h) {
18001818
/* 0 source size probably means the plane is offscreen.

0 commit comments

Comments
 (0)