media/drm: cec: add HPD_PRESENT
Status from this message: Applied to misc/kernel.git (drm-misc-next)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest13 patches 2 repliesApplied
- v213 patches 2 repliesSuperseded
- v113 patches 1 replySuperseded
Changes in v3 from the cover letter
- Renamed EDID_PRESENT to HPD_PRESENT, since that's what it really is.
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | gpu: drm: sti: call cec_notifier_phys_addr_invalidate if no HPDdrivers/ | +2 | 0 replies | |
| 2/13 | gpu: drm: exynos: call cec_notifier_phys_addr_invalidate if no HPDdrivers/ | +1 | 1 reply | |
| 3/13 | gpu: drm: omapdrm: call cec_s_phys_addr only if HPD is presentdrivers/ drivers/ drivers/ | +13 | 0 replies | |
| 4/13 | media: i2c: adv7511-v4l2: call cec_s_phys_addr only if HPD is highdrivers/ | +1 | 0 replies | |
| 5/13 | media: cec: extron-da-hd-4k-plus: call cec_s_phys_addr only if HPD is highdrivers/ | +6 | 0 replies | |
| 6/13 | media: cec: core: improve cec_notifier_phys_addr_invalidatedrivers/ include/ | +43 | 0 replies | |
| 7/13 | media: uapi: cec.h: add CEC_CAP_HAS_HPD_PRESENT/CEC_LOG_ADDRS_FL_HPD_PRESENTinclude/ | +15 | 0 replies | |
| 8/13 | Documentation: media: document HPD_PRESENT cap and flag.Documentation/ Documentation/ | +20 | 0 replies | |
| 9/13 | media: cec: core: add support for HPD_PRESENTdrivers/ drivers/ drivers/ +2 more | +63 | 0 replies | |
| 10/13 | media: uapi: cec.h: add CEC_EVENT_FL_STATE_HPD_PRESENT flaginclude/ | +1 | 0 replies | |
| 11/13 | Documentation: media: cec-ioc-dqevent.rst: document STATE_HPD_PRESENT flagDocumentation/ Documentation/ | +12 | 0 replies | |
| 12/13 | media: cec: core: implement CEC_EVENT_FL_STATE_HPD_PRESENTdrivers/ drivers/ | +8 | 0 replies | |
| 13/13 | Documentation: media: document cec_phys_addr_invalidateDocumentation/ | +9 | 0 replies |
Reviews trailers per patch
1 of 13 patches has a Reviewed-by or Acked-by.
| Patch | Krzysztof Kozlowski |
|---|---|
| 1/13 | |
| 2/13 | R-b |
| 3/13 | |
| 4/13 | |
| 5/13 | |
| 6/13 | |
| 7/13 | |
| 8/13 | |
| 9/13 | |
| 10/13 | |
| 11/13 | |
| 12/13 | |
| 13/13 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCHv3 00/13] media/drm: cec: add HPD_PRESENT
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.
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 the HPD is high. 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 HPD was present, based on whether cec_s_phys_addr or cec_phys_addr_invalidate was called.
Note: I think cec_phys_addr_invalidate should be renamed to something like cec_phys_addr_disconnect given the changes semantics of this function. I will tackle that once this series is in.
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 v3:
- Renamed EDID_PRESENT to HPD_PRESENT, since that's what it really is.
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 HPD
gpu: drm: exynos: call cec_notifier_phys_addr_invalidate if no HPD
gpu: drm: omapdrm: call cec_s_phys_addr only if HPD is present
media: i2c: adv7511-v4l2: call cec_s_phys_addr only if HPD is high
media: cec: extron-da-hd-4k-plus: call cec_s_phys_addr only if HPD is
high
media: cec: core: improve cec_notifier_phys_addr_invalidate
media: uapi: cec.h: add
CEC_CAP_HAS_HPD_PRESENT/CEC_LOG_ADDRS_FL_HPD_PRESENT
Documentation: media: document HPD_PRESENT cap and flag.
media: cec: core: add support for HPD_PRESENT
media: uapi: cec.h: add CEC_EVENT_FL_STATE_HPD_PRESENT flag
Documentation: media: cec-ioc-dqevent.rst: document STATE_HPD_PRESENT
flag
media: cec: core: implement CEC_EVENT_FL_STATE_HPD_PRESENT
Documentation: media: document cec_phys_addr_invalidate
Documentation/driver-api/media/cec-core.rst | 10 +++- .../media/cec/cec-ioc-adap-g-caps.rst | 11 ++++ .../media/cec/cec-ioc-adap-g-log-addrs.rst | 10 ++++ .../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, 193 insertions(+), 67 deletions(-)
Signature · 1 line
2.53.0