From: sashiko-bot@kernel.org
To: "Michal Wilczynski" <m.wilczynski@samsung.com>
Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v8 11/18] drm/bridge: inno-hdmi: Make the PHY configuration table optional
Date: Tue, 24 Nov 2026 16:05:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-231527@kernel.org> (raw)
In-Reply-To: <20261124-jh7110-clean-send-v8-11-de92635dd857@samsung.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/bridge: inno-hdmi: unguarded integrated-PHY writes when
phy_configs is NULL
--
commit 564121a85c49ce8805925601abb5a8678ff40505
Author: Michal Wilczynski <m.wilczynski@samsung.com>
drm/bridge: inno-hdmi: Make the PHY configuration table optional
This commit allows platforms with an external PHY to omit the integrated
PHY configuration table and skips the table lookup and PHY register writes
in inno_hdmi_power_up() and inno_hdmi_bridge_mode_valid() when the table
is absent.
> diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
> index 0932ec47f151b..19cea14d14266 100644
> --- a/drivers/gpu/drm/bridge/inno-hdmi.c
> +++ b/drivers/gpu/drm/bridge/inno-hdmi.c
> @@ -533,8 +533,14 @@ static void inno_hdmi_power_up(struct inno_hdmi *hdmi,
> unsigned long mpixelclock)
> {
> struct inno_hdmi_phy_config *phy_config;
> - int ret = inno_hdmi_find_phy_config(hdmi, mpixelclock);
> + int ret;
> +
> + inno_hdmi_sys_power(hdmi, false);
> +
> + if (!hdmi->plat_data->phy_configs)
> + goto out;
>
> + ret = inno_hdmi_find_phy_config(hdmi, mpixelclock);
> if (ret < 0) {
> phy_config = hdmi->plat_data->default_phy_config;
> DRM_DEV_ERROR(hdmi->dev,
> @@ -544,8 +550,6 @@ static void inno_hdmi_power_up(struct inno_hdmi *hdmi,
> phy_config = &hdmi->plat_data->phy_configs[ret];
> }
>
> - inno_hdmi_sys_power(hdmi, false);
> -
> hdmi_writeb(hdmi, HDMI_PHY_PRE_EMPHASIS, phy_config->pre_emphasis);
> hdmi_writeb(hdmi, HDMI_PHY_DRIVER, phy_config->voltage_level_control);
> hdmi_writeb(hdmi, HDMI_PHY_SYS_CTL, 0x15);
> @@ -555,6 +559,7 @@ static void inno_hdmi_power_up(struct inno_hdmi *hdmi,
> hdmi_writeb(hdmi, HDMI_PHY_SYNC, 0x00);
> hdmi_writeb(hdmi, HDMI_PHY_SYNC, 0x01);
>
> +out:
> inno_hdmi_sys_power(hdmi, true);
> };
[Severity: Medium]
Should inno_hdmi_standby() and inno_hdmi_config_video_timing() also skip
writing to the integrated PHY registers when hdmi->plat_data->phy_configs
is NULL?
While inno_hdmi_power_up() skips HDMI_PHY_DRIVER, HDMI_PHY_PRE_EMPHASIS,
HDMI_PHY_CHG_PWR, and HDMI_PHY_SYS_CTL, inno_hdmi_standby() still writes
to those same four registers during probe and bridge disable:
drivers/gpu/drm/bridge/inno-hdmi.c:inno_hdmi_standby() {
inno_hdmi_sys_power(hdmi, false);
hdmi_writeb(hdmi, HDMI_PHY_DRIVER, 0x00);
hdmi_writeb(hdmi, HDMI_PHY_PRE_EMPHASIS, 0x00);
hdmi_writeb(hdmi, HDMI_PHY_CHG_PWR, 0x00);
hdmi_writeb(hdmi, HDMI_PHY_SYS_CTL, 0x15);
}
Similarly, inno_hdmi_config_video_timing() still writes to
HDMI_PHY_PRE_DIV_RATIO, HDMI_PHY_FEEDBACK_DIV_RATIO_LOW, and
HDMI_PHY_FEEDBACK_DIV_RATIO_HIGH on every modeset. If those integrated PHY
registers do not exist on platforms with a separate PHY, or if any of
offsets 0xe0..0xe3 decode to hardware state, inno_hdmi_standby() clears
them and inno_hdmi_power_up() no longer restores them.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-jh7110-clean-send-v8-0-de92635dd857@samsung.com?part=11
next prev parent reply other threads:[~2026-11-24 16:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261124155359eucas1p2f7d4e5137f38415561ce77fd55023466@eucas1p2.samsung.com>
2026-11-24 15:52 ` [PATCH v8 00/18] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 01/18] drm/bridge: inno-hdmi: fix swapped HSYNC and VSYNC polarity Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 02/18] drm/bridge: inno-hdmi: Report hotplug through drm_bridge_hpd_notify() Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 03/18] dt-bindings: display: bridge: Add starfive,jh7110-inno-hdmi-controller Michal Wilczynski
2026-11-24 16:01 ` sashiko-bot
2026-11-24 15:52 ` [PATCH v8 04/18] dt-bindings: display: starfive: Add starfive,jh7110-hdmi-subsystem Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 05/18] dt-bindings: soc: starfive: Add starfive,jh7110-vout-syscon Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 06/18] dt-bindings: display: starfive: Add starfive,jh7110-vout-subsystem Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 07/18] drm/bridge: inno-hdmi: Split probe out of bind Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 08/18] drm/bridge: inno-hdmi: Use a regmap for register access Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 09/18] drm/bridge: inno-hdmi: Add .disable platform operation Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 10/18] drm/bridge: inno-hdmi: Add .mode_valid " Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 11/18] drm/bridge: inno-hdmi: Make the PHY configuration table optional Michal Wilczynski
2026-11-24 16:05 ` sashiko-bot [this message]
2026-11-24 15:52 ` [PATCH v8 12/18] drm/bridge: inno-hdmi: Make the register clock source selectable Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 13/18] drm/bridge: inno-hdmi: Make the supported HDMI version selectable Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 14/18] soc: starfive: Add jh7110-hdmi-subsystem driver Michal Wilczynski
2026-11-24 16:09 ` sashiko-bot
2026-11-24 15:52 ` [PATCH v8 15/18] soc: starfive: Add jh7110-vout-subsystem driver Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 16/18] drm/bridge: starfive: Add JH7110 HDMI controller driver Michal Wilczynski
2026-11-24 15:52 ` [PATCH v8 17/18] riscv: dts: starfive: jh7110: Update DT for display subsystem Michal Wilczynski
2026-11-24 16:12 ` sashiko-bot
2026-11-24 15:52 ` [PATCH v8 18/18] MAINTAINERS: Add StarFive JH7110 display subsystem entry Michal Wilczynski
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=sashiko-outbox-231527@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=m.wilczynski@samsung.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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