From: Hans Verkuil <hverkuil+cisco@kernel.org>
To: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCHv2 00/13] media/drm: cec: add EDID_PRESENT
Date: Wed, 4 Nov 2026 11:01:03 +0100 [thread overview]
Message-ID: <c0156dcd-caad-4e92-94a5-323c7804d12d@kernel.org> (raw)
In-Reply-To: <cover.1793691124.git.hverkuil+cisco@kernel.org>
Hi all,
On 03/11/2026 08:31, Hans Verkuil wrote:
> Using the media CEC framework the application receives events when the
> Physical and/or Logical Addresses change. However, if the Physical Address
> changes to f.f.f.f (Invalid), it does not know whether that is because the
> HDMI link is disconnected, or because the EDID does not provide a valid
> Physical Address. That can happen because the display does not support CEC,
> as is the case for DisplayPort inputs or PC monitors.
I'll prep a v3 for this. The code is OK, but the flag names are wrong. This
is not about whether an EDID is present, but whether the Hotplug Detect is
present. I'll rename 'EDID' to 'HPD' for the v3.
Regards,
Hans
>
> This is important information to have but this is currently missing.
>
> This series adds support for that.
>
> Currently drivers set the physical address either with cec_s_phys_addr() or
> with cec_phys_addr_invalidate(), where the second is just a helper
> function that calls cec_s_phys_addr with CEC_PHYS_ADDR_INVALID. There
> are also cec_notifier_ counterparts.
>
> Change the behavior so that cec_s_phys_addr() is called whenever there
> is an EDID. In that case CEC_PHYS_ADDR_INVALID means that the EDID is
> present but does not contain a valid PA. And cec_phys_addr_invalidate()
> is only called when the video link is disconnected.
>
> Most CEC drivers already did that, except for the few that are fixed in the
> first 6 patches.
>
> The remaining patches implement the new functionality where the CEC
> framework actually reports whether or not the EDID was present, based
> on whether cec_s_phys_addr or cec_phys_addr_invalidate was called.
>
> The drm patches can either be queued up in the drm subsystem independently
> of the remaining patches, or I can take them through the media subsytem
> as part of the series, but then I need an Acked/Reviewed-by.
>
> Regards,
>
> Hans
>
> Changes in v2 (based on sashiko reviews):
>
> - missed one incorrect cec_notifier_set_phys_addr call in sti_hdmi.c
> - cec_notifier_cec_adap_register didn't call cec_phys_addr_invalidate
> if an earlier cec_notifier_phys_addr_invalidate call indicated that
> there is no EDID.
> - sending the initial state change event didn't set the
> CEC_EVENT_FL_STATE_EDID_PRESENT flag if needed.
>
> Hans Verkuil (13):
> gpu: drm: sti: call cec_notifier_phys_addr_invalidate if no EDID
> gpu: drm: exynos: call cec_notifier_phys_addr_invalidate if no EDID
> gpu: drm: omapdrm: call cec_s_phys_addr only if EDID is present
> media: i2c: adv7511-v4l2: call cec_s_phys_addr only if EDID is present
> media: cec: extron-da-hd-4k-plus: call cec_s_phys_addr only if EDID is
> present
> media: cec: core: improve cec_notifier_phys_addr_invalidate
> media: uapi: cec.h: add
> CEC_CAP_HAS_EDID_PRESENT/CEC_LOG_ADDRS_FL_EDID_PRESENT
> Documentation: media: document EDID_PRESENT cap and flag.
> media: cec: core: add support for EDID_PRESENT
> media: uapi: cec.h: add CEC_EVENT_FL_STATE_EDID_PRESENT flag
> Documentation: media: cec-ioc-dqevent.rst: document STATE_EDID_PRESENT
> flag
> media: cec: core: implement CEC_EVENT_FL_STATE_EDID_PRESENT
> Documentation: media: document cec_phys_addr_invalidate
>
> Documentation/driver-api/media/cec-core.rst | 10 +++-
> .../media/cec/cec-ioc-adap-g-caps.rst | 10 ++++
> .../media/cec/cec-ioc-adap-g-log-addrs.rst | 9 ++++
> .../media/cec/cec-ioc-dqevent.rst | 10 ++++
> drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
> drivers/gpu/drm/omapdrm/dss/hdmi4.c | 7 ++-
> drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 5 ++
> drivers/gpu/drm/omapdrm/dss/hdmi4_cec.h | 5 ++
> drivers/gpu/drm/sti/sti_hdmi.c | 4 +-
> drivers/media/cec/core/cec-adap.c | 51 ++++++++++++++++---
> drivers/media/cec/core/cec-api.c | 13 +++--
> drivers/media/cec/core/cec-core.c | 4 +-
> drivers/media/cec/core/cec-notifier.c | 26 +++++++++-
> drivers/media/cec/core/cec-priv.h | 3 +-
> .../extron-da-hd-4k-plus.c | 8 ++-
> drivers/media/i2c/adv7511-v4l2.c | 2 +-
> include/media/cec-notifier.h | 33 +++++++-----
> include/media/cec.h | 27 +++++-----
> include/uapi/linux/cec.h | 29 ++++++-----
> 19 files changed, 191 insertions(+), 67 deletions(-)
>
prev parent reply other threads:[~2026-11-04 10:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 7:31 [PATCHv2 00/13] media/drm: cec: add EDID_PRESENT Hans Verkuil
2026-11-03 7:31 ` [PATCHv2 01/13] gpu: drm: sti: call cec_notifier_phys_addr_invalidate if no EDID Hans Verkuil
2026-11-03 7:51 ` sashiko-bot
2026-11-03 7:31 ` [PATCHv2 02/13] gpu: drm: exynos: " Hans Verkuil
2026-11-03 7:50 ` sashiko-bot
2026-11-03 7:31 ` [PATCHv2 03/13] gpu: drm: omapdrm: call cec_s_phys_addr only if EDID is present Hans Verkuil
2026-11-03 14:13 ` Tomi Valkeinen
2026-11-03 7:31 ` [PATCHv2 04/13] media: i2c: adv7511-v4l2: " Hans Verkuil
2026-11-03 7:31 ` [PATCHv2 05/13] media: cec: extron-da-hd-4k-plus: " Hans Verkuil
2026-11-03 7:31 ` [PATCHv2 06/13] media: cec: core: improve cec_notifier_phys_addr_invalidate Hans Verkuil
2026-11-03 7:31 ` [PATCHv2 07/13] media: uapi: cec.h: add CEC_CAP_HAS_EDID_PRESENT/CEC_LOG_ADDRS_FL_EDID_PRESENT Hans Verkuil
2026-11-03 7:49 ` sashiko-bot
2026-11-03 7:31 ` [PATCHv2 08/13] Documentation: media: document EDID_PRESENT cap and flag Hans Verkuil
2026-11-03 7:48 ` sashiko-bot
2026-11-03 7:32 ` [PATCHv2 09/13] media: cec: core: add support for EDID_PRESENT Hans Verkuil
2026-11-03 7:53 ` sashiko-bot
2026-11-03 7:32 ` [PATCHv2 10/13] media: uapi: cec.h: add CEC_EVENT_FL_STATE_EDID_PRESENT flag Hans Verkuil
2026-11-03 7:49 ` sashiko-bot
2026-11-03 7:32 ` [PATCHv2 11/13] Documentation: media: cec-ioc-dqevent.rst: document STATE_EDID_PRESENT flag Hans Verkuil
2026-11-03 7:32 ` [PATCHv2 12/13] media: cec: core: implement CEC_EVENT_FL_STATE_EDID_PRESENT Hans Verkuil
2026-11-03 7:48 ` sashiko-bot
2026-11-03 7:32 ` [PATCHv2 13/13] Documentation: media: document cec_phys_addr_invalidate Hans Verkuil
2026-11-04 10:01 ` Hans Verkuil [this message]
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=c0156dcd-caad-4e92-94a5-323c7804d12d@kernel.org \
--to=hverkuil+cisco@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-media@vger.kernel.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 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.