* [PATCH v7 01/19] drm/bridge: inno-hdmi: fix swapped HSYNC and VSYNC polarity
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 02/19] drm/bridge: inno-hdmi: Don't dereference a NULL drm_device on hotplug Michal Wilczynski
` (18 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
v_HSYNC_POLARITY() and v_VSYNC_POLARITY() write the wrong bits: the
hardware puts HSYNC in bit 2 and VSYNC in bit 3, the macros do the
opposite. Most CEA modes drive both syncs with the same polarity so it
goes unnoticed; it only shows up on modes where the two differ.
Fixes: 412d4ae6b7a5 ("drm/rockchip: hdmi: add Innosilicon HDMI support")
Reported-by: Maud Spierings <maud_spierings@murena.io>
Closes: https://lore.kernel.org/all/e780ecb8-918f-4816-99c8-b69b10b25a18@murena.io/
Reported-by: Byron Stanoszek <gandalf@winds.org>
Closes: https://lore.kernel.org/all/b8b046ee-c574-3e16-6079-2fc415633dae@winds.org/
Suggested-by: Dominique Belhachemi <db@domibel.de>
Tested-by: Maud Spierings <maud_spierings@murena.io>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index ea3447d4f285ba5a6ba9d2bc42f450b97e5f22c8..cfb74cca96039cdc30cb3a3a1147a659dc2891fd 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -122,8 +122,8 @@ enum {
#define v_VIDEO_MUTE(n) ((n) << 0)
#define HDMI_VIDEO_TIMING_CTL 0x08
-#define v_HSYNC_POLARITY(n) ((n) << 3)
-#define v_VSYNC_POLARITY(n) ((n) << 2)
+#define v_VSYNC_POLARITY(n) ((n) << 3)
+#define v_HSYNC_POLARITY(n) ((n) << 2)
#define v_INETLACE(n) ((n) << 1)
#define v_EXTERANL_VIDEO(n) ((n) << 0)
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 02/19] drm/bridge: inno-hdmi: Don't dereference a NULL drm_device on hotplug
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 01/19] drm/bridge: inno-hdmi: fix swapped HSYNC and VSYNC polarity Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 03/19] dt-bindings: display: bridge: Add starfive,jh7110-inno-hdmi-controller Michal Wilczynski
` (17 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea
inno_hdmi_irq() passes hdmi->bridge.dev to drm_helper_hpd_irq_event(),
which dereferences it in its first statement:
if (!dev->mode_config.poll_enabled)
bridge.dev is assigned only by drm_bridge_attach(), but inno_hdmi_bind()
unmutes the hotplug interrupt in inno_hdmi_init_hw() and installs the
handler well before it attaches the bridge:
inno_hdmi_init_hw(hdmi); /* unmutes hotplug */
devm_request_threaded_irq(...); /* handler goes live */
...
hdmi->bridge.ddc = inno_hdmi_i2c_adapter(hdmi);
devm_drm_bridge_add(dev, &hdmi->bridge);
drm_bridge_attach(...); /* bridge.dev set here */
The bridge is allocated by devm_drm_bridge_alloc(), which kzalloc()s it,
so bridge.dev is NULL for all of that window, and a hotplug event
arriving in it enters drm_helper_hpd_irq_event(NULL).
Before the conversion to a bridge the ordering was safe:
inno_hdmi_register() called drmm_connector_hdmi_init(), which set
connector.dev, before the interrupt was requested.
Drop hotplug events that arrive before the bridge is attached.
Fixes: 969325a2597e ("drm/rockchip: inno-hdmi: Convert to drm bridge")
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index cfb74cca96039cdc30cb3a3a1147a659dc2891fd..5bfe59f18823a8628b0b65a768d2ba9989a0f30a 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -929,7 +929,9 @@ static irqreturn_t inno_hdmi_irq(int irq, void *dev_id)
{
struct inno_hdmi *hdmi = dev_id;
- drm_helper_hpd_irq_event(hdmi->bridge.dev);
+ /* bridge.dev is NULL until drm_bridge_attach() */
+ if (hdmi->bridge.dev)
+ drm_helper_hpd_irq_event(hdmi->bridge.dev);
return IRQ_HANDLED;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 03/19] dt-bindings: display: bridge: Add starfive,jh7110-inno-hdmi-controller
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 01/19] drm/bridge: inno-hdmi: fix swapped HSYNC and VSYNC polarity Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 02/19] drm/bridge: inno-hdmi: Don't dereference a NULL drm_device on hotplug Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 04/19] dt-bindings: display: starfive: Add starfive,jh7110-hdmi-subsystem Michal Wilczynski
` (16 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea
Add the dt-binding for the StarFive JH7110 Innosilicon HDMI controller
(DRM bridge).
This device is the second child of the starfive,jh7110-hdmi-subsystem node.
It consumes its register access, audio master and audio bit clocks
(pclk, mclk, bclk) from voutcrg, and both the pixel clock (pixel) and
the PHY from its hdmi_phy sibling.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
.../starfive,jh7110-inno-hdmi-controller.yaml | 121 +++++++++++++++++++++
1 file changed, 121 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/bridge/starfive,jh7110-inno-hdmi-controller.yaml b/Documentation/devicetree/bindings/display/bridge/starfive,jh7110-inno-hdmi-controller.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..eb03404d8c60a6ecadd0a4f5aee7c46b6f4da3ee
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/starfive,jh7110-inno-hdmi-controller.yaml
@@ -0,0 +1,121 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/starfive,jh7110-inno-hdmi-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 Innosilicon HDMI Controller
+
+maintainers:
+ - Michal Wilczynski <m.wilczynski@samsung.com>
+
+description:
+ The controller portion of the StarFive JH7110 INNO HDMI IP.
+
+properties:
+ compatible:
+ const: starfive,jh7110-inno-hdmi-controller
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: The HDMI controller main clock
+ - description: Audio master clock
+ - description: Audio bit clock, from the I2S transmitter
+ - description: The pixel clock, generated by the PHY
+
+ clock-names:
+ items:
+ - const: pclk
+ - const: mclk
+ - const: bclk
+ - const: pixel
+
+ resets:
+ maxItems: 1
+
+ phys:
+ maxItems: 1
+
+ starfive,vout-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the dom_vout_syscon system controller, which holds the mux
+ selecting the DC8200 output that drives the HDMI transmitter.
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Input from the DC8200. The remote port number selects the DC8200
+ panel and the remote endpoint number the interface on that panel,
+ 0 for DPI and 1 for DP.
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Output to the HDMI connector.
+
+ required:
+ - port@0
+ - port@1
+
+required:
+ - compatible
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+ - phys
+ - starfive,vout-syscon
+ - ports
+
+additionalProperties: false
+
+examples:
+ # Shown as a child of the HDMI subsystem node; see
+ # Documentation/devicetree/bindings/display/starfive/starfive,jh7110-hdmi-subsystem.yaml
+ # for the full node.
+ - |
+ #include <dt-bindings/clock/starfive,jh7110-crg.h>
+ #include <dt-bindings/reset/starfive,jh7110-crg.h>
+
+ controller {
+ compatible = "starfive,jh7110-inno-hdmi-controller";
+ clocks = <&voutcrg JH7110_VOUTCLK_HDMI_TX_SYS>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_MCLK>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_BCLK>,
+ <&hdmi_phy>;
+ clock-names = "pclk", "mclk", "bclk", "pixel";
+ interrupts = <99>;
+ phys = <&hdmi_phy>;
+ resets = <&voutcrg JH7110_VOUTRST_HDMI_TX_HDMI>;
+ starfive,vout-syscon = <&vout_syscon>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ endpoint {
+ remote-endpoint = <&dpu_out_dpi0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+ };
+ };
+ };
+
+...
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 04/19] dt-bindings: display: starfive: Add starfive,jh7110-hdmi-subsystem
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (2 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 03/19] dt-bindings: display: bridge: Add starfive,jh7110-inno-hdmi-controller Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 05/19] dt-bindings: soc: starfive: Add starfive,jh7110-vout-syscon Michal Wilczynski
` (15 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea
Add the dt-binding for the StarFive JH7110 HDMI subsystem.
The JH7110 HDMI IP is a monolithic block containing both the digital
controller and analog PHY in a single register space. This binding
defines the parent device, which holds the shared register map, and its
two children: the PHY and the controller.
The two have separate resources. The PHY takes the 24 MHz reference
clock and provides both the pixel clock, which the VOUT clock generator
routes on to the display controller, and the phy the controller uses.
The controller takes its clocks from the VOUT clock generator. What
they share is the register space, which the parent maps.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
.../starfive/starfive,jh7110-hdmi-subsystem.yaml | 95 ++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-hdmi-subsystem.yaml b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-hdmi-subsystem.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..8c5b0b4deb702371ab1ffb40ccdb312dda9940ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-hdmi-subsystem.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/starfive/starfive,jh7110-hdmi-subsystem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 HDMI subsystem
+
+maintainers:
+ - Michal Wilczynski <m.wilczynski@samsung.com>
+
+description:
+ The StarFive JH7110 HDMI block is a monolithic IP containing both
+ the digital controller logic and the analog PHY logic in a single
+ register space. It sits inside the video output subsystem, which owns
+ the NoC bus clock and reset gating this region and the power domain it
+ belongs to.
+
+properties:
+ compatible:
+ const: starfive,jh7110-hdmi-subsystem
+
+ reg:
+ maxItems: 1
+
+ phy:
+ $ref: /schemas/phy/starfive,jh7110-inno-hdmi-phy.yaml#
+
+ controller:
+ $ref: /schemas/display/bridge/starfive,jh7110-inno-hdmi-controller.yaml#
+
+required:
+ - compatible
+ - reg
+ - phy
+ - controller
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/starfive,jh7110-crg.h>
+ #include <dt-bindings/reset/starfive,jh7110-crg.h>
+
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ hdmi@29590000 {
+ compatible = "starfive,jh7110-hdmi-subsystem";
+ reg = <0x29590000 0x4000>;
+
+ controller {
+ compatible = "starfive,jh7110-inno-hdmi-controller";
+ clocks = <&voutcrg JH7110_VOUTCLK_HDMI_TX_SYS>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_MCLK>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_BCLK>,
+ <&hdmi_phy>;
+ clock-names = "pclk", "mclk", "bclk", "pixel";
+ interrupts = <99>;
+ phys = <&hdmi_phy>;
+ resets = <&voutcrg JH7110_VOUTRST_HDMI_TX_HDMI>;
+ starfive,vout-syscon = <&vout_syscon>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ endpoint {
+ remote-endpoint = <&dpu_out_dpi0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+ };
+ };
+ };
+
+ hdmi_phy: phy {
+ compatible = "starfive,jh7110-inno-hdmi-phy";
+ #clock-cells = <0>;
+ clocks = <&xin24m>;
+ #phy-cells = <0>;
+ };
+ };
+ };
+...
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 05/19] dt-bindings: soc: starfive: Add starfive,jh7110-vout-syscon
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (3 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 04/19] dt-bindings: display: starfive: Add starfive,jh7110-hdmi-subsystem Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 06/19] dt-bindings: display: verisilicon: Add starfive,jh7110-dc8200 Michal Wilczynski
` (14 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Krzysztof Kozlowski
The video output subsystem has its own system controller, documented as
dom_vout_syscon. Among other things it holds the mux that selects which
DC8200 output drives the HDMI transmitter, so the HDMI controller needs
to reach it.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
.../devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
index 0039319e91fe6e6aadc4300114626348e4dfb7ce..cf9b657d0e8a3ed5c5688336fee4123e14a2ac58 100644
--- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
+++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
@@ -24,6 +24,7 @@ properties:
- enum:
- starfive,jh7110-aon-syscon
- starfive,jh7110-stg-syscon
+ - starfive,jh7110-vout-syscon
- const: syscon
reg:
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 06/19] dt-bindings: display: verisilicon: Add starfive,jh7110-dc8200
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (4 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 05/19] dt-bindings: soc: starfive: Add starfive,jh7110-vout-syscon Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 07/19] dt-bindings: display: starfive: Add starfive,jh7110-vout-subsystem Michal Wilczynski
` (13 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea
The JH7110 embeds a DC8200. The binding requires an SoC specific
compatible ahead of the generic one, so add the JH7110 to the enum.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
Documentation/devicetree/bindings/display/verisilicon,dc.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/display/verisilicon,dc.yaml b/Documentation/devicetree/bindings/display/verisilicon,dc.yaml
index 919a9001220120054cb62d1d01b7293367266f95..05a202633cd273fec358c095c64584d959d96d90 100644
--- a/Documentation/devicetree/bindings/display/verisilicon,dc.yaml
+++ b/Documentation/devicetree/bindings/display/verisilicon,dc.yaml
@@ -16,6 +16,7 @@ properties:
compatible:
items:
- enum:
+ - starfive,jh7110-dc8200
- thead,th1520-dc8200
- const: verisilicon,dc # DC IPs have discoverable ID/revision registers
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 07/19] dt-bindings: display: starfive: Add starfive,jh7110-vout-subsystem
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (5 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 06/19] dt-bindings: display: verisilicon: Add starfive,jh7110-dc8200 Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 08/19] drm/bridge: inno-hdmi: Split probe out of bind Michal Wilczynski
` (12 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea
The JH7110 groups its display hardware into a video output subsystem,
dom_vout_top, covering the DC8200, the HDMI transmitter, the video
output clock generator and the video output system controller.
They share one NoC port whose clock and reset gate access to every
register in the region, and the region sits in the PD_VOUT power
domain. Describe the subsystem as a bus node so those resources are
owned by the block that shares them.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
.../starfive/starfive,jh7110-vout-subsystem.yaml | 218 +++++++++++++++++++++
1 file changed, 218 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-vout-subsystem.yaml b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-vout-subsystem.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..74ac777d0406206b86ac77ca77003a32a7b10721
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-vout-subsystem.yaml
@@ -0,0 +1,218 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/starfive/starfive,jh7110-vout-subsystem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 video output subsystem
+
+maintainers:
+ - Michal Wilczynski <m.wilczynski@samsung.com>
+
+description:
+ The JH7110 groups its display hardware into a video output subsystem, named
+ dom_vout_top in the documentation. It covers the DC8200 display controller,
+ the HDMI transmitter, the video output clock generator and the video output
+ system controller, all behind one NoC port. That port's clock and reset gate
+ access to every register in the region, and the region sits in the PD_VOUT
+ power domain, so this node owns those resources on behalf of its children.
+
+properties:
+ compatible:
+ const: starfive,jh7110-vout-subsystem
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description: NoC display bus clock.
+
+ resets:
+ maxItems: 1
+ description: NoC display bus reset.
+
+ power-domains:
+ maxItems: 1
+
+ dma-noncoherent: true
+
+ ranges: true
+
+ "#address-cells":
+ const: 2
+
+ "#size-cells":
+ const: 2
+
+patternProperties:
+ "^display@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-dc8200
+
+ "^hdmi@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ compatible:
+ const: starfive,jh7110-hdmi-subsystem
+
+ "^syscon@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ compatible:
+ contains:
+ const: starfive,jh7110-vout-syscon
+
+ "^clock-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ compatible:
+ const: starfive,jh7110-voutcrg
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - resets
+ - power-domains
+ - ranges
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/starfive,jh7110-crg.h>
+ #include <dt-bindings/power/starfive,jh7110-pmu.h>
+ #include <dt-bindings/reset/starfive,jh7110-crg.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ display-subsystem@29400000 {
+ compatible = "starfive,jh7110-vout-subsystem";
+ reg = <0x0 0x29400000 0x0 0x200000>;
+ ranges;
+ #address-cells = <2>;
+ clocks = <&syscrg JH7110_SYSCLK_NOC_BUS_DISP_AXI>;
+ dma-noncoherent;
+ power-domains = <&pwrc JH7110_PD_VOUT>;
+ resets = <&syscrg JH7110_SYSRST_NOC_BUS_DISP_AXI>;
+ #size-cells = <2>;
+
+ display@29400000 {
+ compatible = "starfive,jh7110-dc8200", "verisilicon,dc";
+ reg = <0x0 0x29400000 0x0 0x2800>;
+ clocks = <&voutcrg JH7110_VOUTCLK_DC8200_CORE>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_AXI>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_AHB>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_PIX0>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_PIX1>;
+ clock-names = "core", "axi", "ahb", "pix0", "pix1";
+ interrupts = <95>;
+ resets = <&voutcrg JH7110_VOUTRST_DC8200_CORE>,
+ <&voutcrg JH7110_VOUTRST_DC8200_AXI>,
+ <&voutcrg JH7110_VOUTRST_DC8200_AHB>;
+ reset-names = "core", "axi", "ahb";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dpu_out_dpi0: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&hdmi_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ };
+ };
+ };
+
+ hdmi@29590000 {
+ compatible = "starfive,jh7110-hdmi-subsystem";
+ reg = <0x0 0x29590000 0x0 0x4000>;
+
+ controller {
+ compatible = "starfive,jh7110-inno-hdmi-controller";
+ clocks = <&voutcrg JH7110_VOUTCLK_HDMI_TX_SYS>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_MCLK>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_BCLK>,
+ <&hdmi_phy>;
+ clock-names = "pclk", "mclk", "bclk", "pixel";
+ interrupts = <99>;
+ phys = <&hdmi_phy>;
+ resets = <&voutcrg JH7110_VOUTRST_HDMI_TX_HDMI>;
+ starfive,vout-syscon = <&vout_syscon>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ hdmi_in: endpoint {
+ remote-endpoint = <&dpu_out_dpi0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+ };
+ };
+ };
+
+ hdmi_phy: phy {
+ compatible = "starfive,jh7110-inno-hdmi-phy";
+ #clock-cells = <0>;
+ clocks = <&xin24m>;
+ #phy-cells = <0>;
+ };
+ };
+
+ vout_syscon: syscon@295b0000 {
+ compatible = "starfive,jh7110-vout-syscon", "syscon";
+ reg = <0x0 0x295b0000 0x0 0x10000>;
+ };
+
+ voutcrg: clock-controller@295c0000 {
+ compatible = "starfive,jh7110-voutcrg";
+ reg = <0x0 0x295c0000 0x0 0x10000>;
+ #clock-cells = <1>;
+ clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AHB>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AXI>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
+ <&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
+ <&hdmi_phy>;
+ clock-names = "vout_src", "vout_top_ahb",
+ "vout_top_axi", "vout_top_hdmitx0_mclk",
+ "i2stx0_bclk", "hdmitx0_pixelclk";
+ power-domains = <&pwrc JH7110_PD_VOUT>;
+ #reset-cells = <1>;
+ resets = <&syscrg JH7110_SYSRST_VOUT_TOP_SRC>;
+ };
+ };
+ };
+...
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 08/19] drm/bridge: inno-hdmi: Split probe out of bind
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (6 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 07/19] dt-bindings: display: starfive: Add starfive,jh7110-vout-subsystem Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 14:52 ` sashiko-bot
2026-11-06 13:58 ` [PATCH v7 09/19] drm/bridge: inno-hdmi: Use a regmap for register access Michal Wilczynski
` (11 subsequent siblings)
19 siblings, 1 reply; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
inno_hdmi_bind() both sets up the bridge and attaches it to a DRM
encoder. A platform whose HDMI controller is a child of a larger device
needs the first half without the second, since it registers as its own
platform driver and lets the DRM core bind the bridge later.
Move the setup into a new exported inno_hdmi_probe(), and reduce
inno_hdmi_bind() to a wrapper around it. Like inno_hdmi_probe() and
dw_hdmi_bind(), it now takes the platform_device, so the Rockchip glue
does the to_platform_device() conversion instead.
No functional change intended.
Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 39 +++++++++++++++++++++++----
drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c | 2 +-
include/drm/bridge/inno_hdmi.h | 6 ++++-
3 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index 5bfe59f18823a8628b0b65a768d2ba9989a0f30a..aa64ffdbd30721603aebbcd5d5747851be789911 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -1063,11 +1063,24 @@ static struct i2c_adapter *inno_hdmi_i2c_adapter(struct inno_hdmi *hdmi)
return adap;
}
-struct inno_hdmi *inno_hdmi_bind(struct device *dev,
- struct drm_encoder *encoder,
- const struct inno_hdmi_plat_data *plat_data)
+/**
+ * inno_hdmi_probe - Internal helper to perform common setup
+ * @pdev: platform device
+ * @plat_data: SoC-specific platform data
+ *
+ * This function handles all the common hardware setup: allocating the main
+ * struct, mapping registers, getting clocks, initializing the hardware,
+ * setting up the IRQ, and initializing the DDC adapter and bridge struct.
+ *
+ * It registers the bridge but does not attach it, for glue drivers that probe
+ * as their own platform device rather than through a component bind.
+ *
+ * Return: the inno_hdmi instance on success, or an ERR_PTR() on failure.
+ */
+struct inno_hdmi *inno_hdmi_probe(struct platform_device *pdev,
+ const struct inno_hdmi_plat_data *plat_data)
{
- struct platform_device *pdev = to_platform_device(dev);
+ struct device *dev = &pdev->dev;
struct inno_hdmi *hdmi;
int irq;
int ret;
@@ -1131,7 +1144,23 @@ struct inno_hdmi *inno_hdmi_bind(struct device *dev,
if (ret)
return ERR_PTR(ret);
- ret = drm_bridge_attach(encoder, &hdmi->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
+ return hdmi;
+}
+EXPORT_SYMBOL_GPL(inno_hdmi_probe);
+
+struct inno_hdmi *inno_hdmi_bind(struct platform_device *pdev,
+ struct drm_encoder *encoder,
+ const struct inno_hdmi_plat_data *plat_data)
+{
+ struct inno_hdmi *hdmi;
+ int ret;
+
+ hdmi = inno_hdmi_probe(pdev, plat_data);
+ if (IS_ERR(hdmi))
+ return hdmi;
+
+ ret = drm_bridge_attach(encoder, &hdmi->bridge, NULL,
+ DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (ret)
return ERR_PTR(ret);
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
index 33ff195bd2e65367792710ed2bcfb2f7c217d8e6..1f04489477e07f61e8793e08e03e73566366c725 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
@@ -127,7 +127,7 @@ static int inno_hdmi_rockchip_bind(struct device *dev, struct device *master, vo
dev_set_drvdata(dev, hdmi);
- hdmi->base = inno_hdmi_bind(dev, encoder, plat_data);
+ hdmi->base = inno_hdmi_bind(to_platform_device(dev), encoder, plat_data);
connector = drm_bridge_connector_init(drm, encoder);
if (IS_ERR(connector)) {
diff --git a/include/drm/bridge/inno_hdmi.h b/include/drm/bridge/inno_hdmi.h
index 5bbcaeea94e2a20fd0dc0ae0c6946eb5604bbaf6..507d5e999183ca02e7dcbe4ce7568acc21426a89 100644
--- a/include/drm/bridge/inno_hdmi.h
+++ b/include/drm/bridge/inno_hdmi.h
@@ -12,6 +12,7 @@ struct device;
struct drm_encoder;
struct drm_display_mode;
struct inno_hdmi;
+struct platform_device;
struct inno_hdmi_plat_ops {
void (*enable)(struct device *pdev, struct drm_display_mode *mode);
@@ -29,7 +30,10 @@ struct inno_hdmi_plat_data {
struct inno_hdmi_phy_config *default_phy_config;
};
-struct inno_hdmi *inno_hdmi_bind(struct device *pdev,
+struct inno_hdmi *inno_hdmi_bind(struct platform_device *pdev,
struct drm_encoder *encoder,
const struct inno_hdmi_plat_data *plat_data);
+
+struct inno_hdmi *inno_hdmi_probe(struct platform_device *pdev,
+ const struct inno_hdmi_plat_data *plat_data);
#endif /* __INNO_HDMI__ */
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v7 08/19] drm/bridge: inno-hdmi: Split probe out of bind
2026-11-06 13:58 ` [PATCH v7 08/19] drm/bridge: inno-hdmi: Split probe out of bind Michal Wilczynski
@ 2026-11-06 14:52 ` sashiko-bot
0 siblings, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-11-06 14:52 UTC (permalink / raw)
To: Michal Wilczynski; +Cc: devicetree, dri-devel, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/bridge: inno-hdmi: race on bridge.dev in inno_hdmi_irq()
after probe split
--
commit b0209990726be89f8d7446a146a593a4fe328e8b
Author: Michal Wilczynski <m.wilczynski@samsung.com>
drm/bridge: inno-hdmi: Split probe out of bind
This commit splits hardware and bridge setup out of inno_hdmi_bind() into
an exported inno_hdmi_probe() helper so standalone platform drivers can
register the bridge without immediately attaching it to an encoder.
> diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
> index 5bfe59f18823a..aa64ffdbd3072 100644
> --- a/drivers/gpu/drm/bridge/inno-hdmi.c
> +++ b/drivers/gpu/drm/bridge/inno-hdmi.c
> @@ -1063,11 +1063,24 @@ static struct i2c_adapter *inno_hdmi_i2c_adapter(struct inno_hdmi *hdmi)
> return adap;
> }
>
> -struct inno_hdmi *inno_hdmi_bind(struct device *dev,
> - struct drm_encoder *encoder,
> - const struct inno_hdmi_plat_data *plat_data)
> +/**
> + * inno_hdmi_probe - Internal helper to perform common setup
> + * @pdev: platform device
> + * @plat_data: SoC-specific platform data
> + *
> + * This function handles all the common hardware setup: allocating the main
> + * struct, mapping registers, getting clocks, initializing the hardware,
> + * setting up the IRQ, and initializing the DDC adapter and bridge struct.
> + *
> + * It registers the bridge but does not attach it, for glue drivers that probe
> + * as their own platform device rather than through a component bind.
> + *
> + * Return: the inno_hdmi instance on success, or an ERR_PTR() on failure.
> + */
> +struct inno_hdmi *inno_hdmi_probe(struct platform_device *pdev,
> + const struct inno_hdmi_plat_data *plat_data)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> + struct device *dev = &pdev->dev;
> struct inno_hdmi *hdmi;
> int irq;
> int ret;
> @@ -1131,7 +1144,23 @@ struct inno_hdmi *inno_hdmi_bind(struct device *dev,
> if (ret)
> return ERR_PTR(ret);
>
> - ret = drm_bridge_attach(encoder, &hdmi->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
> + return hdmi;
> +}
> +EXPORT_SYMBOL_GPL(inno_hdmi_probe);
[Severity: Medium]
Can inno_hdmi_irq() race with drm_bridge_detach() on hdmi->bridge.dev when
a standalone bridge driver uses inno_hdmi_probe()?
Previously, inno_hdmi_bind() was called from component bind, so
component_unbind_all() released the devm_request_threaded_irq() handler
before drm_dev_put() detached the bridge and freed the drm_device. When a
standalone platform driver calls inno_hdmi_probe(), the threaded IRQ stays
active for the lifetime of the bridge platform_device while the display
driver attaches and detaches the bridge.
drivers/gpu/drm/bridge/inno-hdmi.c:inno_hdmi_irq() {
/* bridge.dev is NULL until drm_bridge_attach() */
if (hdmi->bridge.dev)
drm_helper_hpd_irq_event(hdmi->bridge.dev);
}
If an HPD interrupt fires while the display driver is tearing down its
drm_device, inno_hdmi_irq() reads hdmi->bridge.dev without synchronization
against drm_bridge_detach() and drm_dev_put():
CPU0 CPU1 (irq/inno_hdmi_irq)
drm_dev_put(drm)
...
drm_encoder_cleanup(encoder)
drm_bridge_detach(&hdmi->bridge)
if (hdmi->bridge.dev)
bridge->dev = NULL;
kfree(drm)
drm_helper_hpd_irq_event(...)
<-- use-after-free or NULL deref
Depending on timing, this causes either a use-after-free of the drm_device
or a NULL pointer dereference in drm_helper_hpd_irq_event() if the compiler
reloads hdmi->bridge.dev. Calling drm_bridge_hpd_notify(&hdmi->bridge,
status) instead of drm_helper_hpd_irq_event() would serialize against HPD
disable through bridge->hpd_mutex.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261106-jh7110-clean-send-v7-0-68f7ea9913db@samsung.com?part=8
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v7 09/19] drm/bridge: inno-hdmi: Use a regmap for register access
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (7 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 08/19] drm/bridge: inno-hdmi: Split probe out of bind Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 10/19] drm/bridge: inno-hdmi: Add .disable platform operation Michal Wilczynski
` (10 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea
On some SoCs the HDMI controller does not own its register window. The
StarFive JH7110 documents one 64 KB block, u0_hdmitx, that holds both
the controller and the PHY, so the parent device maps it and owns the
regmap while the two children share it.
Access the registers through a regmap. Use the one supplied by the
parent device when there is one, and otherwise create an MMIO regmap
over our own resource. The MMIO regmap uses 32-bit accesses with a
4-byte stride, matching the readl_relaxed() and writel_relaxed() calls
it replaces, so the Rockchip platforms see the same register accesses.
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/Kconfig | 1 +
drivers/gpu/drm/bridge/inno-hdmi.c | 39 ++++++++++++++++++++++++++++++++------
2 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index c7da6b02d7b6b281f328fb3016ea2f167f8da093..34bcee88170317a4796178452ab5d2e673daf1fd 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -105,6 +105,7 @@ config DRM_INNO_HDMI
select DRM_DISPLAY_HDMI_HELPER
select DRM_DISPLAY_HELPER
select DRM_KMS_HELPER
+ select REGMAP_MMIO
config DRM_ITE_IT6263
tristate "ITE IT6263 LVDS/HDMI bridge"
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index aa64ffdbd30721603aebbcd5d5747851be789911..05007ed1d7af0b0f72721a0fd4def08fa621b525 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -396,7 +396,7 @@ struct inno_hdmi {
struct drm_bridge bridge;
struct clk *pclk;
struct clk *refclk;
- void __iomem *regs;
+ struct regmap *regmap;
struct regmap *grf;
struct inno_hdmi_i2c *i2c;
@@ -468,14 +468,25 @@ static int inno_hdmi_find_phy_config(struct inno_hdmi *hdmi,
return -EINVAL;
}
+static const struct regmap_config inno_hdmi_regmap_config = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+};
+
static inline u8 hdmi_readb(struct inno_hdmi *hdmi, u16 offset)
{
- return readl_relaxed(hdmi->regs + (offset) * 0x04);
+ u32 val;
+
+ if (regmap_read(hdmi->regmap, offset * 4, &val))
+ return 0;
+
+ return val;
}
static inline void hdmi_writeb(struct inno_hdmi *hdmi, u16 offset, u32 val)
{
- writel_relaxed(val, hdmi->regs + (offset) * 0x04);
+ regmap_write(hdmi->regmap, offset * 4, val);
}
static inline void hdmi_modb(struct inno_hdmi *hdmi, u16 offset,
@@ -1082,6 +1093,7 @@ struct inno_hdmi *inno_hdmi_probe(struct platform_device *pdev,
{
struct device *dev = &pdev->dev;
struct inno_hdmi *hdmi;
+ void __iomem *regs;
int irq;
int ret;
@@ -1097,9 +1109,24 @@ struct inno_hdmi *inno_hdmi_probe(struct platform_device *pdev,
hdmi->dev = dev;
hdmi->plat_data = plat_data;
- hdmi->regs = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(hdmi->regs))
- return ERR_CAST(hdmi->regs);
+ /*
+ * On platforms where the controller shares a register space with
+ * other blocks, the parent owns the regmap. Otherwise map our own
+ * resource.
+ */
+ if (dev->parent)
+ hdmi->regmap = dev_get_regmap(dev->parent, NULL);
+
+ if (!hdmi->regmap) {
+ regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(regs))
+ return ERR_CAST(regs);
+
+ hdmi->regmap = devm_regmap_init_mmio(dev, regs,
+ &inno_hdmi_regmap_config);
+ if (IS_ERR(hdmi->regmap))
+ return ERR_CAST(hdmi->regmap);
+ }
hdmi->pclk = devm_clk_get_enabled(hdmi->dev, "pclk");
if (IS_ERR(hdmi->pclk)) {
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 10/19] drm/bridge: inno-hdmi: Add .disable platform operation
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (8 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 09/19] drm/bridge: inno-hdmi: Use a regmap for register access Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 11/19] drm/bridge: inno-hdmi: Add .mode_valid " Michal Wilczynski
` (9 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
The Innosilicon HDMI driver supports platform-specific behavior through
the `inno_hdmi_plat_ops`. While it provides an `.enable` hook for
platform-specific power up sequences (like enabling PHYs), it lacks a
corresponding hook for power down.
This patch adds a new `.disable` op to the `inno_hdmi_plat_ops` struct
and calls it at the beginning of `inno_hdmi_bridge_atomic_disable()`.
This allows platform specific drivers, such as the StarFive JH7110,
to implement their own power down sequence (e.g., calling
phy_power_off() and clk_disable_unprepare()).
Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 4 ++++
include/drm/bridge/inno_hdmi.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index 05007ed1d7af0b0f72721a0fd4def08fa621b525..6d2756c36ea22e704b3350e716bcd2f55b79b912 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -882,6 +882,10 @@ static void inno_hdmi_bridge_atomic_disable(struct drm_bridge *bridge,
struct drm_atomic_commit *state)
{
struct inno_hdmi *hdmi = bridge_to_inno_hdmi(bridge);
+ const struct inno_hdmi_plat_ops *plat_ops = hdmi->plat_data->ops;
+
+ if (plat_ops && plat_ops->disable)
+ plat_ops->disable(hdmi->dev);
inno_hdmi_standby(hdmi);
}
diff --git a/include/drm/bridge/inno_hdmi.h b/include/drm/bridge/inno_hdmi.h
index 507d5e999183ca02e7dcbe4ce7568acc21426a89..0864f0d8862a4325821a84db6d04f14011d9aa78 100644
--- a/include/drm/bridge/inno_hdmi.h
+++ b/include/drm/bridge/inno_hdmi.h
@@ -16,6 +16,7 @@ struct platform_device;
struct inno_hdmi_plat_ops {
void (*enable)(struct device *pdev, struct drm_display_mode *mode);
+ void (*disable)(struct device *pdev);
};
struct inno_hdmi_phy_config {
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 11/19] drm/bridge: inno-hdmi: Add .mode_valid platform operation
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (9 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 10/19] drm/bridge: inno-hdmi: Add .disable platform operation Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 12/19] drm/bridge: inno-hdmi: Make the PHY configuration table optional Michal Wilczynski
` (8 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
inno_hdmi_bridge_mode_valid() validates the pixel clock against
hdmi->refclk, but that clock is optional and is only present on
platforms that describe a "ref" clock. Platforms where the pixel clock
is produced by a separate device - such as the StarFive JH7110, whose
PHY is both the clock and the PHY provider - have no "ref" clock, so
the check is skipped entirely and every mode is reported as valid.
A mode the platform cannot generate is then advertised to userspace.
The subsequent modeset appears to succeed, since the atomic enable path
cannot fail, and the display silently stays blank.
Add a .mode_valid platform operation so platforms can reject modes they
are unable to drive. Platforms that do not implement it are unaffected.
Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 9 +++++++++
include/drm/bridge/inno_hdmi.h | 5 ++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index 6d2756c36ea22e704b3350e716bcd2f55b79b912..3219558d6ef4198c5f81dbe51b242a2b0eb0f37e 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -819,6 +819,7 @@ static enum drm_mode_status inno_hdmi_bridge_mode_valid(struct drm_bridge *bridg
const struct drm_display_mode *mode)
{
struct inno_hdmi *hdmi = bridge_to_inno_hdmi(bridge);
+ const struct inno_hdmi_plat_ops *plat_ops = hdmi->plat_data->ops;
unsigned long mpixelclk, max_tolerance;
long rounded_refclk;
@@ -834,6 +835,14 @@ static enum drm_mode_status inno_hdmi_bridge_mode_valid(struct drm_bridge *bridg
if (inno_hdmi_find_phy_config(hdmi, mpixelclk) < 0)
return MODE_CLOCK_HIGH;
+ if (plat_ops && plat_ops->mode_valid) {
+ enum drm_mode_status status;
+
+ status = plat_ops->mode_valid(hdmi->dev, mode);
+ if (status != MODE_OK)
+ return status;
+ }
+
if (hdmi->refclk) {
rounded_refclk = clk_round_rate(hdmi->refclk, mpixelclk);
if (rounded_refclk < 0)
diff --git a/include/drm/bridge/inno_hdmi.h b/include/drm/bridge/inno_hdmi.h
index 0864f0d8862a4325821a84db6d04f14011d9aa78..790633fcea97a6b9840da7b19a0c0b0d7271fb83 100644
--- a/include/drm/bridge/inno_hdmi.h
+++ b/include/drm/bridge/inno_hdmi.h
@@ -8,15 +8,18 @@
#include <linux/types.h>
+#include <drm/drm_modes.h>
+
struct device;
struct drm_encoder;
-struct drm_display_mode;
struct inno_hdmi;
struct platform_device;
struct inno_hdmi_plat_ops {
void (*enable)(struct device *pdev, struct drm_display_mode *mode);
void (*disable)(struct device *pdev);
+ enum drm_mode_status (*mode_valid)(struct device *pdev,
+ const struct drm_display_mode *mode);
};
struct inno_hdmi_phy_config {
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 12/19] drm/bridge: inno-hdmi: Make the PHY configuration table optional
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (10 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 11/19] drm/bridge: inno-hdmi: Add .mode_valid " Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 15:17 ` sashiko-bot
2026-11-06 13:58 ` [PATCH v7 13/19] drm/bridge: inno-hdmi: Make the register clock source selectable Michal Wilczynski
` (7 subsequent siblings)
19 siblings, 1 reply; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
The pre-emphasis and drive-strength values in inno_hdmi_phy_config, and
the registers they are written to, belong to the PHY integrated into the
controller. A platform whose PHY is a separate device has neither, and
its own .mode_valid already validates the pixel clock against the real
PHY, so the table only bounds the generic check.
Let such a platform omit the table: skip the integrated-PHY register
writes in the power-up path and the table lookup in .mode_valid when it
is absent. Platforms that supply one are unaffected.
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index 3219558d6ef4198c5f81dbe51b242a2b0eb0f37e..84d00ee52b732a9a06e55d8b21127df4c60f7143 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -534,8 +534,14 @@ static void inno_hdmi_power_up(struct inno_hdmi *hdmi,
unsigned long mpixelclock)
{
struct inno_hdmi_phy_config *phy_config;
- int ret = inno_hdmi_find_phy_config(hdmi, mpixelclock);
+ int ret;
+
+ inno_hdmi_sys_power(hdmi, false);
+
+ if (!hdmi->plat_data->phy_configs)
+ goto out;
+ ret = inno_hdmi_find_phy_config(hdmi, mpixelclock);
if (ret < 0) {
phy_config = hdmi->plat_data->default_phy_config;
DRM_DEV_ERROR(hdmi->dev,
@@ -545,8 +551,6 @@ static void inno_hdmi_power_up(struct inno_hdmi *hdmi,
phy_config = &hdmi->plat_data->phy_configs[ret];
}
- inno_hdmi_sys_power(hdmi, false);
-
hdmi_writeb(hdmi, HDMI_PHY_PRE_EMPHASIS, phy_config->pre_emphasis);
hdmi_writeb(hdmi, HDMI_PHY_DRIVER, phy_config->voltage_level_control);
hdmi_writeb(hdmi, HDMI_PHY_SYS_CTL, 0x15);
@@ -556,6 +560,7 @@ static void inno_hdmi_power_up(struct inno_hdmi *hdmi,
hdmi_writeb(hdmi, HDMI_PHY_SYNC, 0x00);
hdmi_writeb(hdmi, HDMI_PHY_SYNC, 0x01);
+out:
inno_hdmi_sys_power(hdmi, true);
};
@@ -832,7 +837,8 @@ static enum drm_mode_status inno_hdmi_bridge_mode_valid(struct drm_bridge *bridg
if (mpixelclk < HDMI_TMDS_CHAR_RATE_MIN_HZ)
return MODE_CLOCK_LOW;
- if (inno_hdmi_find_phy_config(hdmi, mpixelclk) < 0)
+ if (hdmi->plat_data->phy_configs &&
+ inno_hdmi_find_phy_config(hdmi, mpixelclk) < 0)
return MODE_CLOCK_HIGH;
if (plat_ops && plat_ops->mode_valid) {
@@ -1110,11 +1116,6 @@ struct inno_hdmi *inno_hdmi_probe(struct platform_device *pdev,
int irq;
int ret;
- if (!plat_data->phy_configs || !plat_data->default_phy_config) {
- dev_err(dev, "Missing platform PHY ops\n");
- return ERR_PTR(-ENODEV);
- }
-
hdmi = devm_drm_bridge_alloc(dev, struct inno_hdmi, bridge, &inno_hdmi_bridge_funcs);
if (IS_ERR(hdmi))
return ERR_CAST(hdmi);
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v7 12/19] drm/bridge: inno-hdmi: Make the PHY configuration table optional
2026-11-06 13:58 ` [PATCH v7 12/19] drm/bridge: inno-hdmi: Make the PHY configuration table optional Michal Wilczynski
@ 2026-11-06 15:17 ` sashiko-bot
0 siblings, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-11-06 15:17 UTC (permalink / raw)
To: Michal Wilczynski; +Cc: devicetree, dri-devel, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/bridge: inno-hdmi: unguarded integrated-PHY writes when
phy_configs is NULL
--
commit f1f2bae7d85c6c615ff85796724277a1cd86c36d
Author: Michal Wilczynski <m.wilczynski@samsung.com>
drm/bridge: inno-hdmi: Make the PHY configuration table optional
This commit makes plat_data->phy_configs optional so platforms with a
separate PHY device skip the integrated-PHY register writes in
inno_hdmi_power_up() and the table lookup in inno_hdmi_bridge_mode_valid().
> diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
> index 3219558d6ef41..84d00ee52b732 100644
> --- a/drivers/gpu/drm/bridge/inno-hdmi.c
> +++ b/drivers/gpu/drm/bridge/inno-hdmi.c
> @@ -534,8 +534,14 @@ static void inno_hdmi_power_up(struct inno_hdmi *hdmi,
> unsigned long mpixelclock)
> {
> struct inno_hdmi_phy_config *phy_config;
> - int ret = inno_hdmi_find_phy_config(hdmi, mpixelclock);
> + int ret;
> +
> + inno_hdmi_sys_power(hdmi, false);
> +
> + if (!hdmi->plat_data->phy_configs)
> + goto out;
[Severity: Medium]
Should inno_hdmi_standby() and inno_hdmi_config_video_timing() also skip
the integrated-PHY register writes when hdmi->plat_data->phy_configs is
NULL?
inno_hdmi_standby() (called from inno_hdmi_init_hw() at probe and
inno_hdmi_bridge_atomic_disable() on disable) still unconditionally writes
to the same HDMI_PHY_DRIVER, HDMI_PHY_PRE_EMPHASIS, HDMI_PHY_CHG_PWR, and
HDMI_PHY_SYS_CTL registers that inno_hdmi_power_up() now skips restoring.
inno_hdmi_config_video_timing() likewise still writes to
HDMI_PHY_PRE_DIV_RATIO, HDMI_PHY_FEEDBACK_DIV_RATIO_LOW, and
HDMI_PHY_FEEDBACK_DIV_RATIO_HIGH on modeset.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261106-jh7110-clean-send-v7-0-68f7ea9913db@samsung.com?part=12
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v7 13/19] drm/bridge: inno-hdmi: Make the register clock source selectable
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (11 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 12/19] drm/bridge: inno-hdmi: Make the PHY configuration table optional Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 14/19] drm/bridge: inno-hdmi: Make the supported HDMI version selectable Michal Wilczynski
` (6 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
inno_hdmi_init_hw() drives the register interface from the system clock
on every platform, by setting v_REG_CLK_SOURCE_SYS unconditionally in
HDMI_SYS_CTRL.
That is not right everywhere. On the JH7110 a Framework 13 (fml13v01)
panel flickers continuously with the system clock selected and behaves
once the TMDS clock drives the register interface instead. Maud Spierings
found this by diffing HDMI_SYS_CTRL against the StarFive vendor kernel,
which leaves the bit clear.
Add a plat_data flag for it rather than changing the bit for everyone.
The Rockchip integrations keep the system clock, so this is a no-op for
them; only a platform that asks for it gets the TMDS clock.
Reported-by: Maud Spierings <maud_spierings@murena.io>
Closes: https://lore.kernel.org/all/e780ecb8-918f-4816-99c8-b69b10b25a18@murena.io/
Tested-by: Maud Spierings <maud_spierings@murena.io>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 4 +++-
include/drm/bridge/inno_hdmi.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index 84d00ee52b732a9a06e55d8b21127df4c60f7143..9aa005ff65a23bf55672f97aa1ea6688cf1b7ba3 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -576,7 +576,9 @@ static void inno_hdmi_init_hw(struct inno_hdmi *hdmi)
usleep_range(100, 150);
msk = m_REG_CLK_INV | m_REG_CLK_SOURCE | m_POWER | m_INT_POL;
- val = v_REG_CLK_INV | v_REG_CLK_SOURCE_SYS | v_PWR_ON | v_INT_POL_HIGH;
+ val = v_REG_CLK_INV | v_PWR_ON | v_INT_POL_HIGH;
+ val |= hdmi->plat_data->reg_clk_source_tmds ? v_REG_CLK_SOURCE_TMDS :
+ v_REG_CLK_SOURCE_SYS;
hdmi_modb(hdmi, HDMI_SYS_CTRL, msk, val);
inno_hdmi_standby(hdmi);
diff --git a/include/drm/bridge/inno_hdmi.h b/include/drm/bridge/inno_hdmi.h
index 790633fcea97a6b9840da7b19a0c0b0d7271fb83..cc5099d05f641eef5de91ed5becde7337c04b013 100644
--- a/include/drm/bridge/inno_hdmi.h
+++ b/include/drm/bridge/inno_hdmi.h
@@ -32,6 +32,8 @@ struct inno_hdmi_plat_data {
const struct inno_hdmi_plat_ops *ops;
struct inno_hdmi_phy_config *phy_configs;
struct inno_hdmi_phy_config *default_phy_config;
+ /* Clock the register interface from the TMDS clock, not the system clock. */
+ bool reg_clk_source_tmds;
};
struct inno_hdmi *inno_hdmi_bind(struct platform_device *pdev,
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 14/19] drm/bridge: inno-hdmi: Make the supported HDMI version selectable
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (12 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 13/19] drm/bridge: inno-hdmi: Make the register clock source selectable Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 15/19] soc: starfive: Add jh7110-hdmi-subsystem driver Michal Wilczynski
` (5 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea
inno_hdmi_probe() advertises HDMI 1.2 for every integration, which caps
the TMDS character rate at 165 MHz. That matches the Rockchip variants,
whose PHY configuration tables stop at 165 MHz, but not every SoC that
uses this controller: the StarFive JH7110 supports HDMI 1.4b and drives
pixel clocks up to 297 MHz for 3840x2160 and 4096x2160 at 30 Hz.
Add a plat_data field for the supported version and keep HDMI 1.2 when
it is left unset, so the Rockchip integrations are unchanged.
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 3 ++-
include/drm/bridge/inno_hdmi.h | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index 9aa005ff65a23bf55672f97aa1ea6688cf1b7ba3..ce036965a483e47d349df85db1ed7dad31f4e8f0 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -1177,7 +1177,8 @@ struct inno_hdmi *inno_hdmi_probe(struct platform_device *pdev,
hdmi->bridge.type = DRM_MODE_CONNECTOR_HDMIA;
hdmi->bridge.vendor = "Inno";
hdmi->bridge.product = "Inno HDMI";
- hdmi->bridge.supported_hdmi_ver = HDMI_VERSION_1_2;
+ hdmi->bridge.supported_hdmi_ver = plat_data->supported_hdmi_ver ?:
+ HDMI_VERSION_1_2;
hdmi->bridge.ddc = inno_hdmi_i2c_adapter(hdmi);
if (IS_ERR(hdmi->bridge.ddc))
diff --git a/include/drm/bridge/inno_hdmi.h b/include/drm/bridge/inno_hdmi.h
index cc5099d05f641eef5de91ed5becde7337c04b013..89a38f26091eda1ef7818fea9d1d9c99e4ae019e 100644
--- a/include/drm/bridge/inno_hdmi.h
+++ b/include/drm/bridge/inno_hdmi.h
@@ -6,6 +6,7 @@
#ifndef __INNO_HDMI__
#define __INNO_HDMI__
+#include <linux/hdmi.h>
#include <linux/types.h>
#include <drm/drm_modes.h>
@@ -34,6 +35,8 @@ struct inno_hdmi_plat_data {
struct inno_hdmi_phy_config *default_phy_config;
/* Clock the register interface from the TMDS clock, not the system clock. */
bool reg_clk_source_tmds;
+ /* HDMI version the integration supports; HDMI 1.2 if left unset. */
+ enum hdmi_version supported_hdmi_ver;
};
struct inno_hdmi *inno_hdmi_bind(struct platform_device *pdev,
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 15/19] soc: starfive: Add jh7110-hdmi-subsystem driver
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (13 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 14/19] drm/bridge: inno-hdmi: Make the supported HDMI version selectable Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 15:35 ` sashiko-bot
2026-11-06 13:58 ` [PATCH v7 16/19] soc: starfive: Add jh7110-vout-subsystem driver Michal Wilczynski
` (4 subsequent siblings)
19 siblings, 1 reply; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
Add the parent driver for the monolithic JH7110 HDMI IP block.
This driver binds to the starfive,jh7110-hdmi-subsystem node. It maps the
shared register block, creates a regmap, and calls
devm_of_platform_populate() to create its hdmi_phy and hdmi_controller
child devices, which retrieve the shared regmap from this parent.
The NoC display bus clock and reset that gate access to this region, and
the PD_VOUT power domain it sits in, are held by the video output
subsystem parent for as long as this device exists, so there is nothing
for this driver to bring up itself.
Co-developed-by: Dominique Belhachemi <db@domibel.de>
Signed-off-by: Dominique Belhachemi <db@domibel.de>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/soc/starfive/Kconfig | 18 +++++++
drivers/soc/starfive/Makefile | 1 +
drivers/soc/starfive/jh7110-hdmi-subsystem.c | 72 ++++++++++++++++++++++++++++
3 files changed, 91 insertions(+)
diff --git a/drivers/soc/starfive/Kconfig b/drivers/soc/starfive/Kconfig
index 04b020083d3eecd7754bb2e2ec1b4fc8f525a344..e19994a212d4af49eaed595bab6fecc19677b2b3 100644
--- a/drivers/soc/starfive/Kconfig
+++ b/drivers/soc/starfive/Kconfig
@@ -3,4 +3,22 @@ menu "StarFive SoC (System On Chip) specific Drivers"
source "drivers/soc/starfive/socinfo/Kconfig"
+config SOC_STARFIVE_JH7110_HDMI_SUBSYSTEM
+ tristate "StarFive JH7110 HDMI subsystem driver"
+ depends on ARCH_STARFIVE || COMPILE_TEST
+ depends on OF
+ select REGMAP_MMIO
+ help
+ This option enables the parent driver
+ for the monolithic StarFive JH7110 HDMI peripheral.
+
+ The JH7110 HDMI IP block contains both the digital controller
+ (DRM bridge) and the analog PHY (clock/phy provider) logic within
+ a single shared register space.
+
+ This driver acts as a wrapper. Its only job is to map the
+ shared registers and create separate logical child devices
+ for the "PHY" and the "controller", which have their own clocks
+ and roles but share the register space.
+
endmenu
diff --git a/drivers/soc/starfive/Makefile b/drivers/soc/starfive/Makefile
index ca1e609b81045f5e11daf249c116b22c8dc0e4d0..36fbb6f984986e4794ffb2c6c1485b6644efc4eb 100644
--- a/drivers/soc/starfive/Makefile
+++ b/drivers/soc/starfive/Makefile
@@ -1,2 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y += socinfo/
+obj-$(CONFIG_SOC_STARFIVE_JH7110_HDMI_SUBSYSTEM) += jh7110-hdmi-subsystem.o
diff --git a/drivers/soc/starfive/jh7110-hdmi-subsystem.c b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
new file mode 100644
index 0000000000000000000000000000000000000000..b01dc66450f516599c013df0383e6fde987f390e
--- /dev/null
+++ b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
@@ -0,0 +1,72 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for the StarFive JH7110 HDMI subsystem
+ *
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ * Author: Michal Wilczynski <m.wilczynski@samsung.com>
+ *
+ * This driver binds to the monolithic HDMI block and creates separate
+ * logical platform devices for the HDMI Controller (bridge) and the
+ * HDMI PHY (clock/phy provider), allowing them to share a single regmap.
+ */
+
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+static const struct regmap_config starfive_hdmi_regmap_config = {
+ .reg_bits = 32,
+ .val_bits = 8,
+ .max_register = 0x3fff,
+};
+
+static int starfive_hdmi_subsys_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct regmap *regmap;
+ void __iomem *regs;
+ int ret;
+
+ /*
+ * The NoC display bus clock and reset that gate access to this region,
+ * and the PD_VOUT power domain it sits in, are held by the video
+ * output subsystem parent for as long as this device exists.
+ */
+ regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(regs))
+ return PTR_ERR(regs);
+
+ regmap = devm_regmap_init_mmio(dev, regs,
+ &starfive_hdmi_regmap_config);
+ if (IS_ERR(regmap))
+ return dev_err_probe(dev, PTR_ERR(regmap),
+ "Failed to init shared regmap\n");
+
+ ret = devm_of_platform_populate(dev);
+ if (ret)
+ return dev_err_probe(dev, ret,
+ "Failed to populate child devices\n");
+
+ return 0;
+}
+
+static const struct of_device_id starfive_hdmi_subsys_of_match[] = {
+ { .compatible = "starfive,jh7110-hdmi-subsystem", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, starfive_hdmi_subsys_of_match);
+
+static struct platform_driver starfive_hdmi_subsys_driver = {
+ .probe = starfive_hdmi_subsys_probe,
+ .driver = {
+ .name = "starfive-hdmi-subsystem",
+ .of_match_table = starfive_hdmi_subsys_of_match,
+ },
+};
+module_platform_driver(starfive_hdmi_subsys_driver);
+
+MODULE_AUTHOR("Michal Wilczynski <m.wilczynski@samsung.com>");
+MODULE_DESCRIPTION("StarFive JH7110 HDMI subsystem Driver");
+MODULE_LICENSE("GPL");
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v7 15/19] soc: starfive: Add jh7110-hdmi-subsystem driver
2026-11-06 13:58 ` [PATCH v7 15/19] soc: starfive: Add jh7110-hdmi-subsystem driver Michal Wilczynski
@ 2026-11-06 15:35 ` sashiko-bot
0 siblings, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-11-06 15:35 UTC (permalink / raw)
To: Michal Wilczynski; +Cc: devicetree, dri-devel, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] soc: starfive: wrong regmap stride and val_bits in
jh7110-hdmi-subsystem
--
commit 7b3e8ed6b5c2397fee05f3afbf224c172c611228
Author: Michal Wilczynski <m.wilczynski@samsung.com>
soc: starfive: Add jh7110-hdmi-subsystem driver
This commit adds a platform driver for the StarFive JH7110 HDMI subsystem
that initializes a shared MMIO regmap and populates the child HDMI PHY and
controller devices.
> diff --git a/drivers/soc/starfive/jh7110-hdmi-subsystem.c b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
> new file mode 100644
> index 0000000000000..b01dc66450f51
> --- /dev/null
> +++ b/drivers/soc/starfive/jh7110-hdmi-subsystem.c
> @@ -0,0 +1,72 @@
[ ... ]
> +static const struct regmap_config starfive_hdmi_regmap_config = {
> + .reg_bits = 32,
> + .val_bits = 8,
> + .max_register = 0x3fff,
> +};
[Severity: Medium]
Should starfive_hdmi_regmap_config set .val_bits = 32, .reg_stride = 4, and
.max_register = 0x3ffc to match the 4-byte register layout expected by the
child drivers?
Both the HDMI controller and PHY drivers address this shared regmap at
4-byte-strided offsets (offset * 4 and reg * 4), and the controller's own
inno_hdmi_regmap_config uses 32-bit values with a 4-byte stride:
drivers/gpu/drm/bridge/inno-hdmi.c:
static const struct regmap_config inno_hdmi_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
};
static inline u8 hdmi_readb(struct inno_hdmi *hdmi, u16 offset)
{
u32 val;
if (regmap_read(hdmi->regmap, offset * 4, &val))
return 0;
return val;
}
With .val_bits = 8 and .reg_stride left at its default of 1, regmap_mmio
uses readb()/writeb() instead of 32-bit MMIO accessors, does not check
4-byte register alignment, and steps through 0x0000..0x3fff byte-by-byte in
regmap debugfs, issuing unaligned byte reads to the upper three bytes of
every 32-bit register word.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261106-jh7110-clean-send-v7-0-68f7ea9913db@samsung.com?part=15
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v7 16/19] soc: starfive: Add jh7110-vout-subsystem driver
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (14 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 15/19] soc: starfive: Add jh7110-hdmi-subsystem driver Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 17/19] drm/bridge: starfive: Add JH7110 HDMI controller driver Michal Wilczynski
` (3 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
Nothing in the video output subsystem can reach its own registers until
the NoC display bus clock and reset are up and PD_VOUT is powered, and
those are shared by every device in the region. Leaving them to whichever
consumer probes first works by accident and stops working as soon as the
probe order changes.
Add a driver for the subsystem node that takes the bus clock and reset,
holds a runtime PM reference so genpd keeps PD_VOUT powered, and then
populates its children. All three are released only once the last child
is gone.
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/soc/starfive/Kconfig | 16 ++++++
drivers/soc/starfive/Makefile | 1 +
drivers/soc/starfive/jh7110-vout-subsystem.c | 82 ++++++++++++++++++++++++++++
3 files changed, 99 insertions(+)
diff --git a/drivers/soc/starfive/Kconfig b/drivers/soc/starfive/Kconfig
index e19994a212d4af49eaed595bab6fecc19677b2b3..d57480c42f2b6b06142b591e6ccef4909aced978 100644
--- a/drivers/soc/starfive/Kconfig
+++ b/drivers/soc/starfive/Kconfig
@@ -21,4 +21,20 @@ config SOC_STARFIVE_JH7110_HDMI_SUBSYSTEM
for the "PHY" and the "controller", which have their own clocks
and roles but share the register space.
+config SOC_STARFIVE_JH7110_VOUT_SUBSYSTEM
+ tristate "StarFive JH7110 video output subsystem driver"
+ depends on ARCH_STARFIVE || COMPILE_TEST
+ depends on OF
+ select PM
+ help
+ This option enables the parent driver for the StarFive JH7110
+ video output subsystem, which the documentation calls dom_vout_top.
+
+ The subsystem covers the DC8200 display controller, the HDMI
+ transmitter, the video output clock generator and the video output
+ system controller. They share one NoC port whose clock and reset
+ gate access to the whole register region, and the region sits in
+ the PD_VOUT power domain. This driver owns those resources and
+ holds them for as long as any of its children exist.
+
endmenu
diff --git a/drivers/soc/starfive/Makefile b/drivers/soc/starfive/Makefile
index 36fbb6f984986e4794ffb2c6c1485b6644efc4eb..3b8b8a6847f9021920a9af7296c49e1c45114c34 100644
--- a/drivers/soc/starfive/Makefile
+++ b/drivers/soc/starfive/Makefile
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y += socinfo/
obj-$(CONFIG_SOC_STARFIVE_JH7110_HDMI_SUBSYSTEM) += jh7110-hdmi-subsystem.o
+obj-$(CONFIG_SOC_STARFIVE_JH7110_VOUT_SUBSYSTEM) += jh7110-vout-subsystem.o
diff --git a/drivers/soc/starfive/jh7110-vout-subsystem.c b/drivers/soc/starfive/jh7110-vout-subsystem.c
new file mode 100644
index 0000000000000000000000000000000000000000..af632692e2139d9d07edd478a299b170ad1b7104
--- /dev/null
+++ b/drivers/soc/starfive/jh7110-vout-subsystem.c
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for the StarFive JH7110 video output subsystem
+ *
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ * Author: Michal Wilczynski <m.wilczynski@samsung.com>
+ *
+ * The display hardware sits behind a single NoC port whose clock and reset
+ * gate access to every register in the region, inside the PD_VOUT power
+ * domain. Nothing below this node can reach its own registers until all three
+ * are up, so bring them up here and hold them for as long as any child device
+ * exists, rather than leaving them to whichever consumer happens to probe
+ * first.
+ */
+
+#include <linux/clk.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
+#include <linux/reset.h>
+
+static void jh7110_vout_subsys_pm_put(void *data)
+{
+ pm_runtime_put_sync(data);
+}
+
+static int jh7110_vout_subsys_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct reset_control *bus_rst;
+ struct clk *bus_clk;
+ int ret;
+
+ /*
+ * Take a runtime PM reference for the lifetime of this device. genpd
+ * only keeps PD_VOUT powered while something actually holds it, and
+ * an unclocked or unpowered access to this region wedges the bus.
+ */
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return ret;
+
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to power on PD_VOUT\n");
+
+ ret = devm_add_action_or_reset(dev, jh7110_vout_subsys_pm_put, dev);
+ if (ret)
+ return ret;
+
+ bus_clk = devm_clk_get_enabled(dev, NULL);
+ if (IS_ERR(bus_clk))
+ return dev_err_probe(dev, PTR_ERR(bus_clk),
+ "Failed to enable NoC bus clock\n");
+
+ bus_rst = devm_reset_control_get_exclusive_deasserted(dev, NULL);
+ if (IS_ERR(bus_rst))
+ return dev_err_probe(dev, PTR_ERR(bus_rst),
+ "Failed to deassert NoC bus reset\n");
+
+ return devm_of_platform_populate(dev);
+}
+
+static const struct of_device_id jh7110_vout_subsys_of_match[] = {
+ { .compatible = "starfive,jh7110-vout-subsystem", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, jh7110_vout_subsys_of_match);
+
+static struct platform_driver jh7110_vout_subsys_driver = {
+ .probe = jh7110_vout_subsys_probe,
+ .driver = {
+ .name = "jh7110-vout-subsystem",
+ .of_match_table = jh7110_vout_subsys_of_match,
+ },
+};
+module_platform_driver(jh7110_vout_subsys_driver);
+
+MODULE_AUTHOR("Michal Wilczynski <m.wilczynski@samsung.com>");
+MODULE_DESCRIPTION("StarFive JH7110 video output subsystem driver");
+MODULE_LICENSE("GPL");
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 17/19] drm/bridge: starfive: Add JH7110 HDMI controller driver
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (15 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 16/19] soc: starfive: Add jh7110-vout-subsystem driver Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 13:58 ` [PATCH v7 18/19] riscv: dts: starfive: jh7110: Update DT for display subsystem Michal Wilczynski
` (2 subsequent siblings)
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
Add the HDMI controller (bridge) driver for the StarFive JH7110.
This driver binds to the starfive,jh7110-inno-hdmi-controller node. It
gets its register access, module and bus clocks from voutcrg, and
consumes the pixel clock and the PHY from its hdmi_phy sibling.
The driver calls the generic inno_hdmi_probe function, which picks up
the regmap shared with the PHY from the parent device and registers a
DRM bridge. The .enable hook is responsible for setting the PHY's pixel
clock rate via clk_set_rate() and powering on the PHY via
phy_power_on().
The DC8200 has two panels, each exposing a DP and a DPI interface, and a
mux in the video output system controller picks which of them drives the
HDMI transmitter. It comes out of reset on panel 0 / DPI, which happens
to be what the default wiring needs, so nothing has had to program it so
far. Derive it from the port graph instead, taking the panel from the
remote port number and the interface from the remote endpoint number, so
that a board describing a different output is honoured.
The generic driver holds the clock it looks up as the register access
clock enabled for its lifetime, and derives the DDC divider from that
clock's rate, so point it at the system clock. Naming the pixel clock
there instead would keep the PHY pre-PLL powered from probe onwards and
size the divider from the wrong rate.
The PHY can only generate the discrete set of pixel clocks described by
its pre-PLL table, so .mode_valid rejects any mode clk_round_rate()
cannot satisfy. Without it such a mode would be advertised to userspace
and the modeset would appear to succeed while the display stayed blank.
.enable returns early when the rate is unsupported or the PHY fails to
power on, so track whether the pixel clock was actually enabled and let
.disable tear down only what was brought up, otherwise the clock
refcount underflows.
The clocks and the reset are torn down through devm rather than from
.remove, so that they outlive the bridge that inno_hdmi_probe() adds with
devm_drm_bridge_add(). Releasing them in .remove runs before devres
unwinds and would leave the bridge registered with its clocks already
gated.
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
drivers/gpu/drm/bridge/Kconfig | 11 ++
drivers/gpu/drm/bridge/Makefile | 1 +
drivers/gpu/drm/bridge/jh7110-inno-hdmi.c | 297 ++++++++++++++++++++++++++++++
3 files changed, 309 insertions(+)
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index 34bcee88170317a4796178452ab5d2e673daf1fd..9c2a37ac816bbca843534662a08307a6bb37e6f8 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -357,6 +357,17 @@ config DRM_SOLOMON_SSD2825
Say M here if you want to support this hardware as a module.
The module will be named "ssd2825".
+config DRM_STARFIVE_JH7110_INNO_HDMI
+ tristate "Starfive JH7110 Innosilicon HDMI bridge"
+ depends on OF
+ depends on ARCH_STARFIVE || COMPILE_TEST
+ select DRM_INNO_HDMI
+ help
+ Enable support for the StarFive JH7110 specific implementation
+ of the Innosilicon HDMI controller.
+ This driver acts as a glue layer between the JH7110 HDMI subsystem
+ parent driver and the generic Innosilicon HDMI bridge driver.
+
config DRM_THINE_THC63LVD1024
tristate "Thine THC63LVD1024 LVDS decoder bridge"
depends on OF
diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
index 15cc821d85b7ea6f3cdc313f3e521b028de567d7..5d843f4ad7ed50b28cb75286c5e22789d91a0836 100644
--- a/drivers/gpu/drm/bridge/Makefile
+++ b/drivers/gpu/drm/bridge/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o
obj-$(CONFIG_DRM_SII902X) += sii902x.o
obj-$(CONFIG_DRM_SII9234) += sii9234.o
obj-$(CONFIG_DRM_SIMPLE_BRIDGE) += simple-bridge.o
+obj-$(CONFIG_DRM_STARFIVE_JH7110_INNO_HDMI) += jh7110-inno-hdmi.o
obj-$(CONFIG_DRM_SOLOMON_SSD2825) += ssd2825.o
obj-$(CONFIG_DRM_THEAD_TH1520_DW_HDMI) += th1520-dw-hdmi.o
obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o
diff --git a/drivers/gpu/drm/bridge/jh7110-inno-hdmi.c b/drivers/gpu/drm/bridge/jh7110-inno-hdmi.c
new file mode 100644
index 0000000000000000000000000000000000000000..a0283f83ddc93e3e6c9e9192b73dca9a63f9d9ab
--- /dev/null
+++ b/drivers/gpu/drm/bridge/jh7110-inno-hdmi.c
@@ -0,0 +1,297 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) StarFive Technology Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ * Author: Michal Wilczynski <m.wilczynski@samsung.com>
+ *
+ * HDMI controller (bridge) driver for the StarFive JH7110 HDMI subsystem.
+ */
+
+#include <linux/bitfield.h>
+#include <linux/cleanup.h>
+#include <linux/clk.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/of_graph.h>
+#include <linux/platform_device.h>
+#include <linux/phy/phy.h>
+#include <linux/regmap.h>
+#include <linux/reset.h>
+
+#include <drm/bridge/inno_hdmi.h>
+#include <drm/drm_modes.h>
+
+/* dom_vout_syscon: HDMI pixel data mapping */
+#define VOUT_SYSCFG_4 0x4
+#define VOUT_HDMI_DP_BIT_DEPTH BIT(25)
+#define VOUT_HDMI_DP_YUV_MODE GENMASK(27, 26)
+#define VOUT_HDMI_DP_YUV_MODE_RGB 3
+#define VOUT_HDMI_DPI_BIT_DEPTH GENMASK(29, 28)
+#define VOUT_HDMI_DPI_BIT_DEPTH_8BIT 0
+#define VOUT_HDMI_DPI_DP_SEL BIT(30)
+
+/* u2_display_panel_mux feeds HDMI_Ctrl, see the block diagram in 5.1 */
+#define VOUT_SYSCFG_8 0x8
+#define VOUT_HDMI_PANEL_SEL BIT(4)
+
+enum stf_hdmi_ctrl_clocks { CLK_SYS = 0, CLK_M, CLK_B, CLK_PCLK, CLK_CTRL_NUM };
+
+struct stf_inno_hdmi_controller {
+ struct clk_bulk_data clks[CLK_CTRL_NUM];
+ struct reset_control *tx_rst;
+ struct phy *phy;
+ bool enabled;
+};
+
+static enum drm_mode_status
+inno_hdmi_starfive_mode_valid(struct device *dev,
+ const struct drm_display_mode *mode)
+{
+ struct stf_inno_hdmi_controller *ctrl = dev_get_drvdata(dev);
+ unsigned long pixelclk = mode->clock * 1000;
+ long rounded;
+
+ /*
+ * The PHY can only generate the discrete set of pixel clocks described
+ * by its pre-PLL table, and clk_round_rate() fails for anything else.
+ * Reject those modes here: without this the modeset would appear to
+ * succeed while the PHY never produces a signal.
+ */
+ rounded = clk_round_rate(ctrl->clks[CLK_PCLK].clk, pixelclk);
+ if (rounded != pixelclk)
+ return MODE_NOCLOCK;
+
+ return MODE_OK;
+}
+
+static void inno_hdmi_starfive_enable(struct device *dev,
+ struct drm_display_mode *mode)
+{
+ struct stf_inno_hdmi_controller *ctrl = dev_get_drvdata(dev);
+ int ret;
+
+ /*
+ * 1. Set the pixel clock rate. This calls the PHY driver's .set_rate op.
+ */
+ ret = clk_set_rate(ctrl->clks[CLK_PCLK].clk, mode->clock * 1000);
+ if (ret) {
+ dev_err(dev, "Failed to set pclk rate %d: %d\n",
+ mode->clock * 1000, ret);
+ return;
+ }
+
+ /*
+ * 2. Enable the pixel clock. This calls the PHY driver's .prepare op.
+ */
+ ret = clk_prepare_enable(ctrl->clks[CLK_PCLK].clk);
+ if (ret) {
+ dev_err(dev, "Failed to enable pclk: %d\n", ret);
+ return;
+ }
+
+ /*
+ * 3. Power on the PHY. This calls the PHY driver's .power_on op,
+ * which configures the Post-PLL and analog blocks.
+ */
+ ret = phy_power_on(ctrl->phy);
+ if (ret) {
+ dev_err(dev, "Failed to power on PHY: %d\n", ret);
+ clk_disable_unprepare(ctrl->clks[CLK_PCLK].clk);
+ return;
+ }
+
+ ctrl->enabled = true;
+}
+
+static void inno_hdmi_starfive_disable(struct device *dev)
+{
+ struct stf_inno_hdmi_controller *ctrl = dev_get_drvdata(dev);
+
+ /*
+ * .enable bails out early if the pixel clock rate is unsupported or
+ * the PHY fails to power on, leaving pclk and the PHY untouched.
+ * Only tear down what was actually brought up, otherwise the clock
+ * refcount underflows.
+ */
+ if (!ctrl->enabled)
+ return;
+
+ phy_power_off(ctrl->phy);
+ clk_disable_unprepare(ctrl->clks[CLK_PCLK].clk);
+ ctrl->enabled = false;
+}
+
+/*
+ * The DC8200 has two panels, each exposing a DP and a DPI interface, and a mux
+ * in dom_vout_syscon picks which of them drives the HDMI transmitter. Derive
+ * the mux setting from the port graph: the remote port number selects the
+ * DC8200 panel, and the remote endpoint number the interface on that panel
+ * (0 for DPI, 1 for DP). Both drive 8-bit RGB, the only format this driver
+ * currently produces.
+ */
+static int stf_inno_hdmi_setup_mux(struct device *dev)
+{
+ struct of_endpoint endpoint;
+ struct regmap *syscon;
+ u32 mask, val;
+ int ret;
+
+ syscon = syscon_regmap_lookup_by_phandle(dev->of_node,
+ "starfive,vout-syscon");
+ if (IS_ERR(syscon))
+ return dev_err_probe(dev, PTR_ERR(syscon),
+ "Failed to get vout syscon\n");
+
+ struct device_node *ep __free(device_node) =
+ of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
+ if (!ep)
+ return dev_err_probe(dev, -ENODEV, "No input endpoint\n");
+
+ struct device_node *remote __free(device_node) =
+ of_graph_get_remote_endpoint(ep);
+ if (!remote)
+ return dev_err_probe(dev, -ENODEV,
+ "Input endpoint is not connected\n");
+
+ ret = of_graph_parse_endpoint(remote, &endpoint);
+ if (ret)
+ return dev_err_probe(dev, ret,
+ "Failed to parse the remote endpoint\n");
+
+ if (endpoint.port > 1 || endpoint.id > 1)
+ return dev_err_probe(dev, -EINVAL,
+ "Unsupported DC8200 output %u/%u\n",
+ endpoint.port, endpoint.id);
+
+ /* Data mapping: 8-bit RGB on whichever interface is in use. */
+ mask = VOUT_HDMI_DPI_DP_SEL | VOUT_HDMI_DP_BIT_DEPTH |
+ VOUT_HDMI_DP_YUV_MODE | VOUT_HDMI_DPI_BIT_DEPTH;
+ val = FIELD_PREP(VOUT_HDMI_DPI_DP_SEL, endpoint.id) |
+ FIELD_PREP(VOUT_HDMI_DP_YUV_MODE, VOUT_HDMI_DP_YUV_MODE_RGB) |
+ FIELD_PREP(VOUT_HDMI_DPI_BIT_DEPTH, VOUT_HDMI_DPI_BIT_DEPTH_8BIT);
+
+ ret = regmap_update_bits(syscon, VOUT_SYSCFG_4, mask, val);
+ if (ret)
+ return ret;
+
+ /* Which DC8200 panel drives the HDMI transmitter. */
+ return regmap_update_bits(syscon, VOUT_SYSCFG_8, VOUT_HDMI_PANEL_SEL,
+ FIELD_PREP(VOUT_HDMI_PANEL_SEL,
+ endpoint.port));
+}
+
+static void stf_inno_hdmi_clk_disable(void *data)
+{
+ struct stf_inno_hdmi_controller *ctrl = data;
+
+ clk_bulk_disable_unprepare(CLK_CTRL_NUM - 1, ctrl->clks);
+}
+
+static void stf_inno_hdmi_rst_assert(void *data)
+{
+ reset_control_assert(data);
+}
+
+static int starfive_inno_hdmi_controller_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct stf_inno_hdmi_controller *ctrl;
+ const struct inno_hdmi_plat_data *plat_data;
+ struct inno_hdmi *inno;
+ int ret;
+
+ ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL);
+ if (!ctrl)
+ return -ENOMEM;
+
+ platform_set_drvdata(pdev, ctrl);
+
+ ctrl->phy = devm_phy_get(dev, NULL);
+ if (IS_ERR(ctrl->phy))
+ return dev_err_probe(dev, PTR_ERR(ctrl->phy), "Failed to get PHY\n");
+
+ ctrl->tx_rst = devm_reset_control_get_exclusive(dev, NULL);
+ if (IS_ERR(ctrl->tx_rst))
+ return dev_err_probe(dev, PTR_ERR(ctrl->tx_rst), "failed to get tx reset\n");
+
+ /* Populate the clock names this controller *consumes* */
+ ctrl->clks[CLK_SYS].id = "pclk";
+ ctrl->clks[CLK_M].id = "mclk";
+ ctrl->clks[CLK_B].id = "bclk";
+ ctrl->clks[CLK_PCLK].id = "pixel"; /* Generated by the PHY */
+
+ ret = devm_clk_bulk_get(dev, CLK_CTRL_NUM, ctrl->clks);
+ if (ret)
+ return dev_err_probe(dev, ret, "Unable to get controller clocks\n");
+
+ /*
+ * Tear the clocks and the reset down through devm, so that they outlive
+ * everything registered after them. The bridge is added with
+ * devm_drm_bridge_add(), and unwinding in the wrong order would leave it
+ * registered while its clocks are already gated.
+ *
+ * The pixel clock is enabled on demand during modeset.
+ */
+ ret = clk_bulk_prepare_enable(CLK_CTRL_NUM - 1, ctrl->clks);
+ if (ret)
+ return ret;
+
+ ret = devm_add_action_or_reset(dev, stf_inno_hdmi_clk_disable, ctrl);
+ if (ret)
+ return ret;
+
+ ret = reset_control_deassert(ctrl->tx_rst);
+ if (ret)
+ return ret;
+
+ ret = devm_add_action_or_reset(dev, stf_inno_hdmi_rst_assert,
+ ctrl->tx_rst);
+ if (ret)
+ return ret;
+
+ ret = stf_inno_hdmi_setup_mux(dev);
+ if (ret)
+ return ret;
+
+ plat_data = of_device_get_match_data(dev);
+
+ /* Hand off to the generic library to create the bridge. */
+ inno = inno_hdmi_probe(pdev, plat_data);
+ if (IS_ERR(inno))
+ return PTR_ERR(inno);
+
+ return 0;
+}
+
+static const struct inno_hdmi_plat_ops stf_inno_hdmi_plat_ops = {
+ .enable = inno_hdmi_starfive_enable,
+ .disable = inno_hdmi_starfive_disable,
+ .mode_valid = inno_hdmi_starfive_mode_valid,
+};
+
+static const struct inno_hdmi_plat_data stf_inno_hdmi_plat_data = {
+ .ops = &stf_inno_hdmi_plat_ops,
+ .reg_clk_source_tmds = true,
+ .supported_hdmi_ver = HDMI_VERSION_1_4,
+};
+
+static const struct of_device_id starfive_hdmi_controller_dt_ids[] = {
+ { .compatible = "starfive,jh7110-inno-hdmi-controller",
+ .data = &stf_inno_hdmi_plat_data },
+ {}
+};
+MODULE_DEVICE_TABLE(of, starfive_hdmi_controller_dt_ids);
+
+static struct platform_driver starfive_inno_hdmi_controller_driver = {
+ .probe = starfive_inno_hdmi_controller_probe,
+ .driver = {
+ .name = "starfive-inno-hdmi-controller",
+ .of_match_table = starfive_hdmi_controller_dt_ids,
+ },
+};
+module_platform_driver(starfive_inno_hdmi_controller_driver);
+
+MODULE_AUTHOR("Michal Wilczynski <m.wilczynski@samsung.com>");
+MODULE_DESCRIPTION("StarFive INNO HDMI Controller Driver");
+MODULE_LICENSE("GPL");
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v7 18/19] riscv: dts: starfive: jh7110: Update DT for display subsystem
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (16 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 17/19] drm/bridge: starfive: Add JH7110 HDMI controller driver Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 16:12 ` sashiko-bot
2026-11-06 13:58 ` [PATCH v7 19/19] MAINTAINERS: Add StarFive JH7110 display subsystem entry Michal Wilczynski
2026-11-06 19:48 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Owen O'Hehir
19 siblings, 1 reply; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
Activate the display subsystem by describing the video output subsystem,
which the documentation calls dom_vout_top, as a bus node covering the
whole 0x29400000 region, with dc8200, the HDMI block, the video output
system controller and voutcrg as its children.
The subsystem node owns the resources its children share: the NoC display
bus clock and reset that gate access to every register in the region, and
the PD_VOUT power domain. Modelling it this way keeps a shared gate owned
by the block that shares it, and lets dc8200 inherit dma-noncoherent for
framebuffer DMA from the bus it sits on.
The monolithic hdmi node is in turn modelled as a container with hdmi_phy
and hdmi_controller children, which share its register window: the PHY
takes only xin24m and provides the pixel clock and the phy, while the
controller takes its clocks from voutcrg.
voutcrg consumes the pixel clock from the &hdmi_phy node instead of the
old fixed-clock, and dc8200 gets its pixel clocks from voutcrg's MUXes.
The old, incorrect hdmitx0-pixel-clock fixed-clock node is removed.
The HDMI controller gets a phandle to the video output system controller,
which holds the mux selecting the DC8200 output that drives the HDMI
transmitter.
CMA is enlarged and constrained to memory the display controller can
address, because the default pool is too small for its framebuffers.
Co-developed-by: Dominique Belhachemi <db@domibel.de>
Signed-off-by: Dominique Belhachemi <db@domibel.de>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 121 +++++++++++++++++++++++-
arch/riscv/boot/dts/starfive/jh7110.dtsi | 105 ++++++++++++++++----
2 files changed, 203 insertions(+), 23 deletions(-)
diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
index 64de468f2c31764bc5eeb91156c37c7adf296308..bfc7ae12822348777cde9b2f2c939e58a629e750 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
@@ -33,6 +33,27 @@ memory@40000000 {
bootph-pre-ram;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /*
+ * The display controller allocates its framebuffers from CMA,
+ * and the default pool is too small for them. Keep the pool
+ * inside the range the controller can address; it fits in the
+ * memory every VisionFive 2 variant has.
+ */
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x0 0x20000000>;
+ alignment = <0x0 0x1000>;
+ alloc-ranges = <0x0 0x70000000 0x0 0x20000000>;
+ linux,cma-default;
+ };
+ };
+
gpio-restart {
compatible = "gpio-restart";
gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>;
@@ -73,12 +94,47 @@ codec {
};
};
};
+
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
};
&cpus {
timebase-frequency = <4000000>;
};
+&dc8200 {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dpu_port0: port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dpu_out_dpi0: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&hdmi_in>;
+ };
+ };
+
+ dpu_port1: port@1 {
+ reg = <1>;
+ };
+ };
+};
+
&dvp_clk {
clock-frequency = <74250000>;
};
@@ -99,8 +155,31 @@ &gmac1_rmii_refin {
clock-frequency = <50000000>;
};
-&hdmitx0_pixelclk {
- clock-frequency = <297000000>;
+&hdmi_controller {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hdmi_pins>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ hdmi_in: endpoint {
+ remote-endpoint = <&dpu_out_dpi0>;
+ };
+ };
+
+ hdmi_out_port: port@1 {
+ reg = <1>;
+
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+ };
+ };
};
&i2srx_bclk_ext {
@@ -356,6 +435,40 @@ &syscrg {
};
&sysgpio {
+ hdmi_pins: hdmi-0 {
+ hdmi-cec-pins {
+ pinmux = <GPIOMUX(14, GPOUT_SYS_HDMI_CEC_SDA,
+ GPOEN_SYS_HDMI_CEC_SDA,
+ GPI_SYS_HDMI_CEC_SDA)>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ hdmi-hpd-pins {
+ pinmux = <GPIOMUX(15, GPOUT_LOW,
+ GPOEN_DISABLE,
+ GPI_SYS_HDMI_HPD)>;
+ input-enable;
+ bias-disable; /* external pull-up */
+ };
+
+ hdmi-scl-pins {
+ pinmux = <GPIOMUX(0, GPOUT_SYS_HDMI_DDC_SCL,
+ GPOEN_SYS_HDMI_DDC_SCL,
+ GPI_SYS_HDMI_DDC_SCL)>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ hdmi-sda-pins {
+ pinmux = <GPIOMUX(1, GPOUT_SYS_HDMI_DDC_SDA,
+ GPOEN_SYS_HDMI_DDC_SDA,
+ GPI_SYS_HDMI_DDC_SDA)>;
+ input-enable;
+ bias-pull-up;
+ };
+ };
+
i2c0_pins: i2c0-0 {
i2c-pins {
pinmux = <GPIOMUX(57, GPOUT_LOW,
@@ -644,3 +757,7 @@ &U74_3 {
&U74_4 {
cpu-supply = <&vdd_cpu>;
};
+
+&voutcrg {
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
index 82ea63f715b0e64f33345e142eaba6ce49eaebf6..ac10d79770f24982e4046abb0030d6a3a23209bd 100644
--- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
@@ -290,12 +290,6 @@ gmac1_rmii_refin: gmac1-rmii-refin-clock {
#clock-cells = <0>;
};
- hdmitx0_pixelclk: hdmitx0-pixel-clock {
- compatible = "fixed-clock";
- clock-output-names = "hdmitx0_pixelclk";
- #clock-cells = <0>;
- };
-
i2srx_bclk_ext: i2srx-bclk-ext-clock {
compatible = "fixed-clock";
clock-output-names = "i2srx_bclk_ext";
@@ -352,6 +346,13 @@ tdm_ext: tdm-ext-clock {
#clock-cells = <0>;
};
+ xin24m: xin24m-clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ clock-output-names = "xin24m";
+ };
+
soc {
compatible = "simple-bus";
interrupt-parent = <&plic>;
@@ -1262,22 +1263,84 @@ csi_phy: phy@19820000 {
#phy-cells = <0>;
};
- voutcrg: clock-controller@295c0000 {
- compatible = "starfive,jh7110-voutcrg";
- reg = <0x0 0x295c0000 0x0 0x10000>;
- clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
- <&syscrg JH7110_SYSCLK_VOUT_TOP_AHB>,
- <&syscrg JH7110_SYSCLK_VOUT_TOP_AXI>,
- <&syscrg JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
- <&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
- <&hdmitx0_pixelclk>;
- clock-names = "vout_src", "vout_top_ahb",
- "vout_top_axi", "vout_top_hdmitx0_mclk",
- "i2stx0_bclk", "hdmitx0_pixelclk";
- resets = <&syscrg JH7110_SYSRST_VOUT_TOP_SRC>;
- #clock-cells = <1>;
- #reset-cells = <1>;
+ vout_subsystem: display-subsystem@29400000 {
+ compatible = "starfive,jh7110-vout-subsystem";
+ reg = <0x0 0x29400000 0x0 0x200000>;
+ ranges;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ clocks = <&syscrg JH7110_SYSCLK_NOC_BUS_DISP_AXI>;
+ dma-noncoherent;
power-domains = <&pwrc JH7110_PD_VOUT>;
+ resets = <&syscrg JH7110_SYSRST_NOC_BUS_DISP_AXI>;
+
+ dc8200: display@29400000 {
+ compatible = "starfive,jh7110-dc8200", "verisilicon,dc";
+ reg = <0x0 0x29400000 0x0 0x2800>;
+ clocks = <&voutcrg JH7110_VOUTCLK_DC8200_CORE>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_AXI>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_AHB>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_PIX0>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_PIX1>;
+ clock-names = "core", "axi", "ahb", "pix0", "pix1";
+ assigned-clocks = <&voutcrg JH7110_VOUTCLK_DC8200_PIX0>,
+ <&voutcrg JH7110_VOUTCLK_DC8200_PIX1>;
+ assigned-clock-parents = <&hdmi_phy>, <&hdmi_phy>;
+ interrupts = <95>;
+ resets = <&voutcrg JH7110_VOUTRST_DC8200_CORE>,
+ <&voutcrg JH7110_VOUTRST_DC8200_AXI>,
+ <&voutcrg JH7110_VOUTRST_DC8200_AHB>;
+ reset-names = "core", "axi", "ahb";
+ };
+
+ hdmi_subsystem: hdmi@29590000 {
+ compatible = "starfive,jh7110-hdmi-subsystem";
+ reg = <0x0 0x29590000 0x0 0x4000>;
+
+ hdmi_controller: controller {
+ compatible =
+ "starfive,jh7110-inno-hdmi-controller";
+ clocks = <&voutcrg JH7110_VOUTCLK_HDMI_TX_SYS>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_MCLK>,
+ <&voutcrg JH7110_VOUTCLK_HDMI_TX_BCLK>,
+ <&hdmi_phy>;
+ clock-names = "pclk", "mclk", "bclk", "pixel";
+ interrupts = <99>;
+ phys = <&hdmi_phy>;
+ resets = <&voutcrg JH7110_VOUTRST_HDMI_TX_HDMI>;
+ starfive,vout-syscon = <&vout_syscon>;
+ };
+
+ hdmi_phy: phy {
+ compatible = "starfive,jh7110-inno-hdmi-phy";
+ clocks = <&xin24m>;
+ #clock-cells = <0>;
+ #phy-cells = <0>;
+ };
+ };
+
+ vout_syscon: syscon@295b0000 {
+ compatible = "starfive,jh7110-vout-syscon", "syscon";
+ reg = <0x0 0x295b0000 0x0 0x10000>;
+ };
+
+ voutcrg: clock-controller@295c0000 {
+ compatible = "starfive,jh7110-voutcrg";
+ reg = <0x0 0x295c0000 0x0 0x10000>;
+ clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AHB>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_AXI>,
+ <&syscrg JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
+ <&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
+ <&hdmi_phy>;
+ clock-names = "vout_src", "vout_top_ahb",
+ "vout_top_axi", "vout_top_hdmitx0_mclk",
+ "i2stx0_bclk", "hdmitx0_pixelclk";
+ power-domains = <&pwrc JH7110_PD_VOUT>;
+ resets = <&syscrg JH7110_SYSRST_VOUT_TOP_SRC>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
};
pcie0: pcie@940000000 {
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v7 18/19] riscv: dts: starfive: jh7110: Update DT for display subsystem
2026-11-06 13:58 ` [PATCH v7 18/19] riscv: dts: starfive: jh7110: Update DT for display subsystem Michal Wilczynski
@ 2026-11-06 16:12 ` sashiko-bot
0 siblings, 0 replies; 25+ messages in thread
From: sashiko-bot @ 2026-11-06 16:12 UTC (permalink / raw)
To: Michal Wilczynski; +Cc: devicetree, dri-devel, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] riscv: dts: starfive: CMA alloc-ranges in jh7110-common.dtsi
breaks 1 GiB RAM
- [Low] riscv: dts: starfive: missing status disabled on jh7110.dtsi
display nodes
- [Low] riscv: dts: starfive: duplicate 24 MHz xin24m clock node in
jh7110.dtsi
--
commit e4e97f0b932284258aa4795e30b6380ab560afa7
Author: Michal Wilczynski <m.wilczynski@samsung.com>
riscv: dts: starfive: jh7110: Update DT for display subsystem
This commit describes the JH7110 video output subsystem, DC8200 display
controller, HDMI controller and PHY in the SoC device tree, and enables
the display pipeline with a 512 MiB default CMA pool in the common board
device tree.
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> index 64de468f2c317..bfc7ae1282234 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> @@ -33,6 +33,27 @@ memory@40000000 {
> bootph-pre-ram;
> };
>
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /*
> + * The display controller allocates its framebuffers from CMA,
> + * and the default pool is too small for them. Keep the pool
> + * inside the range the controller can address; it fits in the
> + * memory every VisionFive 2 variant has.
> + */
> + linux,cma {
> + compatible = "shared-dma-pool";
> + reusable;
> + size = <0x0 0x20000000>;
> + alignment = <0x0 0x1000>;
> + alloc-ranges = <0x0 0x70000000 0x0 0x20000000>;
> + linux,cma-default;
> + };
> + };
[Severity: High]
Does this alloc-ranges setting cause linux,cma reservation to fail on 1 GiB
JH7110 boards, or whenever an earlier reservation overlaps 0x70000000..
0x90000000?
jh7110-common.dtsi is also included by 1 GiB boards such as Milk-V Mars and
Mars CM, where physical RAM at 0x40000000..0x80000000 only covers 256 MiB of
the 0x70000000..0x90000000 window, so __reserved_mem_alloc_size() fails with
-ENOMEM and leaves the system without a default CMA pool. Because the window
size equals the 512 MiB allocation size with no slack, any bootloader or
initrd reservation in 0x70000000..0x90000000 also causes CMA allocation to
fail on larger boards even though DC8200 uses a 32-bit DMA mask and can
address any RAM below 0x100000000.
[ ... ]
> @@ -644,3 +757,7 @@ &U74_3 {
> &U74_4 {
> cpu-supply = <&vdd_cpu>;
> };
> +
> +&voutcrg {
> + status = "okay";
> +};
> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
> index 82ea63f715b0e..ac10d79770f24 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
[ ... ]
> @@ -352,6 +346,13 @@ tdm_ext: tdm-ext-clock {
> #clock-cells = <0>;
> };
>
> + xin24m: xin24m-clock {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <24000000>;
> + clock-output-names = "xin24m";
> + };
[Severity: Low]
Can hdmi_phy use the existing <&osc> node in jh7110.dtsi instead of adding a
duplicate 24 MHz xin24m fixed-clock node?
jh7110.dtsi already defines the 24 MHz reference crystal as osc: oscillator
(with its frequency set in jh7110-common.dtsi), and neither the
starfive,jh7110-inno-hdmi-phy binding nor starfive_hdmi_phy_probe() requires
the clock to be named xin24m.
> @@ -1262,22 +1263,84 @@ csi_phy: phy@19820000 {
> #phy-cells = <0>;
> };
>
> - voutcrg: clock-controller@295c0000 {
> - compatible = "starfive,jh7110-voutcrg";
> - reg = <0x0 0x295c0000 0x0 0x10000>;
> - clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
> - <&syscrg JH7110_SYSCLK_VOUT_TOP_AHB>,
> - <&syscrg JH7110_SYSCLK_VOUT_TOP_AXI>,
> - <&syscrg JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
> - <&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
> - <&hdmitx0_pixelclk>;
> - clock-names = "vout_src", "vout_top_ahb",
> - "vout_top_axi", "vout_top_hdmitx0_mclk",
> - "i2stx0_bclk", "hdmitx0_pixelclk";
> - resets = <&syscrg JH7110_SYSRST_VOUT_TOP_SRC>;
> - #clock-cells = <1>;
> - #reset-cells = <1>;
> + vout_subsystem: display-subsystem@29400000 {
> + compatible = "starfive,jh7110-vout-subsystem";
> + reg = <0x0 0x29400000 0x0 0x200000>;
> + ranges;
> + #address-cells = <2>;
> + #size-cells = <2>;
> + clocks = <&syscrg JH7110_SYSCLK_NOC_BUS_DISP_AXI>;
> + dma-noncoherent;
> power-domains = <&pwrc JH7110_PD_VOUT>;
> + resets = <&syscrg JH7110_SYSRST_NOC_BUS_DISP_AXI>;
> +
> + dc8200: display@29400000 {
> + compatible = "starfive,jh7110-dc8200", "verisilicon,dc";
> + reg = <0x0 0x29400000 0x0 0x2800>;
> + clocks = <&voutcrg JH7110_VOUTCLK_DC8200_CORE>,
> + <&voutcrg JH7110_VOUTCLK_DC8200_AXI>,
> + <&voutcrg JH7110_VOUTCLK_DC8200_AHB>,
> + <&voutcrg JH7110_VOUTCLK_DC8200_PIX0>,
> + <&voutcrg JH7110_VOUTCLK_DC8200_PIX1>;
> + clock-names = "core", "axi", "ahb", "pix0", "pix1";
> + assigned-clocks = <&voutcrg JH7110_VOUTCLK_DC8200_PIX0>,
> + <&voutcrg JH7110_VOUTCLK_DC8200_PIX1>;
> + assigned-clock-parents = <&hdmi_phy>, <&hdmi_phy>;
> + interrupts = <95>;
> + resets = <&voutcrg JH7110_VOUTRST_DC8200_CORE>,
> + <&voutcrg JH7110_VOUTRST_DC8200_AXI>,
> + <&voutcrg JH7110_VOUTRST_DC8200_AHB>;
> + reset-names = "core", "axi", "ahb";
> + };
> +
> + hdmi_subsystem: hdmi@29590000 {
> + compatible = "starfive,jh7110-hdmi-subsystem";
> + reg = <0x0 0x29590000 0x0 0x4000>;
> +
> + hdmi_controller: controller {
> + compatible =
> + "starfive,jh7110-inno-hdmi-controller";
> + clocks = <&voutcrg JH7110_VOUTCLK_HDMI_TX_SYS>,
> + <&voutcrg JH7110_VOUTCLK_HDMI_TX_MCLK>,
> + <&voutcrg JH7110_VOUTCLK_HDMI_TX_BCLK>,
> + <&hdmi_phy>;
> + clock-names = "pclk", "mclk", "bclk", "pixel";
> + interrupts = <99>;
> + phys = <&hdmi_phy>;
> + resets = <&voutcrg JH7110_VOUTRST_HDMI_TX_HDMI>;
> + starfive,vout-syscon = <&vout_syscon>;
> + };
[Severity: Low]
Should dc8200 and hdmi_controller have status = "disabled" in jh7110.dtsi,
and should the &voutcrg override in jh7110-common.dtsi be dropped?
Both dc8200 and hdmi_controller require board-specific port graphs and
pinctrl properties that are only populated in jh7110-common.dtsi (which
explicitly sets status = "okay" on both nodes), so leaving them enabled by
default in jh7110.dtsi leaves them incomplete for any board not using
jh7110-common.dtsi. Conversely, voutcrg is never disabled in jh7110.dtsi, so
the &voutcrg block setting status = "okay" in jh7110-common.dtsi has no
effect.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261106-jh7110-clean-send-v7-0-68f7ea9913db@samsung.com?part=18
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v7 19/19] MAINTAINERS: Add StarFive JH7110 display subsystem entry
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (17 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 18/19] riscv: dts: starfive: jh7110: Update DT for display subsystem Michal Wilczynski
@ 2026-11-06 13:58 ` Michal Wilczynski
2026-11-06 19:48 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Owen O'Hehir
19 siblings, 0 replies; 25+ messages in thread
From: Michal Wilczynski @ 2026-11-06 13:58 UTC (permalink / raw)
To: Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Andrzej Hajda,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Philipp Zabel, Emil Renner Berthing, Hal Feng,
Heiko Stuebner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Dominique Belhachemi, Andy Yan, David Airlie,
Simona Vetter, Yakir Yang, Dmitry Baryshkov, Michal Wilczynski,
Conor Dooley, William Qiu, Xingyu Wu, Sandy Huang,
Manivannan Sadhasivam
Cc: devicetree, linux-kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-riscv, Marek Szyprowski, Maud Spierings,
Graham Markall, Icenowy Zheng, Chaoyi Chen, Joshua Peisach,
Uwe Kleine-König, Cristian Ciocaltea, Byron Stanoszek,
OOHehir
The JH7110 display subsystem spans a PHY driver, a DRM bridge driver,
a parent device and their bindings, and has no existing maintainer entry.
Add an entry covering them so patches reach someone who can review them.
Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com>
Tested-by: Byron Stanoszek <gandalf@winds.org>
Tested-by: OOHehir <oo.hehir@gmail.com>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
MAINTAINERS | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 93abbb315065de00c29cc02de16c38eac58ac5a1..f56046284fc986f18704635425b7f61709e787ac 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -26718,6 +26718,17 @@ S: Maintained
F: Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
F: drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+STARFIVE JH7110 DISPLAY SUBSYSTEM
+M: Michal Wilczynski <m.wilczynski@samsung.com>
+R: Icenowy Zheng <zhengxingda@iscas.ac.cn>
+S: Maintained
+F: Documentation/devicetree/bindings/display/bridge/starfive,jh7110-inno-hdmi-controller.yaml
+F: Documentation/devicetree/bindings/display/starfive/starfive,jh7110-hdmi-subsystem.yaml
+F: Documentation/devicetree/bindings/display/starfive/starfive,jh7110-vout-subsystem.yaml
+F: drivers/gpu/drm/bridge/jh7110-inno-hdmi.c
+F: drivers/soc/starfive/jh7110-hdmi-subsystem.c
+F: drivers/soc/starfive/jh7110-vout-subsystem.c
+
STARFIVE JH7110 DPHY RX DRIVER
M: Jack Zhu <jack.zhu@starfivetech.com>
M: Changhuang Liang <changhuang.liang@starfivetech.com>
--
2.34.1
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem
2026-11-06 13:58 ` [PATCH v7 00/19] drm: starfive: jh7110: Enable display subsystem Michal Wilczynski
` (18 preceding siblings ...)
2026-11-06 13:58 ` [PATCH v7 19/19] MAINTAINERS: Add StarFive JH7110 display subsystem entry Michal Wilczynski
@ 2026-11-06 19:48 ` Owen O'Hehir
19 siblings, 0 replies; 25+ messages in thread
From: Owen O'Hehir @ 2026-11-06 19:48 UTC (permalink / raw)
To: Michal Wilczynski
Cc: dri-devel, linux-riscv, devicetree, linux-kernel, Conor Dooley,
Emil Renner Berthing, Heiko Stuebner, Icenowy Zheng
Tested on a VisionFive 2 v1.3B with this series and the v7 PHY series
on next-20261105. All 24 modes the sink advertises set with modetest,
from 1920x1080@60 down to 640x480, including the mixed sync polarity
modes 1680x1050@59.88, 1280x800@59.91 and 720x400@70.08, with nothing
in dmesg.
One thing outside this series: the modetest pattern showed small black
bars until I wrote 200 MB of other data, which pushed the pattern out of
the CPU cache into memory, after which it was clean. The U74 has no
Svpbmt, so the dumb buffer mapping stays cached here. My v5 run had the
SiFive uncached-alias errata patches applied and did not show it.
Tested-by: Owen O'Hehir <oo.hehir@gmail.com>
^ permalink raw reply [flat|nested] 25+ messages in thread