dri-devel Archive on 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: [PATCHv2 10/13] media: uapi: cec.h: add CEC_EVENT_FL_STATE_EDID_PRESENT flag
Date: Tue, 03 Nov 2026 07:49:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-194745@kernel.org> (raw)
In-Reply-To: <215493fe7ce132b19dc109f0fa83d3bd2c081d2b.1793691124.git.hverkuil+cisco@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] media: cec: CEC_EVENT_FL_STATE_EDID_PRESENT is unimplemented and undocumented
--

commit 91b7ee167841223aaa68aad5f0bc8e5da032f2c4
Author: Hans Verkuil <hverkuil+cisco@kernel.org>

media: uapi: cec.h: add CEC_EVENT_FL_STATE_EDID_PRESENT flag

This commit adds the CEC_EVENT_FL_STATE_EDID_PRESENT event flag to
include/uapi/linux/cec.h to report whether the EDID is present.

> diff --git a/include/uapi/linux/cec.h b/include/uapi/linux/cec.h
> index fdfc97a6e4ec0..051125a446933 100644
> --- a/include/uapi/linux/cec.h
> +++ b/include/uapi/linux/cec.h
> @@ -453,6 +453,7 @@ struct cec_connector_info {
>  
>  #define CEC_EVENT_FL_INITIAL_STATE	(1 << 0)
>  #define CEC_EVENT_FL_DROPPED_EVENTS	(1 << 1)
> +#define CEC_EVENT_FL_STATE_EDID_PRESENT	(1 << 2)

[Severity: Medium]
Is part of this change missing from the commit?

CEC_EVENT_FL_STATE_EDID_PRESENT is added to include/uapi/linux/cec.h,
but nothing in the kernel ever references or sets it when queuing
CEC_EVENT_STATE_CHANGE events. Specifically, neither
cec_post_state_event() in drivers/media/cec/core/cec-adap.c:

    static void cec_post_state_event(struct cec_adapter *adap)
    {
            struct cec_event ev = {
                    .event = CEC_EVENT_STATE_CHANGE,
            };

nor cec_open() in drivers/media/cec/core/cec-api.c:

    struct cec_event ev = {
            .event = CEC_EVENT_STATE_CHANGE,
            .flags = CEC_EVENT_FL_INITIAL_STATE,
    };

sets CEC_EVENT_FL_STATE_EDID_PRESENT, so userspace applications
dequeuing struct cec_event via ioctl CEC_DQEVENT after opening a CEC
device or receiving an adapter state change notification will always
observe the flag as 0 even when a valid EDID is present.

In addition, Documentation/userspace-api/media/cec/cec-header.rst
parses include/uapi/linux/cec.h with :generate-cross-refs:,
:exception-file: cec.h.rst.exceptions, and :warn-broken:. Because
CEC_EVENT_FL_STATE_EDID_PRESENT is neither documented in the
cec-event-flags table in
Documentation/userspace-api/media/cec/cec-ioc-dqevent.rst nor listed in
Documentation/userspace-api/media/cec/cec.h.rst.exceptions, does
running make htmldocs emit a broken cross-reference warning for
cec-event-fl-state-edid-present?

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

  reply	other threads:[~2026-11-03  7:49 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 [this message]
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 ` [PATCHv2 00/13] media/drm: cec: add EDID_PRESENT 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-194745@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox