Skip to content

Commit ecd8a36

Browse files
6by9popcornmix
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: 076eeda ("drm/vc4: hvs: Add support for BCM2712 HVS") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent d6e50c6 commit ecd8a36

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

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

1863+
if (state->fb->format->format == DRM_FORMAT_YUV444 ||
1864+
state->fb->format->format == DRM_FORMAT_YVU444) {
1865+
/* Similar to YUV422 requiring the chroma scaler to always be
1866+
* enabled that is handled in vc4_plane_setup_clipping_and_scaling,
1867+
* GEN6 requires the scaler for the luma channel to be enabled
1868+
* for YUV444.
1869+
*/
1870+
if (vc4_state->x_scaling[0] == VC4_SCALING_NONE) {
1871+
vc4_state->x_scaling[0] = VC4_SCALING_PPF;
1872+
vc4_state->is_unity = false;
1873+
}
1874+
1875+
if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) {
1876+
vc4_state->y_scaling[0] = VC4_SCALING_PPF;
1877+
vc4_state->is_unity = false;
1878+
}
1879+
}
1880+
18631881
if (!vc4_state->src_w[0] || !vc4_state->src_h[0] ||
18641882
!vc4_state->crtc_w || !vc4_state->crtc_h) {
18651883
/* 0 source size probably means the plane is offscreen.

0 commit comments

Comments
 (0)