Re: [PATCH v3 5/7] drm/msm/hdmi: make use of the drm_connector_hdmi framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, May 30, 2024 at 02:12:28AM GMT, Dmitry Baryshkov wrote:
> Setup the HDMI connector on the MSM HDMI outputs. Make use of
> atomic_check hook and of the provided Infoframe infrastructure.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>

As a general comment: I really like it, it looks super tidy. Thanks!

There's a couple of minor issues below

> -int msm_hdmi_audio_update(struct hdmi *hdmi)
> +static int msm_hdmi_audio_update(struct hdmi *hdmi)
>  {
>  	struct hdmi_audio *audio = &hdmi->audio;
> -	struct hdmi_audio_infoframe *info = &audio->infoframe;
>  	const struct hdmi_msm_audio_arcs *arcs = NULL;
>  	bool enabled = audio->enabled;
>  	uint32_t acr_pkt_ctrl, vbi_pkt_ctrl, aud_pkt_ctrl;
> -	uint32_t infofrm_ctrl, audio_config;
> +	uint32_t audio_config;
> +
> +	if (!hdmi->hdmi_mode)
> +		return -EINVAL;
> +
> +	DBG("audio: enabled=%d, channels=%d, rate=%d",
> +	    audio->enabled, audio->channels, audio->rate);
>  
> -	DBG("audio: enabled=%d, channels=%d, channel_allocation=0x%x, "
> -		"level_shift_value=%d, downmix_inhibit=%d, rate=%d",
> -		audio->enabled, info->channels,  info->channel_allocation,
> -		info->level_shift_value, info->downmix_inhibit, audio->rate);
>  	DBG("video: power_on=%d, pixclock=%lu", hdmi->power_on, hdmi->pixclock);

pixclock should come from the connector state too. It's still calculated
by the driver in msm_hdmi_bridge_mode_set

> @@ -341,8 +425,11 @@ int msm_hdmi_bridge_init(struct hdmi *hdmi)
>  	bridge->funcs = &msm_hdmi_bridge_funcs;
>  	bridge->ddc = hdmi->i2c;
>  	bridge->type = DRM_MODE_CONNECTOR_HDMIA;
> +	bridge->vendor = "Qualcomm";
> +	bridge->product = "Snapdragon";
>  	bridge->ops = DRM_BRIDGE_OP_HPD |
>  		DRM_BRIDGE_OP_DETECT |
> +		DRM_BRIDGE_OP_HDMI |
>  		DRM_BRIDGE_OP_EDID;
>  
>  	ret = devm_drm_bridge_add(hdmi->dev->dev, bridge);

It looks like you're not setting either the supported formats or bpc?

Maxime

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux