1

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: Sui Jingfeng <sui.jingfeng@linux.dev>
Link: https://patchwork.freedesktop.org/patch/msgid/b8c477279a6ae1b44df72bee230180e277087fae.1715691257.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula 2024-05-14 15:55:13 +03:00
parent 56056ef643
commit 9a7f6aeac2

View File

@ -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;
}