All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hans Verkuil" <hverkuil+cisco@kernel.org>
Cc: dri-devel@lists.freedesktop.org, media-ci@linuxtv.org
Subject: Re: [PATCH 01/13] gpu: drm: sti: call cec_notifier_phys_addr_invalidate if no EDID
Date: Mon, 02 Nov 2026 11:02:16 +0000	[thread overview]
Message-ID: <sashiko-outbox-193307@kernel.org> (raw)
In-Reply-To: <86d6a90ff5131a4f6a1edef1d4f1694e65c5b6e6.1793615824.git.hverkuil+cisco@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/sti: incomplete cec_notifier_phys_addr_invalidate() conversion
--

commit 349b68331fa85963a4002deda235cb948b105b27
Author: Hans Verkuil <hverkuil+cisco@kernel.org>

gpu: drm: sti: call cec_notifier_phys_addr_invalidate if no EDID

This commit replaces a cec_notifier_set_phys_addr() call with
cec_notifier_phys_addr_invalidate() in sti_hdmi_disable().

> diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
> index 7ba9e0b7ba6c0..d392140df2357 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -790,7 +790,7 @@ static void sti_hdmi_disable(struct drm_bridge *bridge,
>  
>  	hdmi->enabled = false;
>  
> -	cec_notifier_set_phys_addr(hdmi->notifier, CEC_PHYS_ADDR_INVALID);
> +	cec_notifier_phys_addr_invalidate(hdmi->notifier);
>  }

[Severity: Medium]
The commit message states:

  If an EDID is present, then call cec_notifier_set_phys_addr. If not, then
  call cec_notifier_phys_addr_invalidate. This helps the CEC framework
  differentiate between CEC_PHYS_ADDR_INVALID due to no EDID, or due to an
  EDID without a Physical Address.

  This driver is one of the few that was using cec_notifier_set_phys_addr
  on disconnect instead of cec_notifier_phys_addr_invalidate.

However, this patch only updates sti_hdmi_disable().

In drivers/gpu/drm/sti/sti_hdmi.c, sti_hdmi_connector_detect() still calls
cec_notifier_set_phys_addr() on cable disconnect when hdmi->hpd is false:

	DRM_DEBUG_DRIVER("hdmi cable disconnected\n");
	cec_notifier_set_phys_addr(hdmi->notifier, CEC_PHYS_ADDR_INVALID);
	return connector_status_disconnected;

Additionally, sti_hdmi_connector_get_modes() unconditionally calls
cec_notifier_set_phys_addr() before checking whether drm_edid is NULL:

	drm_edid = drm_edid_read(connector);

	drm_edid_connector_update(connector, drm_edid);

	cec_notifier_set_phys_addr(hdmi->notifier,
				   connector->display_info.source_physical_address);

	if (!drm_edid)
		goto fail;

When drm_edid is NULL, drm_edid_connector_update() sets
source_physical_address to CEC_PHYS_ADDR_INVALID, so
cec_notifier_set_phys_addr(hdmi->notifier, CEC_PHYS_ADDR_INVALID) is still
called when no EDID is present.

Should sti_hdmi_connector_detect() and sti_hdmi_connector_get_modes() also be
updated to call cec_notifier_phys_addr_invalidate() when the cable is
disconnected or when drm_edid is NULL?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1793615824.git.hverkuil+cisco@kernel.org?part=1

  reply	other threads:[~2026-11-02 11:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 10:36 [PATCH 00/13] media/drm: cec: add EDID_PRESENT Hans Verkuil
2026-11-02 10:36 ` [PATCH 01/13] gpu: drm: sti: call cec_notifier_phys_addr_invalidate if no EDID Hans Verkuil
2026-11-02 11:02   ` sashiko-bot [this message]
2026-11-02 10:36 ` [PATCH 02/13] gpu: drm: exynos: " Hans Verkuil
2026-11-02 11:03   ` sashiko-bot
2026-11-02 10:36 ` [PATCH 03/13] gpu: drm: omapdrm: call cec_s_phys_addr only if EDID is present Hans Verkuil
2026-11-02 11:28   ` Tomi Valkeinen
2026-11-02 10:36 ` [PATCH 04/13] media: i2c: adv7511-v4l2: " Hans Verkuil
2026-11-02 10:36 ` [PATCH 05/13] media: cec: extron-da-hd-4k-plus: " Hans Verkuil
2026-11-02 11:05   ` sashiko-bot
2026-11-02 10:36 ` [PATCH 06/13] media: cec: core: improve cec_notifier_phys_addr_invalidate Hans Verkuil
2026-11-02 11:04   ` sashiko-bot
2026-11-02 10:36 ` [PATCH 07/13] media: uapi: cec.h: add CEC_CAP_HAS_EDID_PRESENT/CEC_LOG_ADDRS_FL_EDID_PRESENT Hans Verkuil
2026-11-02 10:36 ` [PATCH 08/13] Documentation: media: document EDID_PRESENT cap and flag Hans Verkuil
2026-11-02 10:37 ` [PATCH 09/13] media: cec: core: add support for EDID_PRESENT Hans Verkuil
2026-11-02 11:13   ` sashiko-bot
2026-11-02 10:37 ` [PATCH 10/13] media: uapi: cec.h: add CEC_EVENT_FL_STATE_EDID_PRESENT flag Hans Verkuil
2026-11-02 10:37 ` [PATCH 11/13] Documentation: media: cec-ioc-dqevent.rst: document STATE_EDID_PRESENT flag Hans Verkuil
2026-11-02 10:37 ` [PATCH 12/13] media: cec: core: implement CEC_EVENT_FL_STATE_EDID_PRESENT Hans Verkuil
2026-11-02 11:14   ` sashiko-bot
2026-11-02 10:37 ` [PATCH 13/13] Documentation: media: document cec_phys_addr_invalidate Hans Verkuil

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-193307@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil+cisco@kernel.org \
    --cc=media-ci@linuxtv.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.