drm/bridge: chrontel-ch7033: switch to drm_bridge_edid_read()
authorJani Nikula <jani.nikula@intel.com>
Tue, 23 Jan 2024 19:37:09 +0000 (21:37 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 8 Feb 2024 15:11:04 +0000 (17:11 +0200)
Prefer using the struct drm_edid based functions.

Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Robert Foss <rfoss@kernel.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/51691a606671d46696c0f1ab9492e6a1b691457b.1706038510.git.jani.nikula@intel.com
drivers/gpu/drm/bridge/chrontel-ch7033.c

index 483c28c..c83486c 100644 (file)
@@ -230,14 +230,14 @@ static const struct drm_connector_funcs ch7033_connector_funcs = {
 static int ch7033_connector_get_modes(struct drm_connector *connector)
 {
        struct ch7033_priv *priv = conn_to_ch7033_priv(connector);
-       struct edid *edid;
+       const struct drm_edid *drm_edid;
        int ret;
 
-       edid = drm_bridge_get_edid(priv->next_bridge, connector);
-       drm_connector_update_edid_property(connector, edid);
-       if (edid) {
-               ret = drm_add_edid_modes(connector, edid);
-               kfree(edid);
+       drm_edid = drm_bridge_edid_read(priv->next_bridge, connector);
+       drm_edid_connector_update(connector, drm_edid);
+       if (drm_edid) {
+               ret = drm_edid_connector_add_modes(connector);
+               drm_edid_free(drm_edid);
        } else {
                ret = drm_add_modes_noedid(connector, 1920, 1080);
                drm_set_preferred_mode(connector, 1024, 768);