VOP output mode and bus_format must be ROCKCHIP_OUT_MODE_YUV420
and MEDIA_BUS_FMT_YUV8_1X24 when display mode has a YCbCr420
flag.
Change-Id: Ib2d51c119f5a8f1b8a9285c47ab228b22a293d56
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
{
struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);
- s->output_mode = ROCKCHIP_OUT_MODE_AAAA;
+ if (crtc_state->mode.flags & DRM_MODE_FLAG_420_MASK) {
+ s->output_mode = ROCKCHIP_OUT_MODE_YUV420;
+ s->bus_format = MEDIA_BUS_FMT_YUV8_1X24;
+ } else {
+ s->output_mode = ROCKCHIP_OUT_MODE_AAAA;
+ s->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
+ }
s->output_type = DRM_MODE_CONNECTOR_HDMIA;
- s->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
return 0;
}