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 v3 1/7] drm/connector: hdmi: accept NULL for Audio Infoframe
Date: Thu, 30 May 2024 10:49:26 +0200 [thread overview]
Message-ID: <20240530-daffy-satisfied-sheep-5b9e16@houat> (raw)
In-Reply-To: <20240530-bridge-hdmi-connector-v3-1-a1d184d68fe3@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 2057 bytes --]
Hi,
On Thu, May 30, 2024 at 02:12:24AM 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
> *
> * 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);
> + }
I'm not entirely sure your commit matches your commit log? It looks like
you follow the same pattern than the other infoframes and call
write_infoframe if there's one, or clear_infoframe if there isn't.
So we're never passing NULL to disable? clear_infoframe is called.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2024-05-30 8:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 23:12 [PATCH v3 0/7] drm/msm: make use of the HDMI connector infrastructure Dmitry Baryshkov
2024-05-29 23:12 ` [PATCH v3 1/7] drm/connector: hdmi: accept NULL for Audio Infoframe Dmitry Baryshkov
2024-05-30 8:49 ` Maxime Ripard [this message]
2024-05-30 11:20 ` Dmitry Baryshkov
2024-05-29 23:12 ` [PATCH v3 2/7] drm/bridge-connector: switch to using drmm allocations Dmitry Baryshkov
2024-05-30 8:49 ` Maxime Ripard
2024-05-29 23:12 ` [PATCH v3 3/7] drm/bridge-connector: implement glue code for HDMI connector Dmitry Baryshkov
2024-05-30 9:01 ` Maxime Ripard
2024-05-30 11:29 ` Dmitry Baryshkov
2024-05-29 23:12 ` [PATCH v3 4/7] drm/msm/hdmi: switch to atomic bridge callbacks Dmitry Baryshkov
2024-05-30 9:04 ` Maxime Ripard
2024-05-29 23:12 ` [PATCH v3 5/7] drm/msm/hdmi: make use of the drm_connector_hdmi framework Dmitry Baryshkov
2024-05-30 9:16 ` Maxime Ripard
2024-05-30 11:35 ` Dmitry Baryshkov
2024-05-29 23:12 ` [PATCH v3 6/7] drm/msm/hdmi: update HDMI_GEN_PKT_CTRL_GENERIC0_UPDATE definition Dmitry Baryshkov
2024-05-29 23:12 ` [PATCH v3 7/7] 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=20240530-daffy-satisfied-sheep-5b9e16@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
all inboxes | Powered by JetHome®