mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
drm/bridge: synopsys: dw-hdmi: Don't set bus format as MEDIA_BUS_FMT_FIXED when dw-hdmi is only bridge
Using get_output_bus_format() and get_input_bus_format() to get bus format when dw-hdmi is only bridge. Signed-off-by: Algea Cao <algea.cao@rock-chips.com> Change-Id: Iec341cbb782270baafb8fa50752296d989def58b
This commit is contained in:
@@ -3477,16 +3477,36 @@ static int dw_hdmi_bridge_atomic_check(struct drm_bridge *bridge,
|
||||
struct drm_connector_state *conn_state)
|
||||
{
|
||||
struct dw_hdmi *hdmi = bridge->driver_private;
|
||||
void *data = hdmi->plat_data->phy_data;
|
||||
|
||||
hdmi->hdmi_data.enc_out_bus_format =
|
||||
bridge_state->output_bus_cfg.format;
|
||||
if (bridge_state->output_bus_cfg.format == MEDIA_BUS_FMT_FIXED) {
|
||||
if (hdmi->plat_data->get_output_bus_format)
|
||||
hdmi->hdmi_data.enc_out_bus_format =
|
||||
hdmi->plat_data->get_output_bus_format(data);
|
||||
else
|
||||
hdmi->hdmi_data.enc_out_bus_format =
|
||||
MEDIA_BUS_FMT_RGB888_1X24;
|
||||
|
||||
hdmi->hdmi_data.enc_in_bus_format =
|
||||
bridge_state->input_bus_cfg.format;
|
||||
if (hdmi->plat_data->get_input_bus_format)
|
||||
hdmi->hdmi_data.enc_in_bus_format =
|
||||
hdmi->plat_data->get_input_bus_format(data);
|
||||
else if (hdmi->plat_data->input_bus_format)
|
||||
hdmi->hdmi_data.enc_in_bus_format =
|
||||
hdmi->plat_data->input_bus_format;
|
||||
else
|
||||
hdmi->hdmi_data.enc_in_bus_format =
|
||||
MEDIA_BUS_FMT_RGB888_1X24;
|
||||
} else {
|
||||
hdmi->hdmi_data.enc_out_bus_format =
|
||||
bridge_state->output_bus_cfg.format;
|
||||
|
||||
dev_dbg(hdmi->dev, "input format 0x%04x, output format 0x%04x\n",
|
||||
bridge_state->input_bus_cfg.format,
|
||||
bridge_state->output_bus_cfg.format);
|
||||
hdmi->hdmi_data.enc_in_bus_format =
|
||||
bridge_state->input_bus_cfg.format;
|
||||
|
||||
dev_dbg(hdmi->dev, "input format 0x%04x, output format 0x%04x\n",
|
||||
bridge_state->input_bus_cfg.format,
|
||||
bridge_state->output_bus_cfg.format);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user