Commit 37f3821c authored by Jani Nikula's avatar Jani Nikula Committed by Robert Foss

drm/bridge/analogix/anx6345: switch to struct drm_edid

Prefer struct drm_edid based functions over struct edid.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarRobert Foss <rfoss@kernel.org>
Signed-off-by: default avatarRobert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/74b2f00e17b2614b44955cf0cbae270f3c31d91a.1715347488.git.jani.nikula@intel.com
parent 59125585
...@@ -47,7 +47,7 @@ struct anx6345 { ...@@ -47,7 +47,7 @@ struct anx6345 {
struct drm_dp_aux aux; struct drm_dp_aux aux;
struct drm_bridge bridge; struct drm_bridge bridge;
struct i2c_client *client; struct i2c_client *client;
struct edid *edid; const struct drm_edid *drm_edid;
struct drm_connector connector; struct drm_connector connector;
struct drm_panel *panel; struct drm_panel *panel;
struct regulator *dvdd12; struct regulator *dvdd12;
...@@ -458,7 +458,7 @@ static int anx6345_get_modes(struct drm_connector *connector) ...@@ -458,7 +458,7 @@ static int anx6345_get_modes(struct drm_connector *connector)
mutex_lock(&anx6345->lock); mutex_lock(&anx6345->lock);
if (!anx6345->edid) { if (!anx6345->drm_edid) {
if (!anx6345->powered) { if (!anx6345->powered) {
anx6345_poweron(anx6345); anx6345_poweron(anx6345);
power_off = true; power_off = true;
...@@ -470,19 +470,18 @@ static int anx6345_get_modes(struct drm_connector *connector) ...@@ -470,19 +470,18 @@ static int anx6345_get_modes(struct drm_connector *connector)
goto unlock; goto unlock;
} }
anx6345->edid = drm_get_edid(connector, &anx6345->aux.ddc); anx6345->drm_edid = drm_edid_read_ddc(connector, &anx6345->aux.ddc);
if (!anx6345->edid) if (!anx6345->drm_edid)
DRM_ERROR("Failed to read EDID from panel\n"); DRM_ERROR("Failed to read EDID from panel\n");
err = drm_connector_update_edid_property(connector, err = drm_edid_connector_update(connector, anx6345->drm_edid);
anx6345->edid);
if (err) { if (err) {
DRM_ERROR("Failed to update EDID property: %d\n", err); DRM_ERROR("Failed to update EDID property: %d\n", err);
goto unlock; goto unlock;
} }
} }
num_modes += drm_add_edid_modes(connector, anx6345->edid); num_modes += drm_edid_connector_add_modes(connector);
/* Driver currently supports only 6bpc */ /* Driver currently supports only 6bpc */
connector->display_info.bpc = 6; connector->display_info.bpc = 6;
...@@ -788,7 +787,7 @@ static void anx6345_i2c_remove(struct i2c_client *client) ...@@ -788,7 +787,7 @@ static void anx6345_i2c_remove(struct i2c_client *client)
unregister_i2c_dummy_clients(anx6345); unregister_i2c_dummy_clients(anx6345);
kfree(anx6345->edid); drm_edid_free(anx6345->drm_edid);
mutex_destroy(&anx6345->lock); mutex_destroy(&anx6345->lock);
} }
......
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