From: Daniel Golle <daniel@makrotopia.org>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Dmitry Baryshkov <lumag@kernel.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Hermes Wu <hermes.wu@ite.com.tw>,
Pin-yen Lin <treapking@chromium.org>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
Jiaxin Yu <jiaxin.yu@mediatek.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH v9 00/14] drm/bridge: it6505: DP audio support + shared-DAI hw_params fix
Date: Thu, 19 Nov 2026 23:58:24 +0000 [thread overview]
Message-ID: <cover.1795132452.git.daniel@makrotopia.org> (raw)
Revive HDMI/DP audio support for the it6505, originally posted by
Jiaxin Yu [1], rebased onto current -next with the review feedback
addressed: &client->dev is gone (the driver gained it6505->dev) and
"#sound-dai-cells" has since been added by commit 325af1bef5b9
("dt-bindings: display: bridge: it6505: Add #sound-dai-cells").
Patches 1-12 fix pre-existing bugs found during review of earlier
versions of this series; they carry Fixes: tags and are ordered first
so stable trees can pick them.
Patch 13 wires up the it6505 audio helpers via hdmi_codec_ops,
unblocking the mt8186-mt6366 sound card which references it6505 as
the I2S3 codec. Without it the whole sound card fails to probe, so
speakers, microphone and headset jack don't work either. Patch 14
makes hw_params succeed with no display attached, needed when the I2S
bus is shared with another codec as on MT8186 "steelix" Chromebooks,
where the speaker path must keep working regardless of the it6505
link state.
Earlier revisions were tested on a MT8186 (google,steelix) Chromebook:
the sound card comes up, speakers, microphone and headset jack work.
Angelo tested v6 on the same machine [2]. I no longer have access to
the hardware, so the changes since v6 are build-tested only (clang,
W=1, every patch of the series). HDMI/DP audio output itself could not
be tested for lack of a suitable adapter cable. The error paths fixed
by patches 5-12 (failing register reads, divisions by zero, malformed
DT properties) were not triggered on hardware.
Angelo, could you give v9 another spin on your steelix? The patches
that changed since v6 (2, 4, 6, 8 and 13) don't carry your tags.
Tool use:
All patches of this series were drafted with the help of Claude Code
(Anthropic). I did not keep track of which Claude models were used for
v1-v8; the v9 changes were made with Claude Opus 5.5.
* Patch 13 is based on Jiaxin Yu's v3 [1]. Claude Code rebased it onto
current -next and wrote the audio_lock and mute state serialisation
added since v3 of this series in response to review.
* Patches 1-12 and 14 address findings of the Sashiko AI review of
earlier revisions, most of them pre-existing defects. For each
revision I handed the complete Sashiko review to Claude Code, which
assessed the findings, wrote fixes for the valid ones and pointed out
those that were out of scope or invalid (see the changelog below).
I reviewed the resulting changes.
* Commit messages and cover letters were partially drafted by Claude
Code and edited by me.
[1] https://lore.kernel.org/all/20230730180803.22570-4-jiaxin.yu@mediatek.com/
[2] https://lore.kernel.org/all/7eebbd9b-3a5e-4d95-bbbb-8ba3a7238383@collabora.com/
---
v9:
* describe tool use in the cover letter instead of Assisted-by:
trailers, as Documentation/process/generated-content.rst now asks
* patch 4: track the DP AUX registration in a flag, serialised by a
new mutex, instead of relying on drm_dp_aux_unregister() doing
nothing for an unregistered adapter (Luca Ceresoli)
* patch 6: read and acknowledge the interrupt status registers with
single regmap bulk transfers; int_status[] becomes u8, dropping the
casts (Luca Ceresoli)
* patch 8: drop the audio input FS debug print and its register read
instead of guarding the division; retitled; the commit message now
describes the register as confirmed by Hermes Wu (Luca Ceresoli)
* patches 1, 2, 3, 5 and 7: collected Luca's Reviewed-by
* patches 1, 3, 5, 7, 9-12 and 14: carry Angelo's Reviewed-by and
Tested-by given for v6 [2], which v7 and v8 failed to pick up; the
patches that changed since (2, 4, 6, 8 and 13) don't carry them,
patch 5 only gained newlines in its messages
* rebased onto next-20261119
* patches 9-14: no changes
v8:
* patch 4: keep the DP AUX unregister in remove() as well, so an i2c
unbind waits for in-flight AUX device users before the regmap is
freed; flagged by the Sashiko AI review of v7
* patch 5: terminate the new dev_err() messages with a newline
* patch 13: it6505_poweron() sets the powered flag and runs the
logic reset and init sequence under audio_lock, closing a race
with the delayed enable work flagged by the Sashiko AI review of
v7; newline for the new dev_err() message
* rebased onto next-20260925
* patches 1-3, 6-12 and 14: no changes
v7:
* new patch 2: cancel link_works, hdcp_wait_ksv_list and hdcp_work
in it6505_poweroff() so link training and HDCP authentication
cannot run into a chip being powered off; pre-existing, found
while assessing the Sashiko AI review of v6
* patch 13 (was 12): it6505_poweroff() clears the powered flag
under audio_lock, closing the race between the codec ops and a
concurrent power-off flagged by the Sashiko AI review of v6; the
it6505_enable_audio() wrapper is folded into the delayed work
* the remaining v6 review findings are already fixed by later
patches of this series (patches 3, 4, 6, 8, 11 and 12), concern
pre-existing code outside its scope (whole-register restore in
it6505_audio_input(), unchecked reads in it6505_aux_i2c_wait()
and it6505_calc_video_info(), regulator disable order) or do not
apply (AUX unregister on unbind, missing newline in dev_err())
* rebased onto next-20260923
* patches 1, 3-12 and 14: no changes
v6:
* patch 1: track notifier registration in a flag instead of
clearing notifier_call, which a chain traversal racing the
unregistration could have called as NULL (extcon traverses its
raw notifier chain unlocked); flagged by Sashiko AI review of v5.
The in-flight-callback race also flagged there is an extcon core
limitation affecting all its consumers and cannot be closed from
a consumer driver.
* patch 4: note that a failed regulator_disable() leaks the
reference either way
* new patches 10 and 11: two more pre-existing fixes from v5
review, an uninitialised link-frequencies value and an error
code written back to the reset register
* patches 2, 3, 5-9, 12 and 13: no changes
v5:
* patch 1: serialise notifier registration state with extcon_lock
* patch 2: also drop the runtime PM usage ref held for a connected
display; retitled
* new patches 3-7 and 9: more pre-existing fixes from v4 review
(AUX unregister symmetry, poweroff error path, IRQ status read
errors, two divisions by zero, of_node_put before use)
* patch 10 (was 4): update plugged_cb/codec_dev under mode_lock
* patches 8 and 11: no changes
v4:
* patch 1: quiesce extcon notifier and IRQ before cancelling work,
initialise extcon_wq in probe; retitled
* new patch 2: disable runtime PM on remove
* patch 3 (was 2): collected Chen-Yu Tsai's Reviewed-by
* patch 4 (was 3): start out muted; mute state and cached
parameters updated under audio_lock; unregister codec after
quiesce
* patch 5 (was 4): apply audio defaults at probe time
v3:
* new patches 1 and 2, fixing a pre-existing use-after-free on
remove() and an out-of-bounds read with channel_count == 0
* patch 3 (was 1): serialise audio enable/disable with audio_lock;
track mute state so the FIFO-error IRQ cannot undo a mute
* patch 4 (was 2): no changes
v2:
* keep and unregister the hdmi-codec platform_device on remove
* initialise delayed_audio before registering the codec device
* cancel delayed_audio synchronously on shutdown and remove
* disable audio immediately when muting
* patch 2: drop the encoder check instead of returning 0 early
v1: https://lore.kernel.org/all/cover.1784393979.git.daniel@makrotopia.org/
v2: https://lore.kernel.org/all/cover.1784561622.git.daniel@makrotopia.org/
v3: https://lore.kernel.org/all/cover.1784600387.git.daniel@makrotopia.org/
v4: https://lore.kernel.org/all/cover.1784681487.git.daniel@makrotopia.org/
v5: https://lore.kernel.org/all/cover.1784717129.git.daniel@makrotopia.org/
v6: https://lore.kernel.org/all/cover.1784947240.git.daniel@makrotopia.org/
v7: https://lore.kernel.org/all/cover.1790275151.git.daniel@makrotopia.org/
v8: https://lore.kernel.org/all/cover.1790552614.git.daniel@makrotopia.org/
Daniel Golle (13):
drm/bridge: it6505: quiesce event sources and work on remove()
drm/bridge: it6505: quiesce work items before powering off
drm/bridge: it6505: balance and disable runtime PM on remove
drm/bridge: it6505: unregister DP AUX adapter on bridge detach
drm/bridge: it6505: complete poweroff even if disabling regulators
fails
drm/bridge: it6505: bail out of the IRQ handler when status reads fail
drm/bridge: it6505: avoid division by zero in pixel clock calculation
drm/bridge: it6505: drop the audio input FS debug print
drm/bridge: it6505: guard against zero channel count in audio
infoframe
drm/bridge: it6505: hold endpoint OF node reference while parsing it
drm/bridge: it6505: reject a too short link-frequencies property
drm/bridge: it6505: don't write an error code back to the reset
register
drm/bridge: it6505: Don't reject audio hw_params without an encoder
Jiaxin Yu (1):
drm/bridge: it6505: Add audio support
drivers/gpu/drm/bridge/ite-it6505.c | 323 ++++++++++++++++++++--------
1 file changed, 239 insertions(+), 84 deletions(-)
base-commit: adcad7f4e6332cff3d6d7165f41584899f598534
--
2.56.1
next reply other threads:[~2026-11-19 23:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 23:58 Daniel Golle [this message]
2026-11-19 23:58 ` [PATCH v9 01/14] drm/bridge: it6505: quiesce event sources and work on remove() Daniel Golle
2026-11-19 23:59 ` [PATCH v9 02/14] drm/bridge: it6505: quiesce work items before powering off Daniel Golle
2026-11-19 23:59 ` [PATCH v9 03/14] drm/bridge: it6505: balance and disable runtime PM on remove Daniel Golle
2026-11-19 23:59 ` [PATCH v9 04/14] drm/bridge: it6505: unregister DP AUX adapter on bridge detach Daniel Golle
2026-11-19 23:59 ` [PATCH v9 05/14] drm/bridge: it6505: complete poweroff even if disabling regulators fails Daniel Golle
2026-11-20 0:02 ` [PATCH v9 06/14] drm/bridge: it6505: bail out of the IRQ handler when status reads fail Daniel Golle
2026-11-20 0:03 ` [PATCH v9 07/14] drm/bridge: it6505: avoid division by zero in pixel clock calculation Daniel Golle
2026-11-20 0:03 ` [PATCH v9 08/14] drm/bridge: it6505: drop the audio input FS debug print Daniel Golle
2026-11-20 0:04 ` [PATCH v9 09/14] drm/bridge: it6505: guard against zero channel count in audio infoframe Daniel Golle
2026-11-20 0:04 ` [PATCH v9 10/14] drm/bridge: it6505: hold endpoint OF node reference while parsing it Daniel Golle
2026-11-20 0:05 ` [PATCH v9 11/14] drm/bridge: it6505: reject a too short link-frequencies property Daniel Golle
2026-11-20 0:05 ` [PATCH v9 12/14] drm/bridge: it6505: don't write an error code back to the reset register Daniel Golle
2026-11-20 0:06 ` [PATCH v9 13/14] drm/bridge: it6505: Add audio support Daniel Golle
2026-11-20 0:06 ` [PATCH v9 14/14] drm/bridge: it6505: Don't reject audio hw_params without an encoder Daniel Golle
2026-11-20 0:12 ` [PATCH v9 00/14] drm/bridge: it6505: DP audio support + shared-DAI hw_params fix Daniel Golle
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=cover.1795132452.git.daniel@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hermes.wu@ite.com.tw \
--cc=jernej.skrabec@gmail.com \
--cc=jiaxin.yu@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=luca.ceresoli@bootlin.com \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=treapking@chromium.org \
--cc=tzimmermann@suse.de \
--cc=wenst@chromium.org \
/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