summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-07-31 11:12:27 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-01-12 13:21:46 +0000
commit3d39d8535a18e57cb726a2ac67e7e0ed6b271054 (patch)
treeb62ee2e8fad5aa0f40f8120bb5a5f25b8e9b7131
parente9825d53b054e750d88f80cd7285e80d7a5afd07 (diff)
drm/i2c: tda998x: add support for writing SPDdrm-tda998x-devel
Add support for writing the SPD infoframe to the TDA998x. Identify us as "Generic" vendor "PC" product, and as "PC general" source device information. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 58e41ec575ad..63b1d501768b 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -855,6 +855,23 @@ static void tda998x_write_aif(struct tda998x_priv *priv,
tda998x_write_if(priv, DIP_IF_FLAGS_IF4, REG_IF4_HB0, &frame);
}
+static void tda998x_write_spd(struct tda998x_priv *priv)
+{
+ union hdmi_infoframe frame;
+ int ret;
+
+ ret = hdmi_spd_infoframe_init(&frame.spd, "Generic", "PC");
+ if (ret < 0) {
+ dev_err(&priv->hdmi->dev, "failed to fill SPD infoframe: %d\n",
+ ret);
+ return;
+ }
+
+ frame.spd.sdi = HDMI_SPD_SDI_PC;
+
+ tda998x_write_if(priv, DIP_IF_FLAGS_IF3, REG_IF3_HB0, &frame);
+}
+
static void
tda998x_write_avi(struct tda998x_priv *priv, const struct drm_display_mode *mode)
{
@@ -1694,6 +1711,7 @@ static void tda998x_bridge_mode_set(struct drm_bridge *bridge,
reg_set(priv, REG_TX33, TX33_HDMI);
tda998x_write_avi(priv, adjusted_mode);
+ tda998x_write_spd(priv);
tda998x_write_vsi(priv, adjusted_mode);
if (priv->sink_has_audio)