Commit 9a7f6aea authored by Jani Nikula's avatar Jani Nikula

drm/loongson/7a2000: convert to struct drm_edid

Prefer the struct drm_edid based functions for reading the EDID and
updating the connector.
Reviewed-by: default avatarSui Jingfeng <sui.jingfeng@linux.dev>
Link: https://patchwork.freedesktop.org/patch/msgid/b8c477279a6ae1b44df72bee230180e277087fae.1715691257.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 56056ef6
......@@ -44,16 +44,15 @@
static int ls7a2000_connector_get_modes(struct drm_connector *connector)
{
unsigned int num = 0;
struct edid *edid;
int num;
if (connector->ddc) {
edid = drm_get_edid(connector, connector->ddc);
if (edid) {
drm_connector_update_edid_property(connector, edid);
num = drm_add_edid_modes(connector, edid);
kfree(edid);
}
const struct drm_edid *drm_edid;
drm_edid = drm_edid_read(connector);
drm_edid_connector_update(connector, drm_edid);
num = drm_edid_connector_add_modes(connector);
drm_edid_free(drm_edid);
return num;
}
......
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