Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	 Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	 Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>,
	 Daniel Vetter <daniel@ffwll.ch>, Rob Clark <robdclark@gmail.com>,
	 Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Sean Paul <sean@poorly.run>,
	 Marijn Suijten <marijn.suijten@somainline.org>,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	 freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/9] drm/connector: hdmi: accept NULL for Audio Infoframe
Date: Mon, 3 Jun 2024 11:09:40 +0200	[thread overview]
Message-ID: <20240603-therapeutic-warm-fox-890bee@houat> (raw)
In-Reply-To: <20240531-bridge-hdmi-connector-v4-1-5110f7943622@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]

Hi,

Sorry for not answering your mail on the previous version sooner.

On Fri, May 31, 2024 at 11:07:24PM GMT, Dmitry Baryshkov wrote:
> Allow passing NULL as audio infoframe as a way to disable Audio
> Infoframe generation.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/gpu/drm/display/drm_hdmi_state_helper.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> index ce96837eea65..5356723d21f5 100644
> --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> @@ -681,7 +681,7 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_update_infoframes);
>  /**
>   * drm_atomic_helper_connector_hdmi_update_audio_infoframe - Update the Audio Infoframe
>   * @connector: A pointer to the HDMI connector
> - * @frame: A pointer to the audio infoframe to write
> + * @frame: A pointer to the audio infoframe to write or NULL to disable sending the frame

I'm still two-minded about this. I think I would like a separate helper
better, to also make things consistent with the HDMI helpers.

Most importantly, it looks like you're not using it at all in your series?

>   * This function is meant for HDMI connector drivers to update their
>   * audio infoframe. It will typically be used in one of the ALSA hooks
> @@ -704,10 +704,16 @@ drm_atomic_helper_connector_hdmi_update_audio_infoframe(struct drm_connector *co
>  
>  	mutex_lock(&connector->hdmi.infoframes.lock);
>  
> -	memcpy(&infoframe->data, frame, sizeof(infoframe->data));
> -	infoframe->set = true;
> +	if (frame) {
> +		memcpy(&infoframe->data, frame, sizeof(infoframe->data));
> +		infoframe->set = true;
> +
> +		ret = write_infoframe(connector, infoframe);
> +	} else {
> +		infoframe->set = false;
>  
> -	ret = write_infoframe(connector, infoframe);
> +		ret = clear_infoframe(connector, infoframe);
> +	}

We should probably clear infoframe->data here too

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

  reply	other threads:[~2024-06-03  9:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 20:07 [PATCH v4 0/9] drm/msm: make use of the HDMI connector infrastructure Dmitry Baryshkov
2024-05-31 20:07 ` [PATCH v4 1/9] drm/connector: hdmi: accept NULL for Audio Infoframe Dmitry Baryshkov
2024-06-03  9:09   ` Maxime Ripard [this message]
2024-06-03 10:04     ` Dmitry Baryshkov
2024-05-31 20:07 ` [PATCH v4 2/9] drm/bridge-connector: switch to using drmm allocations Dmitry Baryshkov
2024-05-31 20:07 ` [PATCH v4 3/9] drm/bridge-connector: implement glue code for HDMI connector Dmitry Baryshkov
2024-06-03  9:14   ` Maxime Ripard
2024-05-31 20:07 ` [PATCH v4 4/9] drm/msm/hdmi: switch to atomic bridge callbacks Dmitry Baryshkov
2024-05-31 20:07 ` [PATCH v4 5/9] drm/msm/hdmi: turn mode_set into atomic_enable Dmitry Baryshkov
2024-06-03  7:50   ` Maxime Ripard
2024-05-31 20:07 ` [PATCH v4 6/9] drm/msm/hdmi: make use of the drm_connector_hdmi framework Dmitry Baryshkov
2024-06-03  9:16   ` Maxime Ripard
2024-05-31 20:07 ` [PATCH v4 7/9] drm/msm/hdmi: get rid of hdmi_mode Dmitry Baryshkov
2024-06-03  7:50   ` Maxime Ripard
2024-05-31 20:07 ` [PATCH v4 8/9] drm/msm/hdmi: update HDMI_GEN_PKT_CTRL_GENERIC0_UPDATE definition Dmitry Baryshkov
2024-05-31 20:07 ` [PATCH v4 9/9] drm/msm/hdmi: also send the SPD and HDMI Vendor Specific InfoFrames Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240603-therapeutic-warm-fox-890bee@houat \
    --to=mripard@kernel.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=rfoss@kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox