[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250903-rk3588-hdmi-cec-v4-0-fa25163c4b08@collabora.com>
Date: Wed, 03 Sep 2025 21:50:58 +0300
From: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
To: Sandy Huang <hjc@...k-chips.com>,
Heiko Stübner <heiko@...ech.de>,
Andy Yan <andy.yan@...k-chips.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>
Cc: kernel@...labora.com, dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org, Algea Cao <algea.cao@...k-chips.com>,
Derek Foreman <derek.foreman@...labora.com>,
Daniel Stone <daniels@...labora.com>
Subject: [PATCH v4 0/6] Add HDMI CEC support to Rockchip RK3588/RK3576 SoCs
The first patch in the series implements the CEC capability of the
Synopsys DesignWare HDMI QP TX controller found in RK3588 & RK3576 Socs.
This is based on the downstream code, but rewritten on top of the CEC
helpers added recently to the DRM HDMI connector framework.
The second patch is needed for RK3576 in order to fixup the timer base
setup according to the actual reference clock rate, which differs
slightly from RK3588.
The following three patches setup platform data with the new information
expected by the HDMI QP transmitter library, while improving the error
handling in the probe path.
Please note the CEC helpers were affected by a resource deallocation
issue which could crash the kernel and freeze the system under certain
test conditions. This has been already fixed in v6.17-rc1 via commit
19920ab98e17 ("drm/display: hdmi-cec-helper: Fix adapter
unregistration").
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
---
Changes in v4:
- Fixed the bisect-related issues reported by Daniel by implementing
the following operations in dw_hdmi_qp_bind():
* Disable CEC support when the related IRQ is not available
* Set ref_clk_rate to vendor default in case it was not provided by
the platform driver
* In both scenarios, also print a warning message to highlight the
need for fixing the platform driver
- Simplified dw_hdmi_qp_cec_init() a bit
* Removed the now obsolete cec->irq validation test
* Removed the superfluous error checking and logging around
devm_request_threaded_irq() call (it already handles all that)
- Collected R-b tags from Daniel
- Rebased series onto next-20250903
- Link to v3: https://lore.kernel.org/r/20250825-rk3588-hdmi-cec-v3-0-95324fb22592@collabora.com
Changes in v3:
- Fixup PATCH 1 according to the recent upstream commit 02bb63d1a593
("drm/bridge: Make dp/hdmi_audio_* callback keep the same paramter
order with get_modes") which changed the signature of ->hdmi_cec_init()
callback of struct drm_bridge_funcs; while at it, also update the
copyright section
- Updated cover letter to indicate that the CEC helpers fix is already
available since v6.17-rc1
- Rebased series onto next-20250825
- Link to v2: https://lore.kernel.org/r/20250710-rk3588-hdmi-cec-v2-0-f5884be34bc1@collabora.com
Changes in v2:
- Collected R-b tag from Dmitry
- Restructured the generic bridge patches to not depend on the
platform-specific changes and updated cover letter accordingly (Heiko)
- Replaced the loop searching for "ref" clock with clk_get() (Maxime)
- Added new patch "drm/rockchip: dw_hdmi_qp: Improve error handling with
dev_err_probe()"
- Link to v1: https://lore.kernel.org/r/20250704-rk3588-hdmi-cec-v1-0-2bd8de8700cd@collabora.com
---
Cristian Ciocaltea (6):
drm/bridge: dw-hdmi-qp: Add CEC support
drm/bridge: dw-hdmi-qp: Fixup timer base setup
drm/rockchip: dw_hdmi_qp: Improve error handling with dev_err_probe()
drm/rockchip: dw_hdmi_qp: Provide CEC IRQ in dw_hdmi_qp_plat_data
drm/rockchip: dw_hdmi_qp: Provide ref clock rate in dw_hdmi_qp_plat_data
arm64: defconfig: Enable DW HDMI QP CEC support
arch/arm64/configs/defconfig | 1 +
drivers/gpu/drm/bridge/synopsys/Kconfig | 8 +
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 224 ++++++++++++++++++++++++-
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.h | 14 ++
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 77 +++++----
include/drm/bridge/dw_hdmi_qp.h | 2 +
6 files changed, 284 insertions(+), 42 deletions(-)
---
base-commit: 5d50cf9f7cf20a17ac469c20a2e07c29c1f6aab7
change-id: 20250703-rk3588-hdmi-cec-cea8f523df48
Powered by blists - more mailing lists