summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-12-05 15:51:45 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2019-06-13 21:55:12 +0100
commit45a19dd397886a9591110c0e9ba7e058393a395d (patch)
treeb1a68d50d8ad378d939b5f71cb5dd63e385242ad
parentfcc22c5f9ddaa8d1bb051878cc7e5f928b9973d8 (diff)
drm/i2c: tda998x: add vendor specific infoframe supportfor-airlie-tda998x
Add support for the vendor specific infoframe. Reviewed-by: Brian Starkey <brian.starkey@arm.com> Tested-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 2d69aef556a5..3d368c43185f 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -877,6 +877,19 @@ tda998x_write_avi(struct tda998x_priv *priv, const struct drm_display_mode *mode
tda998x_write_if(priv, DIP_IF_FLAGS_IF2, REG_IF2_HB0, &frame);
}
+static void tda998x_write_vsi(struct tda998x_priv *priv,
+ const struct drm_display_mode *mode)
+{
+ union hdmi_infoframe frame;
+
+ if (drm_hdmi_vendor_infoframe_from_display_mode(&frame.vendor.hdmi,
+ &priv->connector,
+ mode))
+ reg_clear(priv, REG_DIP_IF_FLAGS, DIP_IF_FLAGS_IF1);
+ else
+ tda998x_write_if(priv, DIP_IF_FLAGS_IF1, REG_IF1_HB0, &frame);
+}
+
/* Audio support */
static const struct tda998x_audio_route tda998x_audio_route[AUDIO_ROUTE_NUM] = {
@@ -1654,6 +1667,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_vsi(priv, adjusted_mode);
if (priv->sink_has_audio)
tda998x_configure_audio(priv);