Commit 78e90e00 authored by Jani Nikula's avatar Jani Nikula Committed by Robert Foss

drm/i2c: tda998x: switch to struct drm_edid

Prefer struct drm_edid based functions over struct edid.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarRobert Foss <rfoss@kernel.org>
Signed-off-by: default avatarRobert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/485a33bc4eba9daae109d3f4795bc695e026ba0c.1715347488.git.jani.nikula@intel.com
parent 7c585f9a
...@@ -1283,7 +1283,7 @@ static int read_edid_block(void *data, u8 *buf, unsigned int blk, size_t length) ...@@ -1283,7 +1283,7 @@ static int read_edid_block(void *data, u8 *buf, unsigned int blk, size_t length)
static int tda998x_connector_get_modes(struct drm_connector *connector) static int tda998x_connector_get_modes(struct drm_connector *connector)
{ {
struct tda998x_priv *priv = conn_to_tda998x_priv(connector); struct tda998x_priv *priv = conn_to_tda998x_priv(connector);
struct edid *edid; const struct drm_edid *drm_edid;
int n; int n;
/* /*
...@@ -1297,25 +1297,26 @@ static int tda998x_connector_get_modes(struct drm_connector *connector) ...@@ -1297,25 +1297,26 @@ static int tda998x_connector_get_modes(struct drm_connector *connector)
if (priv->rev == TDA19988) if (priv->rev == TDA19988)
reg_clear(priv, REG_TX4, TX4_PD_RAM); reg_clear(priv, REG_TX4, TX4_PD_RAM);
edid = drm_do_get_edid(connector, read_edid_block, priv); drm_edid = drm_edid_read_custom(connector, read_edid_block, priv);
if (priv->rev == TDA19988) if (priv->rev == TDA19988)
reg_set(priv, REG_TX4, TX4_PD_RAM); reg_set(priv, REG_TX4, TX4_PD_RAM);
if (!edid) { drm_edid_connector_update(connector, drm_edid);
cec_notifier_set_phys_addr(priv->cec_notify,
connector->display_info.source_physical_address);
if (!drm_edid) {
dev_warn(&priv->hdmi->dev, "failed to read EDID\n"); dev_warn(&priv->hdmi->dev, "failed to read EDID\n");
return 0; return 0;
} }
drm_connector_update_edid_property(connector, edid);
cec_notifier_set_phys_addr_from_edid(priv->cec_notify, edid);
mutex_lock(&priv->audio_mutex); mutex_lock(&priv->audio_mutex);
n = drm_add_edid_modes(connector, edid); n = drm_edid_connector_add_modes(connector);
priv->sink_has_audio = drm_detect_monitor_audio(edid); priv->sink_has_audio = connector->display_info.has_audio;
mutex_unlock(&priv->audio_mutex); mutex_unlock(&priv->audio_mutex);
kfree(edid); drm_edid_free(drm_edid);
return n; return n;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment