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>,
"Simona Vetter" <simona@ffwll.ch>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>, "Phong LE" <ple@baylibre.com>,
"Inki Dae" <inki.dae@samsung.com>,
"Seung-Woo Kim" <sw0312.kim@samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Russell King" <linux@armlinux.org.uk>,
"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Alain Volmat" <alain.volmat@foss.st.com>,
"Raphael Gallais-Pou" <rgallaispou@gmail.com>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Maíra Canal" <mcanal@igalia.com>,
"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v5 8/9] drm/vc4: hdmi: switch to using generic HDMI Codec infrastructure
Date: Mon, 2 Dec 2024 14:20:04 +0100 [thread overview]
Message-ID: <20241202-industrious-unnatural-beagle-7da5d4@houat> (raw)
In-Reply-To: <20241201-drm-bridge-hdmi-connector-v5-8-b5316e82f61a@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]
Hi,
Sorry, I've been drowning under work and couldn't review that series before.
I'll review the driver API for now, and we can focus on the exact
implementation later on.
On Sun, Dec 01, 2024 at 02:44:12AM +0200, Dmitry Baryshkov wrote:
> Drop driver-specific implementation and use the generic HDMI Codec
> framework in order to implement the HDMI audio support.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/vc4/vc4_hdmi.c | 68 ++++++++++--------------------------------
> drivers/gpu/drm/vc4/vc4_hdmi.h | 2 --
> 2 files changed, 15 insertions(+), 55 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 7295834e75fb1ab0cd241ed274e675567e66870b..d0a9aff7ad43016647493263c00d593296a1e3ad 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -595,6 +595,9 @@ static int vc4_hdmi_connector_init(struct drm_device *dev,
> if (vc4_hdmi->variant->supports_hdr)
> max_bpc = 12;
>
> + connector->hdmi_codec.max_i2s_channels = 8;
> + connector->hdmi_codec.i2s = 1;
> +
I guess it's a similar discussion than we had with HDMI2.0+ earlier
today, but I don't really like initializing by structs. Struct fields
are easy to miss, and can be easily uninitialized by mistake.
I think I'd prefer to have them as argument to the init function. And if
they are optional, we can explicitly mark them as unused.
Like, it looks like the get_dai_id implementation relies on it being set
to < 0 for it to be ignored, but it's not here, so I'd assume it's used
with an ID of 0, even though the driver didn't support get_dai_id so
far?
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2024-12-02 13:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 0:44 [PATCH v5 0/9] drm: add DRM HDMI Codec framework Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 1/9] ASoC: hdmi-codec: pass data to get_dai_id too Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 2/9] ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata Dmitry Baryshkov
2024-12-02 12:06 ` Maxime Ripard
2024-12-02 12:59 ` Mark Brown
2024-12-02 13:29 ` Maxime Ripard
2024-12-02 13:39 ` Mark Brown
2024-12-02 14:59 ` Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 3/9] drm/connector: implement generic HDMI codec helpers Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 4/9] drm/bridge: connector: add support for HDMI codec framework Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 5/9] drm/bridge: lt9611: switch to using the DRM " Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 6/9] drm/display/hdmi: implement connector update functions Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 7/9] drm/bridge_connector: hook drm_atomic_helper_connector_hdmi_update_edid() Dmitry Baryshkov
2024-12-03 14:25 ` Jani Nikula
2024-12-04 3:18 ` Dmitry Baryshkov
2024-12-04 7:42 ` Jani Nikula
2024-12-04 23:17 ` Dmitry Baryshkov
2024-12-01 0:44 ` [PATCH v5 8/9] drm/vc4: hdmi: switch to using generic HDMI Codec infrastructure Dmitry Baryshkov
2024-12-02 13:20 ` Maxime Ripard [this message]
2024-12-03 12:19 ` Dmitry Baryshkov
2024-12-06 14:11 ` Maxime Ripard
2024-12-01 0:44 ` [PATCH v5 9/9] drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_update_edid() Dmitry Baryshkov
2024-12-02 13:27 ` Maxime Ripard
2024-12-03 12:27 ` Dmitry Baryshkov
2024-12-03 14:32 ` Jani Nikula
2024-12-06 14:23 ` mripard
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=20241202-industrious-unnatural-beagle-7da5d4@houat \
--to=mripard@kernel.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=alain.volmat@foss.st.com \
--cc=alim.akhtar@samsung.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=chunkuang.hu@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=inki.dae@samsung.com \
--cc=jani.nikula@linux.intel.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel-list@raspberrypi.com \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mcanal@igalia.com \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=perex@perex.cz \
--cc=ple@baylibre.com \
--cc=rfoss@kernel.org \
--cc=rgallaispou@gmail.com \
--cc=simona@ffwll.ch \
--cc=sw0312.kim@samsung.com \
--cc=tiwai@suse.com \
--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