public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] drm/connector: hdmi: limit infoframes per driver capabilities, second approach
@ 2025-12-24  1:02 Dmitry Baryshkov
  2025-12-24  1:02 ` [PATCH v3 01/10] drm/tests: hdmi: check the infoframes behaviour Dmitry Baryshkov
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Dmitry Baryshkov @ 2025-12-24  1:02 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Dave Stevenson, Maíra Canal,
	Raspberry Pi Kernel Maintenance, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Liu Ying, Chun-Kuang Hu,
	Philipp Zabel, Matthias Brugger, AngeloGioacchino Del Regno,
	Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, Sandy Huang, Heiko Stübner,
	Andy Yan
  Cc: dri-devel, linux-kernel, linux-arm-kernel, linux-sunxi,
	linux-mediatek, linux-arm-msm, freedreno, linux-rockchip

It's not uncommon for the particular device to support only a subset of
HDMI InfoFrames. Currently it's mostly ignored by the framework: it
calls write_infoframe() / clear_infoframe() callbacks for all frames and
expects them to return success even if the InfoFrame is not supported.

Sort that out, making sure that all interfaces are consistent:
- split function interfaces, having a pair of callbacks per each
  InfoFrame type.
- write_infoframe() / clear_infoframe() functions return -EOPNOTSUPP
  for unsupported InfoFrames.
- don't create and enable unsupported InfoFrames.
- limit debugfs to provide supported InfoFrames only.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v3:
- Added DRM KUnit tests verifying InfoFrames behaviour (Maxime)
- Reworked the patchset, having per-infoframe callbacks rather than
  extra flags (Maxime)
- Link to v2: https://lore.kernel.org/r/20250928-limit-infoframes-2-v2-0-6f8f5fd04214@oss.qualcomm.com

Changes in v2:
- Fixed build issue in common code
- Fixed comments regarding HDR / audio frames (Diedrik)
- In adv7511 actually check for the HDR frame (the comment was correct)
  rather than the audio infoframe (c&p error).
- Link to v1: https://lore.kernel.org/r/20250927-limit-infoframes-2-v1-0-697511bd050b@oss.qualcomm.com

---
Dmitry Baryshkov (10):
      drm/tests: hdmi: check the infoframes behaviour
      drm/vc4: hdmi: implement clear_infoframe
      drm/sun4i: hdmi_enc: implement clear_infoframe stub
      drm/connector: make clear_infoframe callback mandatory for HDMI connectors
      drm/bridge: refactor HDMI InfoFrame callbacks
      drm/display: hdmi_state_helper: split InfoFrame functions per type
      drm/display: hdmi_state_helper: reject Audio IF updates if it's not supported
      drm/display: hdmi_state_helper: don't generate unsupported InfoFrames
      drm/display: bridge_connector: dynamically generate HDMI callbacks
      drm/debug: don't register files for unsupported HDMI InfoFrames

 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c       | 180 ++++---
 drivers/gpu/drm/bridge/ite-it6263.c                |  95 ++--
 drivers/gpu/drm/bridge/lontium-lt9611.c            | 143 +++---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c       | 110 +++--
 drivers/gpu/drm/display/drm_bridge_connector.c     | 190 +++++++-
 drivers/gpu/drm/display/drm_hdmi_state_helper.c    |  94 ++--
 drivers/gpu/drm/drm_connector.c                    |   6 +
 drivers/gpu/drm/drm_debugfs.c                      |   7 +
 drivers/gpu/drm/mediatek/mtk_hdmi_common.c         |   8 +-
 drivers/gpu/drm/mediatek/mtk_hdmi_v2.c             | 110 +++--
 drivers/gpu/drm/msm/hdmi/hdmi_bridge.c             | 195 ++++----
 drivers/gpu/drm/rockchip/inno_hdmi.c               |  47 +-
 drivers/gpu/drm/rockchip/rk3066_hdmi.c             |  47 +-
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c             |  42 +-
 drivers/gpu/drm/tests/drm_client_modeset_test.c    |   3 +
 drivers/gpu/drm/tests/drm_connector_test.c         |  19 +
 drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 525 +++++++++++++++++++++
 drivers/gpu/drm/tests/drm_kunit_edid.h             | 119 +++++
 drivers/gpu/drm/vc4/vc4_hdmi.c                     | 105 ++++-
 include/drm/drm_bridge.h                           | 127 ++++-
 include/drm/drm_connector.h                        | 105 +++--
 21 files changed, 1762 insertions(+), 515 deletions(-)
---
base-commit: e05b08d7d0162cf77fff119367fb1a2d5ab3e669
change-id: 20250927-limit-infoframes-2-6b93e599e79a

Best regards,
-- 
With best wishes
Dmitry



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-01-07 13:29 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-24  1:02 [PATCH v3 00/10] drm/connector: hdmi: limit infoframes per driver capabilities, second approach Dmitry Baryshkov
2025-12-24  1:02 ` [PATCH v3 01/10] drm/tests: hdmi: check the infoframes behaviour Dmitry Baryshkov
2026-01-07 12:23   ` Maxime Ripard
2025-12-24  1:02 ` [PATCH v3 02/10] drm/vc4: hdmi: implement clear_infoframe Dmitry Baryshkov
2026-01-07 12:23   ` Maxime Ripard
2025-12-24  1:02 ` [PATCH v3 03/10] drm/sun4i: hdmi_enc: implement clear_infoframe stub Dmitry Baryshkov
2025-12-24  1:02 ` [PATCH v3 04/10] drm/connector: make clear_infoframe callback mandatory for HDMI connectors Dmitry Baryshkov
2026-01-07 12:32   ` Maxime Ripard
2025-12-24  1:02 ` [PATCH v3 05/10] drm/bridge: refactor HDMI InfoFrame callbacks Dmitry Baryshkov
2026-01-07 13:27   ` Maxime Ripard
2025-12-24  1:02 ` [PATCH v3 06/10] drm/display: hdmi_state_helper: split InfoFrame functions per type Dmitry Baryshkov
2026-01-07 13:28   ` Maxime Ripard
2025-12-24  1:02 ` [PATCH v3 07/10] drm/display: hdmi_state_helper: reject Audio IF updates if it's not supported Dmitry Baryshkov
2026-01-07 12:50   ` Maxime Ripard
2026-01-07 13:21     ` Dmitry Baryshkov
2025-12-24  1:02 ` [PATCH v3 08/10] drm/display: hdmi_state_helper: don't generate unsupported InfoFrames Dmitry Baryshkov
2026-01-07 12:57   ` Maxime Ripard
2025-12-24  1:02 ` [PATCH v3 09/10] drm/display: bridge_connector: dynamically generate HDMI callbacks Dmitry Baryshkov
2026-01-07 13:28   ` Maxime Ripard
2025-12-24  1:02 ` [PATCH v3 10/10] drm/debug: don't register files for unsupported HDMI InfoFrames Dmitry Baryshkov
2026-01-07 12:47   ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox