mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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:
committed by
Phil Elwell
parent
ff35eadf97
commit
ef79eea9e4
@@ -1857,6 +1857,24 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return 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] ||
|
if (!vc4_state->src_w[0] || !vc4_state->src_h[0] ||
|
||||||
!vc4_state->crtc_w || !vc4_state->crtc_h) {
|
!vc4_state->crtc_w || !vc4_state->crtc_h) {
|
||||||
/* 0 source size probably means the plane is offscreen.
|
/* 0 source size probably means the plane is offscreen.
|
||||||
|
|||||||
Reference in New Issue
Block a user