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 <[email protected]>

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+ci...@kernel.org?part=1

Reply via email to