mbox series

[RFC/RFT,0/9] drm/display: generic HDMI CEC helpers

Message ID 20241225-drm-hdmi-connector-cec-v1-0-b80380c67221@linaro.org (mailing list archive)
Headers show
Series drm/display: generic HDMI CEC helpers | expand

Message

Dmitry Baryshkov Dec. 24, 2024, 11:10 p.m. UTC
Currently it is next to impossible to implement CEC handling for the
setup using drm_bridges and drm_bridge_connector: bridges don't have a
hold of the connector at the proper time to be able to route CEC events.

At the same time it not very easy and obvious to get the CEC physical
address handling correctly. Drivers handle it at various places, ending
up with the slight differences in behaviour.

Follow up the HDMI Connector and HDMI Audio series and implement generic
HDMI CEC set of helpers that link into the HDMI Connector and
drm_bridge_connector frameworks and provide a way to implement CEC
handling for HDMI bridges in an easy yet standard way.

Dependencies:
- https://lore.kernel.org/dri-devel/20241224-drm-bridge-hdmi-connector-v10-0-dc89577cd438@linaro.org/

Notes:
- the patchset was only compile-tested
- being an RFC some of the API functions and structures are left
  undocumented
- although the patchset provides drm_bridge / drm_bridge_connector API
  for working with CEC, there is no actual bridge that uses the API
  (yet)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Dmitry Baryshkov (9):
      drm/connector: add CEC-related fields
      drm/display: add CEC helpers code
      drm/display: hdmi-state-helper: handle CEC physicall address
      drm/vc4: hdmi: switch to generic CEC helpers
      drm/vc4: hdmi: drop separate CEC unregistration
      drm/display: bridge-connector: hook in CEC notifier support
      drm/bridge: move private data to the end of the struct
      drm/display: hdmi-cec-helper: add bridge-related functions
      drm/display: bridge-connector: handle CEC adapters

 drivers/gpu/drm/bridge/lontium-lt9611.c         |   2 +-
 drivers/gpu/drm/display/Kconfig                 |   6 +
 drivers/gpu/drm/display/Makefile                |   2 +
 drivers/gpu/drm/display/drm_bridge_connector.c  | 106 +++++++++++++-
 drivers/gpu/drm/display/drm_hdmi_cec_helper.c   | 182 ++++++++++++++++++++++++
 drivers/gpu/drm/display/drm_hdmi_state_helper.c |   7 +-
 drivers/gpu/drm/drm_bridge.c                    |  16 +++
 drivers/gpu/drm/drm_connector.c                 |  23 +++
 drivers/gpu/drm/vc4/Kconfig                     |   1 +
 drivers/gpu/drm/vc4/vc4_hdmi.c                  | 117 +++++----------
 drivers/gpu/drm/vc4/vc4_hdmi.h                  |   1 -
 include/drm/display/drm_hdmi_cec_helper.h       |  48 +++++++
 include/drm/drm_bridge.h                        |  78 +++++++---
 include/drm/drm_connector.h                     |  43 ++++++
 14 files changed, 529 insertions(+), 103 deletions(-)
---
base-commit: f8a2397baf041a5cee408b082334bb09c7e161df
change-id: 20241223-drm-hdmi-connector-cec-34902ce847b7
prerequisite-change-id: 20240530-drm-bridge-hdmi-connector-9b0f6725973e:v10
prerequisite-patch-id: 85bbbb29d36e382708178f1c549d2664ccb0dae7
prerequisite-patch-id: 8a90cb7ff9333ff21685adde0f3a273d8893fd2c
prerequisite-patch-id: 7747636339e4f1a8e8dd55adae9705eeb25116f9
prerequisite-patch-id: c7a93faaf73aa313a873001cad7bbbfc467011b1
prerequisite-patch-id: 97484c77f487c2d6682de461a64c55d7d7e7bae5
prerequisite-patch-id: 7607ac869c1c6aae0b1cfc72603a8ca51b81568a
prerequisite-patch-id: 5c9929248e783a6f39d657abff715c9ba5f0e4f0
prerequisite-patch-id: 865e12812b0401d4b5643d9097808a39b5f8c5dc
prerequisite-patch-id: e4c9022b225196ba95520a0b2934005eb137237a
prerequisite-patch-id: 82f04a7066d66c16dac623d6888b9d7069cdef00

Best regards,