Commit 3c542674 authored by Jani Nikula's avatar Jani Nikula

drm/bridge: analogix_dp: convert to struct drm_edid

Prefer the struct drm_edid based functions for reading the EDID and
updating the connector.
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/6f3bd1233a0922551761666f0c96c3766e3c5f96.1715691257.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 375c4d15
...@@ -1108,7 +1108,7 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, ...@@ -1108,7 +1108,7 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
static int analogix_dp_get_modes(struct drm_connector *connector) static int analogix_dp_get_modes(struct drm_connector *connector)
{ {
struct analogix_dp_device *dp = to_dp(connector); struct analogix_dp_device *dp = to_dp(connector);
struct edid *edid; const struct drm_edid *drm_edid;
int ret, num_modes = 0; int ret, num_modes = 0;
if (dp->plat_data->panel) { if (dp->plat_data->panel) {
...@@ -1120,12 +1120,13 @@ static int analogix_dp_get_modes(struct drm_connector *connector) ...@@ -1120,12 +1120,13 @@ static int analogix_dp_get_modes(struct drm_connector *connector)
return 0; return 0;
} }
edid = drm_get_edid(connector, &dp->aux.ddc); drm_edid = drm_edid_read_ddc(connector, &dp->aux.ddc);
if (edid) {
drm_connector_update_edid_property(&dp->connector, drm_edid_connector_update(&dp->connector, drm_edid);
edid);
num_modes += drm_add_edid_modes(&dp->connector, edid); if (drm_edid) {
kfree(edid); num_modes += drm_edid_connector_add_modes(&dp->connector);
drm_edid_free(drm_edid);
} }
ret = analogix_dp_prepare_panel(dp, false, false); ret = analogix_dp_prepare_panel(dp, false, false);
......
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