summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rockchip/inno_hdmi.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-04-16 16:22:28 +0300
committerJani Nikula <jani.nikula@intel.com>2024-04-22 21:44:31 +0300
commit7fa1d6c50a5f5ad140bca0c615e97221f042a7a5 (patch)
treeb5e023daeef98c455cc22d907539ffb02f76d195 /drivers/gpu/drm/rockchip/inno_hdmi.c
parent917ebdd0a89304fabab54f58062dbb35d413dcb3 (diff)
downloadlinux-7fa1d6c50a5f5ad140bca0c615e97221f042a7a5.tar.xz
drm/rockchip: inno_hdmi: switch to struct drm_edid
Prefer struct drm_edid based functions over struct edid. Acked-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/1218cb4fd79149c90dc0c82c42ae0c8a36acf055.1713273659.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/rockchip/inno_hdmi.c')
-rw-r--r--drivers/gpu/drm/rockchip/inno_hdmi.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
index 1d2261643743..3df2cfcf9998 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
@@ -606,18 +606,16 @@ inno_hdmi_connector_detect(struct drm_connector *connector, bool force)
static int inno_hdmi_connector_get_modes(struct drm_connector *connector)
{
struct inno_hdmi *hdmi = connector_to_inno_hdmi(connector);
- struct edid *edid;
+ const struct drm_edid *drm_edid;
int ret = 0;
if (!hdmi->ddc)
return 0;
- edid = drm_get_edid(connector, hdmi->ddc);
- if (edid) {
- drm_connector_update_edid_property(connector, edid);
- ret = drm_add_edid_modes(connector, edid);
- kfree(edid);
- }
+ drm_edid = drm_edid_read_ddc(connector, hdmi->ddc);
+ drm_edid_connector_update(connector, drm_edid);
+ ret = drm_edid_connector_add_modes(connector);
+ drm_edid_free(drm_edid);
return ret;
}