summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-07-31 11:12:27 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2020-08-04 17:42:07 +0100
commita02115cd2d3c77f38fe5f777a69fcb7bba08c489 (patch)
tree1d1fbf86bf84efce6ca2cbedbb39d0e627932fe5
parent495956a04143de9f2f959631eeca7eab0601e59e (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 4c6906d0766c..175341804a2b 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)
{
@@ -1692,6 +1709,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)