[PATCH 3/5] drm/i2c: tda998x: add support for writing SPD

Brian Starkey Brian.Starkey at arm.com
Wed Jan 30 15:41:04 UTC 2019


Hi Russell,

These did eventually reach me on Saturday evening.

On Fri, Jan 25, 2019 at 09:43:19AM +0000, Russell King wrote:
> 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 at armlinux.org.uk>
> ---

As this infoframe is optional, and is intended to provide a "useful"
name to the user, I wonder if there's really much value in just
sending "Generic"/"PC"? It seems that it might be better to just not
send the SPD infoframe until we have a way to put something more
useful there (e.g. specified by the host driver).

Thanks,
-Brian

>  drivers/gpu/drm/i2c/tda998x_drv.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
> index c399a7b73e2b..dad7396ebe2b 100644
> --- a/drivers/gpu/drm/i2c/tda998x_drv.c
> +++ b/drivers/gpu/drm/i2c/tda998x_drv.c
> @@ -845,6 +845,23 @@ static int tda998x_write_aif(struct tda998x_priv *priv,
>  	return 0;
>  }
>  
> +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)
>  {
> @@ -1554,6 +1571,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);
>  
>  		if (priv->audio_params.format != AFMT_UNUSED &&
>  		    priv->sink_has_audio)
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list