From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: 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>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org
Cc: Christian Hewitt <christianshewitt@gmail.com>,
Diederik de Haas <diederik@cknow-tech.com>,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Jonas Karlman <jonas@kwiboo.se>
Subject: Re: [PATCH v3 13/13] drm: bridge: dw_hdmi: Use display_info is_hdmi and has_audio
Date: Tue, 28 Apr 2026 14:01:04 +0200 [thread overview]
Message-ID: <Ett9239dT8CYvJWa5dmvqA@collabora.com> (raw)
In-Reply-To: <20260403185303.80748-14-jonas@kwiboo.se>
On Friday, 3 April 2026 20:52:59 Central European Summer Time Jonas Karlman wrote:
> drm_edid_connector_update() is being called from bridge connector funcs
> and from detect and force funcs for dw-hdmi connector.
>
> Change to use is_hdmi and has_audio from display_info directly instead
> of keeping our own state in sink_is_hdmi and sink_has_audio.
>
> Also remove the old and unused edid struct member and related define.
>
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> v3: No change
> v2: Collect r-b tag
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 32 ++++-------------------
> 1 file changed, 5 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 5b5654ef6015..fecbc386871d 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -44,8 +44,6 @@
> #define DDC_CI_ADDR 0x37
> #define DDC_SEGMENT_ADDR 0x30
>
> -#define HDMI_EDID_LEN 512
> -
> /* DW-HDMI Controller >= 0x200a are at least compliant with SCDC version 1 */
> #define SCDC_MIN_SOURCE_VERSION 0x1
>
> @@ -147,8 +145,6 @@ struct dw_hdmi {
>
> int vic;
>
> - u8 edid[HDMI_EDID_LEN];
> -
> struct {
> const struct dw_hdmi_phy_ops *ops;
> const char *name;
> @@ -158,8 +154,6 @@ struct dw_hdmi {
>
> struct i2c_adapter *ddc;
> void __iomem *regs;
> - bool sink_is_hdmi;
> - bool sink_has_audio;
>
> struct pinctrl *pinctrl;
> struct pinctrl_state *default_state;
> @@ -2057,7 +2051,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
> HDMI_FC_INVIDCONF_IN_I_P_INTERLACED :
> HDMI_FC_INVIDCONF_IN_I_P_PROGRESSIVE;
>
> - inv_val |= hdmi->sink_is_hdmi ?
> + inv_val |= display->is_hdmi ?
> HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE :
> HDMI_FC_INVIDCONF_DVI_MODEZ_DVI_MODE;
>
> @@ -2293,7 +2287,7 @@ static int dw_hdmi_poweron(struct dw_hdmi *hdmi,
> if (hdmi->hdmi_data.enc_out_bus_format == MEDIA_BUS_FMT_FIXED)
> hdmi->hdmi_data.enc_out_bus_format = MEDIA_BUS_FMT_RGB888_1X24;
>
> - hdmi->hdmi_data.rgb_limited_range = hdmi->sink_is_hdmi &&
> + hdmi->hdmi_data.rgb_limited_range = display->is_hdmi &&
> drm_default_rgb_quant_range(mode) ==
> HDMI_QUANTIZATION_RANGE_LIMITED;
>
> @@ -2313,7 +2307,7 @@ static int dw_hdmi_poweron(struct dw_hdmi *hdmi,
> /* HDMI Initialization Step B.3 */
> dw_hdmi_enable_video_path(hdmi);
>
> - if (hdmi->sink_has_audio) {
> + if (display->has_audio) {
> dev_dbg(hdmi->dev, "sink has audio support\n");
>
> /* HDMI Initialization Step E - Configure audio */
> @@ -2322,7 +2316,7 @@ static int dw_hdmi_poweron(struct dw_hdmi *hdmi,
> }
>
> /* not for DVI mode */
> - if (hdmi->sink_is_hdmi) {
> + if (display->is_hdmi) {
> dev_dbg(hdmi->dev, "%s HDMI mode\n", __func__);
>
> /* HDMI Initialization Step F - Configure AVI InfoFrame */
> @@ -2436,29 +2430,13 @@ static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi,
> struct drm_connector *connector)
> {
> const struct drm_edid *drm_edid;
> - const struct edid *edid;
>
> if (!hdmi->ddc)
> return NULL;
>
> drm_edid = drm_edid_read_ddc(connector, hdmi->ddc);
> - if (!drm_edid) {
> + if (!drm_edid)
> dev_dbg(hdmi->dev, "failed to get edid\n");
> - return NULL;
> - }
> -
> - /*
> - * FIXME: This should use connector->display_info.is_hdmi and
> - * connector->display_info.has_audio from a path that has read the EDID
> - * and called drm_edid_connector_update().
> - */
> - edid = drm_edid_raw(drm_edid);
> -
> - dev_dbg(hdmi->dev, "got edid: width[%d] x height[%d]\n",
> - edid->width_cm, edid->height_cm);
> -
> - hdmi->sink_is_hdmi = drm_detect_hdmi_monitor(edid);
> - hdmi->sink_has_audio = drm_detect_monitor_audio(edid);
>
> return drm_edid;
> }
>
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2026-04-28 12:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 18:52 [PATCH v3 00/13] drm: bridge: dw_hdmi: Misc enable/disable, CEC and EDID cleanup Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 01/13] drm: bridge: dw_hdmi: Disable scrambler feature when not supported Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 02/13] drm: bridge: dw_hdmi: Only notify connected status on HPD interrupt Jonas Karlman
2026-04-27 18:04 ` Nicolas Frattaroli
2026-04-03 18:52 ` [PATCH v3 03/13] drm: bridge: dw_hdmi: Call poweron/poweroff from atomic enable/disable Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 04/13] drm: bridge: dw_hdmi: Use passed mode instead of stored previous_mode Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 05/13] drm: bridge: dw_hdmi: Fold poweron and setup functions Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 06/13] drm: bridge: dw_hdmi: Remove previous_mode and mode_set Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 07/13] drm: bridge: dw_hdmi: Invalidate CEC phys addr from connector detect Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 08/13] drm: bridge: dw_hdmi: Remove cec_notifier_mutex Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 09/13] drm: bridge: dw_hdmi: Use delayed_work to debounce hotplug event Jonas Karlman
2026-04-27 18:27 ` Nicolas Frattaroli
2026-04-28 12:38 ` Dmitry Baryshkov
2026-04-28 19:34 ` Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 10/13] drm: bridge: dw_hdmi: Use drm_connector_helper_hpd_irq_event() Jonas Karlman
2026-04-28 12:40 ` Dmitry Baryshkov
2026-04-28 18:59 ` Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 11/13] drm: bridge: dw_hdmi: Extract dw_hdmi_connector_status_update() Jonas Karlman
2026-04-28 11:42 ` Nicolas Frattaroli
2026-04-03 18:52 ` [PATCH v3 12/13] drm: bridge: dw_hdmi: Use dw_hdmi_connector_status_update() Jonas Karlman
2026-04-28 11:53 ` Nicolas Frattaroli
2026-04-28 12:42 ` Dmitry Baryshkov
2026-04-28 18:53 ` Jonas Karlman
2026-04-03 18:52 ` [PATCH v3 13/13] drm: bridge: dw_hdmi: Use display_info is_hdmi and has_audio Jonas Karlman
2026-04-28 12:01 ` Nicolas Frattaroli [this message]
2026-04-12 15:52 ` [PATCH v3 00/13] drm: bridge: dw_hdmi: Misc enable/disable, CEC and EDID cleanup Bob McChesney
2026-04-12 16:36 ` Bob McChesney
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=Ett9239dT8CYvJWa5dmvqA@collabora.com \
--to=nicolas.frattaroli@collabora.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=christianshewitt@gmail.com \
--cc=diederik@cknow-tech.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--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