summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-01-23 20:37:31 +0100
committerJani Nikula <jani.nikula@intel.com>2024-02-09 09:15:48 +0100
commitac2854ddfa69aca5fd9a09dd36d897e0e263a17d (patch)
tree1bf112bb01879d090cd0e760e826168e58bf70d9
parentdrm/bridge: sii902x: use display info is_hdmi (diff)
downloadlinux-ac2854ddfa69aca5fd9a09dd36d897e0e263a17d.tar.xz
linux-ac2854ddfa69aca5fd9a09dd36d897e0e263a17d.zip
drm/bridge: sii902x: switch to ->edid_read callback
Prefer using the struct drm_edid based callback and functions. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/684ccb5445bfc448dfaff00ad61a16a76f6aa723.1706038510.git.jani.nikula@intel.com
-rw-r--r--drivers/gpu/drm/bridge/sii902x.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index d59e668498c3..8f84e98249c7 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -278,31 +278,31 @@ static const struct drm_connector_funcs sii902x_connector_funcs = {
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
};
-static struct edid *sii902x_get_edid(struct sii902x *sii902x,
- struct drm_connector *connector)
+static const struct drm_edid *sii902x_edid_read(struct sii902x *sii902x,
+ struct drm_connector *connector)
{
- struct edid *edid;
+ const struct drm_edid *drm_edid;
mutex_lock(&sii902x->mutex);
- edid = drm_get_edid(connector, sii902x->i2cmux->adapter[0]);
+ drm_edid = drm_edid_read_ddc(connector, sii902x->i2cmux->adapter[0]);
mutex_unlock(&sii902x->mutex);
- return edid;
+ return drm_edid;
}
static int sii902x_get_modes(struct drm_connector *connector)
{
struct sii902x *sii902x = connector_to_sii902x(connector);
- struct edid *edid;
+ const struct drm_edid *drm_edid;
int num = 0;
- edid = sii902x_get_edid(sii902x, connector);
- drm_connector_update_edid_property(connector, edid);
- if (edid) {
- num = drm_add_edid_modes(connector, edid);
- kfree(edid);
+ drm_edid = sii902x_edid_read(sii902x, connector);
+ drm_edid_connector_update(connector, drm_edid);
+ if (drm_edid) {
+ num = drm_edid_connector_add_modes(connector);
+ drm_edid_free(drm_edid);
}
sii902x->sink_is_hdmi = connector->display_info.is_hdmi;
@@ -461,12 +461,12 @@ static enum drm_connector_status sii902x_bridge_detect(struct drm_bridge *bridge
return sii902x_detect(sii902x);
}
-static struct edid *sii902x_bridge_get_edid(struct drm_bridge *bridge,
- struct drm_connector *connector)
+static const struct drm_edid *sii902x_bridge_edid_read(struct drm_bridge *bridge,
+ struct drm_connector *connector)
{
struct sii902x *sii902x = bridge_to_sii902x(bridge);
- return sii902x_get_edid(sii902x, connector);
+ return sii902x_edid_read(sii902x, connector);
}
static u32 *sii902x_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
@@ -510,7 +510,7 @@ static const struct drm_bridge_funcs sii902x_bridge_funcs = {
.disable = sii902x_bridge_disable,
.enable = sii902x_bridge_enable,
.detect = sii902x_bridge_detect,
- .get_edid = sii902x_bridge_get_edid,
+ .edid_read = sii902x_bridge_edid_read,
.atomic_reset = drm_atomic_helper_bridge_reset,
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,