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 12/13] media: cec: core: implement CEC_EVENT_FL_STATE_EDID_PRESENT
Date: Tue, 03 Nov 2026 07:48:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-194739@kernel.org> (raw)
In-Reply-To: <897c6071fbdca71dbb446b03e32c0e6af219ecf0.1793691124.git.hverkuil+cisco@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] media: cec: undeclared and unset EDID_PRESENT flags break build
--
commit 4a28932b9583376e3239ca1f0078c8d04cbe00a1
Author: Hans Verkuil <hverkuil+cisco@kernel.org>
media: cec: core: implement CEC_EVENT_FL_STATE_EDID_PRESENT
This commit checks for CEC_LOG_ADDRS_FL_EDID_PRESENT in
adap->log_addrs.flags and sets CEC_EVENT_FL_STATE_EDID_PRESENT on
CEC_EVENT_STATE_CHANGE events in cec_post_state_event() and cec_open().
> diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c
> index ee8a200b9803f..c02d036ee221e 100644
> --- a/drivers/media/cec/core/cec-adap.c
> +++ b/drivers/media/cec/core/cec-adap.c
> @@ -323,6 +323,8 @@ static void cec_post_state_event(struct cec_adapter *adap)
> ev.state_change.log_addr_mask = adap->log_addrs.log_addr_mask;
> ev.state_change.have_conn_info =
> adap->conn_info.type != CEC_CONNECTOR_TYPE_NO_CONNECTOR;
> + if (adap->log_addrs.flags & CEC_LOG_ADDRS_FL_EDID_PRESENT)
> + ev.flags |= CEC_EVENT_FL_STATE_EDID_PRESENT;
> cec_queue_event(adap, &ev);
> }
>
> diff --git a/drivers/media/cec/core/cec-api.c b/drivers/media/cec/core/cec-api.c
> index a491d7fc8a71a..a2ceea5522d46 100644
> --- a/drivers/media/cec/core/cec-api.c
> +++ b/drivers/media/cec/core/cec-api.c
> @@ -559,10 +559,7 @@ static int cec_open(struct inode *inode, struct file *filp)
> * Initial events that are automatically sent when the cec device is
> * opened.
> */
> - struct cec_event ev = {
> - .event = CEC_EVENT_STATE_CHANGE,
> - .flags = CEC_EVENT_FL_INITIAL_STATE,
> - };
> + struct cec_event ev = {};
> unsigned int i;
> int err;
>
> @@ -588,12 +585,17 @@ static int cec_open(struct inode *inode, struct file *filp)
> filp->private_data = fh;
>
> /* Queue up initial state events */
> + ev.event = CEC_EVENT_STATE_CHANGE;
> ev.state_change.phys_addr = adap->phys_addr;
> ev.state_change.log_addr_mask = adap->log_addrs.log_addr_mask;
> ev.state_change.have_conn_info =
> adap->conn_info.type != CEC_CONNECTOR_TYPE_NO_CONNECTOR;
> + ev.flags = CEC_EVENT_FL_INITIAL_STATE;
> + if (adap->log_addrs.flags & CEC_LOG_ADDRS_FL_EDID_PRESENT)
> + ev.flags |= CEC_EVENT_FL_STATE_EDID_PRESENT;
[Severity: High]
Are the header definitions and flag updates for
CEC_LOG_ADDRS_FL_EDID_PRESENT and CEC_EVENT_FL_STATE_EDID_PRESENT missing
from this patch?
In both cec_post_state_event() in drivers/media/cec/core/cec-adap.c and
cec_open() in drivers/media/cec/core/cec-api.c, the build fails with
undeclared identifier errors because neither CEC_LOG_ADDRS_FL_EDID_PRESENT
nor CEC_EVENT_FL_STATE_EDID_PRESENT is defined in include/uapi/linux/cec.h:
#define CEC_EVENT_FL_INITIAL_STATE (1 << 0)
#define CEC_EVENT_FL_DROPPED_EVENTS (1 << 1)
In addition, nothing in the tree sets CEC_LOG_ADDRS_FL_EDID_PRESENT in
adap->log_addrs.flags, and cec_adap_s_log_addrs() in
drivers/media/cec/core/cec-api.c strips all other flags before
__cec_s_log_addrs() updates adap->log_addrs:
log_addrs.flags &= CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK |
CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU |
CEC_LOG_ADDRS_FL_CDC_ONLY;
Should include/uapi/linux/cec.h define these flags, and should the CEC core
set or preserve CEC_LOG_ADDRS_FL_EDID_PRESENT when EDID is present?
--
Sashiko AI review · https://sashiko.dev/#/patchset/897c6071fbdca71dbb446b03e32c0e6af219ecf0.1793691124.git.hverkuil+cisco@kernel.org?part=1
next prev parent reply other threads:[~2026-11-03 7:48 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 [this message]
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-194739@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