mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-07 21:53:18 +09:00
drm/rockchip: rgb: add support output_mode config
Change-Id: If2c44545a7a54bb680d1025ab2793167cd24109c Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
@@ -144,10 +144,24 @@ rockchip_rgb_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
{
|
||||
struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);
|
||||
struct rockchip_rgb *rgb = encoder_to_rgb(encoder);
|
||||
struct drm_connector *connector = conn_state->connector;
|
||||
struct drm_display_info *info = &connector->display_info;
|
||||
|
||||
s->output_mode = rgb->output_mode;
|
||||
s->output_type = DRM_MODE_CONNECTOR_LVDS;
|
||||
|
||||
if (info->num_bus_formats)
|
||||
s->bus_format = info->bus_formats[0];
|
||||
else
|
||||
s->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
|
||||
if (s->bus_format == MEDIA_BUS_FMT_RGB666_1X18)
|
||||
s->output_mode = ROCKCHIP_OUT_MODE_P666;
|
||||
else if (s->bus_format == MEDIA_BUS_FMT_RGB565_1X16)
|
||||
s->output_mode = ROCKCHIP_OUT_MODE_P565;
|
||||
else
|
||||
s->output_mode = ROCKCHIP_OUT_MODE_P888;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user