diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-01-23 21:37:14 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-02-08 17:11:32 +0200 |
commit | 0d966d59d1e58df8555a3e6760a6eb3956b3d0ef (patch) | |
tree | ae15a6ceb94a6d1f48d08493996feadd851a3ea6 /drivers/gpu/drm/bridge/simple-bridge.c | |
parent | 392b6e9a3c0243db45ae3095a5082269a82d3845 (diff) | |
download | lwn-0d966d59d1e58df8555a3e6760a6eb3956b3d0ef.tar.gz lwn-0d966d59d1e58df8555a3e6760a6eb3956b3d0ef.zip |
drm: bridge: simple-bridge: use drm_bridge_edid_read()
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/ae1fd3d94829e3e5c197ca58eb18108cb004cf0b.1706038510.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/bridge/simple-bridge.c')
-rw-r--r-- | drivers/gpu/drm/bridge/simple-bridge.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/bridge/simple-bridge.c b/drivers/gpu/drm/bridge/simple-bridge.c index cbe8e778d7c7..e0cf7721bb8c 100644 --- a/drivers/gpu/drm/bridge/simple-bridge.c +++ b/drivers/gpu/drm/bridge/simple-bridge.c @@ -51,18 +51,18 @@ drm_connector_to_simple_bridge(struct drm_connector *connector) static int simple_bridge_get_modes(struct drm_connector *connector) { struct simple_bridge *sbridge = drm_connector_to_simple_bridge(connector); - struct edid *edid; + const struct drm_edid *drm_edid; int ret; if (sbridge->next_bridge->ops & DRM_BRIDGE_OP_EDID) { - edid = drm_bridge_get_edid(sbridge->next_bridge, connector); - if (!edid) + drm_edid = drm_bridge_edid_read(sbridge->next_bridge, connector); + if (!drm_edid) DRM_INFO("EDID read failed. Fallback to standard modes\n"); } else { - edid = NULL; + drm_edid = NULL; } - if (!edid) { + if (!drm_edid) { /* * In case we cannot retrieve the EDIDs (missing or broken DDC * bus from the next bridge), fallback on the XGA standards and @@ -73,9 +73,9 @@ static int simple_bridge_get_modes(struct drm_connector *connector) return ret; } - drm_connector_update_edid_property(connector, edid); - ret = drm_add_edid_modes(connector, edid); - kfree(edid); + drm_edid_connector_update(connector, drm_edid); + ret = drm_edid_connector_add_modes(connector); + drm_edid_free(drm_edid); return ret; } |