Commit ada5281a authored by Jani Nikula's avatar Jani Nikula

drm/mediatek/hdmi: switch to ->edid_read callback

Prefer using the struct drm_edid based callback and functions.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/7fff7a6ff6b7e6f121eafaccfc4c368e492631f4.1706038510.git.jani.nikula@intel.com
parent 0c13bd9b
...@@ -1265,19 +1265,27 @@ static enum drm_connector_status mtk_hdmi_bridge_detect(struct drm_bridge *bridg ...@@ -1265,19 +1265,27 @@ static enum drm_connector_status mtk_hdmi_bridge_detect(struct drm_bridge *bridg
return mtk_hdmi_detect(hdmi); return mtk_hdmi_detect(hdmi);
} }
static struct edid *mtk_hdmi_bridge_get_edid(struct drm_bridge *bridge, static const struct drm_edid *mtk_hdmi_bridge_edid_read(struct drm_bridge *bridge,
struct drm_connector *connector) struct drm_connector *connector)
{ {
struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge); struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
struct edid *edid; const struct drm_edid *drm_edid;
if (!hdmi->ddc_adpt) if (!hdmi->ddc_adpt)
return NULL; return NULL;
edid = drm_get_edid(connector, hdmi->ddc_adpt); drm_edid = drm_edid_read_ddc(connector, hdmi->ddc_adpt);
if (!edid) if (drm_edid) {
return NULL; /*
hdmi->dvi_mode = !drm_detect_monitor_audio(edid); * FIXME: This should use !connector->display_info.has_audio (or
return edid; * !connector->display_info.is_hdmi) from a path that has read
* the EDID and called drm_edid_connector_update().
*/
const struct edid *edid = drm_edid_raw(drm_edid);
hdmi->dvi_mode = !drm_detect_monitor_audio(edid);
}
return drm_edid;
} }
static int mtk_hdmi_bridge_attach(struct drm_bridge *bridge, static int mtk_hdmi_bridge_attach(struct drm_bridge *bridge,
...@@ -1417,7 +1425,7 @@ static const struct drm_bridge_funcs mtk_hdmi_bridge_funcs = { ...@@ -1417,7 +1425,7 @@ static const struct drm_bridge_funcs mtk_hdmi_bridge_funcs = {
.atomic_pre_enable = mtk_hdmi_bridge_atomic_pre_enable, .atomic_pre_enable = mtk_hdmi_bridge_atomic_pre_enable,
.atomic_enable = mtk_hdmi_bridge_atomic_enable, .atomic_enable = mtk_hdmi_bridge_atomic_enable,
.detect = mtk_hdmi_bridge_detect, .detect = mtk_hdmi_bridge_detect,
.get_edid = mtk_hdmi_bridge_get_edid, .edid_read = mtk_hdmi_bridge_edid_read,
}; };
static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment