Commit 56056ef6 authored by Jani Nikula's avatar Jani Nikula

drm/loongson/7a1000: 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/22c66af62cd5ae1998bbaf6801cda3cc689f9e3f.1715691257.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent ff2a3913
......@@ -40,16 +40,15 @@
static int ls7a1000_dpi_connector_get_modes(struct drm_connector *conn)
{
unsigned int num = 0;
struct edid *edid;
int num;
if (conn->ddc) {
edid = drm_get_edid(conn, conn->ddc);
if (edid) {
drm_connector_update_edid_property(conn, edid);
num = drm_add_edid_modes(conn, edid);
kfree(edid);
}
const struct drm_edid *drm_edid;
drm_edid = drm_edid_read(conn);
drm_edid_connector_update(conn, drm_edid);
num = drm_edid_connector_add_modes(conn);
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