From: sashiko-bot@kernel.org
To: "Jonas Karlman" <jonas@kwiboo.se>
Cc: imx@lists.linux.dev, linux-sunxi@lists.linux.dev,
neil.armstrong@linaro.org, linux-amlogic@lists.infradead.org,
Frank.Li@kernel.org
Subject: Re: [PATCH v7 13/23] drm: bridge: dw_hdmi: Use dw_hdmi_connector_status_update()
Date: Mon, 18 May 2026 18:47:48 +0000 [thread overview]
Message-ID: <20260518184748.CDC7EC2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260518180206.2480119-14-jonas@kwiboo.se>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The CEC physical address is no longer set when the connector status is `connector_status_unknown`, breaking CEC functionality for displays with unreliable HPD.
- [High] Unconditional EDID read over I2C in `detect()` ignores the `force` parameter, causing severe performance degradation and I2C spam.
--
commit d5d270011a2b02f003218ae7b96f62fae2b447e9
Author: Jonas Karlman <jonas@kwiboo.se>
drm: bridge: dw_hdmi: Use dw_hdmi_connector_status_update()
This commit updates the dw-hdmi connector to fetch EDID and update CEC
physical addresses during detect and force functions rather than in get_modes.
It aims to ensure userspace always has access to the latest read EDID.
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
[ ... ]
> @@ -2473,36 +2473,36 @@ dw_hdmi_connector_status_update(struct dw_hdmi *hdmi,
[ ... ]
> drm_edid = dw_hdmi_edid_read(hdmi, connector);
> drm_edid_connector_update(connector, drm_edid);
> drm_edid_free(drm_edid);
>
> - cec_notifier_set_phys_addr(hdmi->cec_notifier,
> - connector->display_info.source_physical_address);
> + if (status == connector_status_connected)
> + cec_notifier_set_phys_addr(hdmi->cec_notifier,
> + connector->display_info.source_physical_address);
> }
Does this break CEC functionality for displays with unreliable HPD?
By guarding the cec_notifier_set_phys_addr() call with a check for
connector_status_connected, the CEC physical address update is skipped if the
status evaluates to connector_status_unknown.
Previously, this was called unconditionally after a successful EDID read,
which allowed CEC to work even when HPD was unreliable.
> static enum drm_connector_status
> dw_hdmi_connector_detect(struct drm_connector *connector, bool force)
> {
> - struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
> - connector);
> + struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector);
> enum drm_connector_status status;
>
> status = dw_hdmi_detect(hdmi);
>
> - if (status == connector_status_disconnected)
> - cec_notifier_phys_addr_invalidate(hdmi->cec_notifier);
> + dw_hdmi_connector_status_update(hdmi, connector, status);
Will this cause performance issues by performing unconditional I2C EDID reads
on every detect call?
The dw_hdmi_connector_status_update() function reads the EDID over I2C unless
the status is disconnected, but this completely ignores the force parameter
passed to detect. If a system-wide hotplug event occurs on another port,
drm_helper_hpd_irq_event() will call detect with force=false on all HPD-capable
connectors.
Could this trigger an unnecessary 20-50ms I2C EDID read here, spamming the I2C
bus and blocking the shared KMS system workqueue?
>
> return status;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260518180206.2480119-1-jonas@kwiboo.se?part=13
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-05-18 18:47 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 18:01 [PATCH v7 00/23] drm: bridge: dw_hdmi: Misc enable/disable, CEC and EDID cleanup Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 01/23] drm: bridge: dw_hdmi: Disable scrambler feature when not supported Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 02/23] drm: bridge: dw_hdmi: Only notify connected status on HPD interrupt Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 03/23] drm: bridge: dw_hdmi: Free IRQ before CEC adapter is unregistered Jonas Karlman
2026-05-18 18:33 ` sashiko-bot
2026-05-19 6:21 ` Hans Verkuil
2026-05-18 18:01 ` [PATCH v7 04/23] drm: bridge: dw_hdmi: Hold bridge ref until connector cleanup Jonas Karlman
2026-05-19 12:06 ` Luca Ceresoli
2026-05-19 15:18 ` Jonas Karlman
2026-05-20 6:45 ` Luca Ceresoli
2026-05-20 9:38 ` Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 05/23] drm: bridge: dw_hdmi: Call poweron/poweroff from atomic enable/disable Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 06/23] drm: bridge: dw_hdmi: Use passed mode instead of stored previous_mode Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 07/23] drm: bridge: dw_hdmi: Fold poweron and setup functions Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 08/23] drm: bridge: dw_hdmi: Remove previous_mode and mode_set Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 09/23] drm: bridge: dw_hdmi: Unregister CEC notifier during connector cleanup Jonas Karlman
2026-05-19 6:22 ` Hans Verkuil
2026-05-19 12:06 ` Luca Ceresoli
2026-05-18 18:01 ` [PATCH v7 10/23] drm: bridge: dw_hdmi: Invalidate CEC phys addr from connector detect Jonas Karlman
2026-05-19 6:25 ` Hans Verkuil
2026-05-18 18:01 ` [PATCH v7 11/23] drm: bridge: dw_hdmi: Remove cec_notifier_mutex Jonas Karlman
2026-05-19 6:28 ` Hans Verkuil
2026-05-18 18:01 ` [PATCH v7 12/23] drm: bridge: dw_hdmi: Extract dw_hdmi_connector_status_update() Jonas Karlman
2026-05-19 6:26 ` Hans Verkuil
2026-05-18 18:01 ` [PATCH v7 13/23] drm: bridge: dw_hdmi: Use dw_hdmi_connector_status_update() Jonas Karlman
2026-05-18 18:47 ` sashiko-bot [this message]
2026-05-19 6:29 ` Hans Verkuil
2026-05-18 18:01 ` [PATCH v7 14/23] drm: bridge: dw_hdmi: Use display_info is_hdmi and has_audio Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 15/23] drm: bridge: dw_hdmi: Use generic CEC notifier helpers Jonas Karlman
2026-05-18 18:53 ` sashiko-bot
2026-05-19 6:32 ` Hans Verkuil
2026-05-18 18:01 ` [PATCH v7 16/23] drm: bridge: dw_hdmi: Update EDID and CEC phys addr in bridge detect() Jonas Karlman
2026-05-20 9:17 ` Neil Armstrong
2026-05-18 18:01 ` [PATCH v7 17/23] drm: bridge: dw_hdmi: Declare bridge CEC notifier support Jonas Karlman
2026-05-19 6:35 ` Hans Verkuil
2026-05-18 18:01 ` [PATCH v7 18/23] drm: bridge: dw_hdmi: Drop call to drm_bridge_hpd_notify() Jonas Karlman
2026-05-18 19:05 ` sashiko-bot
2026-05-18 18:01 ` [PATCH v7 19/23] drm: bridge: dw_hdmi: Use delayed_work to debounce hotplug event Jonas Karlman
2026-05-18 18:57 ` sashiko-bot
2026-05-20 9:58 ` Neil Armstrong
2026-05-21 20:13 ` Jonas Karlman
2026-05-22 12:35 ` Neil Armstrong
2026-05-18 18:01 ` [PATCH v7 20/23] drm: bridge: dw_hdmi: Rework HDP and RXSENSE interrupt handling Jonas Karlman
2026-05-18 19:08 ` sashiko-bot
2026-05-20 9:59 ` Neil Armstrong
2026-05-18 18:01 ` [PATCH v7 21/23] drm: bridge: dw_hdmi: Remove the empty dw_hdmi_setup_rx_sense() Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 22/23] drm: bridge: dw_hdmi: Remove the empty dw_hdmi_phy_update_hpd() Jonas Karlman
2026-05-18 18:01 ` [PATCH v7 23/23] drm: bridge: dw_hdmi: Merge top and bottom half IRQ handlers Jonas Karlman
2026-05-18 19:10 ` sashiko-bot
2026-05-21 9:14 ` [PATCH v7 00/23] drm: bridge: dw_hdmi: Misc enable/disable, CEC and EDID cleanup Heiko Stuebner
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=20260518184748.CDC7EC2BCB7@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=jonas@kwiboo.se \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=neil.armstrong@linaro.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