* [PATCH v5 1/7] clk: renesas: r8a779g0: Add DSC clock
2026-06-15 13:11 [PATCH v5 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
@ 2026-06-15 13:11 ` Tomi Valkeinen
2026-06-15 13:11 ` [PATCH v5 2/7] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings Tomi Valkeinen
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Tomi Valkeinen @ 2026-06-15 13:11 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Marek Vasut,
Laurent Pinchart, Kieran Bingham, Philipp Zabel
Cc: linux-renesas-soc, linux-clk, linux-kernel, dri-devel, devicetree,
Tomi Valkeinen
From: Marek Vasut <marek.vasut+renesas@mailbox.org>
Add the DSC module clock for Renesas R-Car V4H (R8A779G0) SoC.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
---
drivers/clk/renesas/r8a779g0-cpg-mssr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/renesas/r8a779g0-cpg-mssr.c b/drivers/clk/renesas/r8a779g0-cpg-mssr.c
index 015b9773cc55..54ba76ff5ab0 100644
--- a/drivers/clk/renesas/r8a779g0-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a779g0-cpg-mssr.c
@@ -245,6 +245,7 @@ static const struct mssr_mod_clk r8a779g0_mod_clks[] __initconst = {
DEF_MOD("fcpvx0", 1100, R8A779G0_CLK_S0D1_VIO),
DEF_MOD("fcpvx1", 1101, R8A779G0_CLK_S0D1_VIO),
DEF_MOD("tsn", 2723, R8A779G0_CLK_S0D4_HSC),
+ DEF_MOD("dsc", 2819, R8A779G0_CLK_VIOBUSD2),
DEF_MOD("ssiu", 2926, R8A779G0_CLK_S0D6_PER),
DEF_MOD("ssi", 2927, R8A779G0_CLK_S0D6_PER),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v5 2/7] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings
2026-06-15 13:11 [PATCH v5 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
2026-06-15 13:11 ` [PATCH v5 1/7] clk: renesas: r8a779g0: Add DSC clock Tomi Valkeinen
@ 2026-06-15 13:11 ` Tomi Valkeinen
2026-06-17 7:16 ` Geert Uytterhoeven
2026-06-15 13:11 ` [PATCH v5 3/7] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
` (4 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Tomi Valkeinen @ 2026-06-15 13:11 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Marek Vasut,
Laurent Pinchart, Kieran Bingham, Philipp Zabel
Cc: linux-renesas-soc, linux-clk, linux-kernel, dri-devel, devicetree,
Tomi Valkeinen, Conor Dooley
From: Marek Vasut <marek.vasut+renesas@mailbox.org>
The Renesas DSC Display Stream Compression is a bridge embedded in the
Renesas R-Car V4H SoC. The bridge performs VESA DSC encoding of up to
8k or 400 Mpixel/s .
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[tomi.valkeinen: fix the example]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
.../display/bridge/renesas,r8a779g0-dsc.yaml | 96 ++++++++++++++++++++++
1 file changed, 96 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,r8a779g0-dsc.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,r8a779g0-dsc.yaml
new file mode 100644
index 000000000000..6ce2444409a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,r8a779g0-dsc.yaml
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/renesas,r8a779g0-dsc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas R-Car DSC Display Stream Compression
+
+maintainers:
+ - Marek Vasut <marek.vasut+renesas@mailbox.org>
+
+description: |
+ This binding describes the VESA DSC Display Stream Compression encoder
+ embedded in the Renesas R-Car V4H SoC. The encoder supports all DSC1.1
+ encoding mechanisms, configurable bits-per-pixel, resolution up to 8k.
+
+properties:
+ compatible:
+ const: renesas,r8a779g0-dsc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: R-Car DU input port
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: R-Car DSI output port
+
+ required:
+ - port@0
+ - port@1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - interrupts
+ - power-domains
+ - resets
+ - ports
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r8a779g0-cpg-mssr.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/r8a779g0-sysc.h>
+
+ bridge@feb8d000 {
+ compatible = "renesas,r8a779g0-dsc";
+ reg = <0xfeb8d000 0x400>;
+ interrupts = <GIC_SPI 559 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 2819>;
+ power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+ resets = <&cpg 2819>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsc_in_dsi1: endpoint {
+ remote-endpoint = <&du_out_dsi1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dsc_out_dsi1: endpoint {
+ remote-endpoint = <&dsi1_in>;
+ };
+ };
+ };
+ };
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v5 2/7] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings
2026-06-15 13:11 ` [PATCH v5 2/7] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings Tomi Valkeinen
@ 2026-06-17 7:16 ` Geert Uytterhoeven
0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2026-06-17 7:16 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Michael Turquette, Stephen Boyd, Andrzej Hajda, Neil Armstrong,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Magnus Damm, Marek Vasut, Laurent Pinchart, Kieran Bingham,
Philipp Zabel, linux-renesas-soc, linux-clk, linux-kernel,
dri-devel, devicetree, Conor Dooley
On Mon, 15 Jun 2026 at 15:12, Tomi Valkeinen
<tomi.valkeinen+renesas@ideasonboard.com> wrote:
> From: Marek Vasut <marek.vasut+renesas@mailbox.org>
>
> The Renesas DSC Display Stream Compression is a bridge embedded in the
> Renesas R-Car V4H SoC. The bridge performs VESA DSC encoding of up to
> 8k or 400 Mpixel/s .
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> [tomi.valkeinen: fix the example]
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v5 3/7] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver
2026-06-15 13:11 [PATCH v5 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
2026-06-15 13:11 ` [PATCH v5 1/7] clk: renesas: r8a779g0: Add DSC clock Tomi Valkeinen
2026-06-15 13:11 ` [PATCH v5 2/7] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings Tomi Valkeinen
@ 2026-06-15 13:11 ` Tomi Valkeinen
2026-06-23 20:01 ` sashiko-bot
2026-06-15 13:11 ` [PATCH v5 4/7] drm/rcar-du: dsi: Support DSC in the pipeline Tomi Valkeinen
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Tomi Valkeinen @ 2026-06-15 13:11 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Marek Vasut,
Laurent Pinchart, Kieran Bingham, Philipp Zabel
Cc: linux-renesas-soc, linux-clk, linux-kernel, dri-devel, devicetree,
Tomi Valkeinen
From: Marek Vasut <marek.vasut+renesas@mailbox.org>
The Renesas DSC Display Stream Compression is a bridge embedded in the
Renesas R-Car V4H SoC. The bridge performs VESA DSC encoding of up to
8k or 400 Mpixel/s. Add rudimentary driver, which currently acts as a
pass-through bridge and allows DSI1 to be operational on R-Car V4H.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[tomi.valkeinen: use bridge->next_bridge, minor changes]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/gpu/drm/renesas/rcar-du/Kconfig | 12 +++
drivers/gpu/drm/renesas/rcar-du/Makefile | 1 +
drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c | 154 +++++++++++++++++++++++++++++
3 files changed, 167 insertions(+)
diff --git a/drivers/gpu/drm/renesas/rcar-du/Kconfig b/drivers/gpu/drm/renesas/rcar-du/Kconfig
index 840305fdeb49..80bd770ae0f6 100644
--- a/drivers/gpu/drm/renesas/rcar-du/Kconfig
+++ b/drivers/gpu/drm/renesas/rcar-du/Kconfig
@@ -25,6 +25,18 @@ config DRM_RCAR_CMM
def_tristate DRM_RCAR_DU
depends on DRM_RCAR_USE_CMM
+config DRM_RCAR_USE_DSC
+ bool "R-Car DU DSC Encoder Support"
+ depends on DRM_BRIDGE && OF
+ depends on DRM_RCAR_DU || COMPILE_TEST
+ default DRM_RCAR_DU
+ help
+ Enable support for the R-Car Display Unit embedded DSC encoder.
+
+config DRM_RCAR_DSC
+ def_tristate DRM_RCAR_DU
+ depends on DRM_RCAR_USE_DSC
+
config DRM_RCAR_DW_HDMI
tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
depends on DRM && OF
diff --git a/drivers/gpu/drm/renesas/rcar-du/Makefile b/drivers/gpu/drm/renesas/rcar-du/Makefile
index 6f132325c8b7..9ab7a0ac45d8 100644
--- a/drivers/gpu/drm/renesas/rcar-du/Makefile
+++ b/drivers/gpu/drm/renesas/rcar-du/Makefile
@@ -10,6 +10,7 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_VSP) += rcar_du_vsp.o
rcar-du-drm-$(CONFIG_DRM_RCAR_WRITEBACK) += rcar_du_writeback.o
obj-$(CONFIG_DRM_RCAR_CMM) += rcar_cmm.o
+obj-$(CONFIG_DRM_RCAR_DSC) += rcar_dsc.o
obj-$(CONFIG_DRM_RCAR_DU) += rcar-du-drm.o
obj-$(CONFIG_DRM_RCAR_DW_HDMI) += rcar_dw_hdmi.o
obj-$(CONFIG_DRM_RCAR_LVDS) += rcar_lvds.o
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c b/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c
new file mode 100644
index 000000000000..362e683289d6
--- /dev/null
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * R-Car DSC Encoder
+ *
+ * Copyright (C) 2025 Marek Vasut <marek.vasut+renesas@mailbox.org>
+ * Copyright (C) 2025 Renesas Electronics Corporation
+ */
+
+#include <linux/container_of.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
+
+#include <drm/drm_atomic_helper.h>
+#include <drm/drm_bridge.h>
+
+struct rcar_dsc {
+ struct drm_bridge bridge;
+
+ struct device *dev;
+};
+
+static inline struct rcar_dsc *bridge_to_rcar_dsc(struct drm_bridge *bridge)
+{
+ return container_of(bridge, struct rcar_dsc, bridge);
+}
+
+/* -----------------------------------------------------------------------------
+ * Bridge
+ */
+
+static int rcar_dsc_attach(struct drm_bridge *bridge,
+ struct drm_encoder *encoder,
+ enum drm_bridge_attach_flags flags)
+{
+ struct rcar_dsc *dsc = bridge_to_rcar_dsc(bridge);
+
+ if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR))
+ return -EINVAL;
+
+ return drm_bridge_attach(encoder, dsc->bridge.next_bridge, bridge,
+ DRM_BRIDGE_ATTACH_NO_CONNECTOR);
+}
+
+static void rcar_dsc_atomic_enable(struct drm_bridge *bridge,
+ struct drm_atomic_commit *commit)
+{
+ struct rcar_dsc *dsc = bridge_to_rcar_dsc(bridge);
+
+ WARN_ON(pm_runtime_get_sync(dsc->dev) < 0);
+}
+
+static void rcar_dsc_atomic_disable(struct drm_bridge *bridge,
+ struct drm_atomic_commit *commit)
+{
+ struct rcar_dsc *dsc = bridge_to_rcar_dsc(bridge);
+
+ pm_runtime_put(dsc->dev);
+}
+
+static enum drm_mode_status
+rcar_dsc_bridge_mode_valid(struct drm_bridge *bridge,
+ const struct drm_display_info *info,
+ const struct drm_display_mode *mode)
+{
+ if (mode->hdisplay < 320 || mode->hdisplay > 8190)
+ return MODE_BAD_HVALUE;
+
+ if (mode->vdisplay < 160 || mode->vdisplay > 8190)
+ return MODE_BAD_VVALUE;
+
+ if (mode->clock > 400000) /* Really 400 Mpixel/s */
+ return MODE_CLOCK_HIGH;
+
+ return MODE_OK;
+}
+
+static const struct drm_bridge_funcs rcar_dsc_bridge_ops = {
+ .attach = rcar_dsc_attach,
+ .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
+ .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
+ .atomic_reset = drm_atomic_helper_bridge_reset,
+ .atomic_enable = rcar_dsc_atomic_enable,
+ .atomic_disable = rcar_dsc_atomic_disable,
+ .mode_valid = rcar_dsc_bridge_mode_valid,
+};
+
+/* -----------------------------------------------------------------------------
+ * Probe & Remove
+ */
+
+static int rcar_dsc_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct rcar_dsc *dsc;
+ int ret;
+
+ dsc = devm_drm_bridge_alloc(dev, struct rcar_dsc, bridge,
+ &rcar_dsc_bridge_ops);
+ if (IS_ERR(dsc))
+ return PTR_ERR(dsc);
+
+ platform_set_drvdata(pdev, dsc);
+
+ dsc->dev = &pdev->dev;
+
+ dsc->bridge.next_bridge = of_drm_get_bridge_by_endpoint(dev->of_node,
+ 1, 0);
+ if (IS_ERR(dsc->bridge.next_bridge))
+ return PTR_ERR(dsc->bridge.next_bridge);
+
+ dsc->bridge.of_node = dev->of_node;
+
+ pm_runtime_enable(&pdev->dev);
+
+ ret = devm_drm_bridge_add(dev, &dsc->bridge);
+ if (ret)
+ goto err_runtime_disable;
+
+ return 0;
+
+err_runtime_disable:
+ pm_runtime_disable(&pdev->dev);
+
+ return ret;
+}
+
+static void rcar_dsc_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+}
+
+static const struct of_device_id rcar_dsc_of_table[] = {
+ { .compatible = "renesas,r8a779g0-dsc" },
+ {}
+};
+
+MODULE_DEVICE_TABLE(of, rcar_dsc_of_table);
+
+static struct platform_driver rcar_dsc_platform_driver = {
+ .probe = rcar_dsc_probe,
+ .remove = rcar_dsc_remove,
+ .driver = {
+ .name = "rcar-dsc",
+ .of_match_table = rcar_dsc_of_table,
+ },
+};
+
+module_platform_driver(rcar_dsc_platform_driver);
+
+MODULE_DESCRIPTION("Renesas R-Car DSC Encoder Driver");
+MODULE_LICENSE("GPL");
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v5 3/7] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver
2026-06-15 13:11 ` [PATCH v5 3/7] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
@ 2026-06-23 20:01 ` sashiko-bot
0 siblings, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-06-23 20:01 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: robh, conor+dt, wsa+renesas, devicetree, dri-devel
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The DRM bridge remains registered and globally accessible after `pm_runtime_disable()` is called, creating a teardown order race during driver removal.
- [Medium] The sleeping function `pm_runtime_get_sync()` is called from an atomic context path (`rcar_dsc_atomic_enable`).
--
commit a8616c71b764dc9fa4ae244e47795371e7fead44
Author: Marek Vasut <marek.vasut+renesas@mailbox.org>
drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver
The Renesas DSC Display Stream Compression is a bridge embedded in the
Renesas R-Car V4H SoC. The bridge performs VESA DSC encoding of up to
8k or 400 Mpixel/s. Add rudimentary driver, which currently acts as a
pass-through bridge and allows DSI1 to be operational on R-Car V4H.
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c b/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c
[ ... ]
> +static void rcar_dsc_atomic_enable(struct drm_bridge *bridge,
> + struct drm_atomic_commit *commit)
> +{
> + struct rcar_dsc *dsc = bridge_to_rcar_dsc(bridge);
> +
> + WARN_ON(pm_runtime_get_sync(dsc->dev) < 0);
[Severity: Medium]
Is it safe to call the sleeping function pm_runtime_get_sync() here?
Since rcar_dsc_atomic_enable() is called during non-blocking atomic commits,
doesn't this path execute in atomic context where sleeping is forbidden and
can lead to kernel warnings or deadlocks?
> +}
[ ... ]
> +static int rcar_dsc_probe(struct platform_device *pdev)
> +{
[ ... ]
> + pm_runtime_enable(&pdev->dev);
> +
> + ret = devm_drm_bridge_add(dev, &dsc->bridge);
> + if (ret)
> + goto err_runtime_disable;
> +
> + return 0;
> +
> +err_runtime_disable:
> + pm_runtime_disable(&pdev->dev);
> +
> + return ret;
> +}
> +
> +static void rcar_dsc_remove(struct platform_device *pdev)
> +{
> + pm_runtime_disable(&pdev->dev);
> +}
[Severity: High]
Does this create a teardown order race during driver removal?
Because devm_drm_bridge_add() defers unregistration until after
rcar_dsc_remove() returns, the bridge remains globally accessible to the DRM
subsystem after pm_runtime_disable() has already shut down power management.
If a concurrent modeset calls rcar_dsc_atomic_enable() during this window,
won't pm_runtime_get_sync() return -EACCES and trigger the WARN_ON since
power management is disabled?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260615-rcar-du-dsc-v5-0-aed1a28610e4@ideasonboard.com?part=3
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v5 4/7] drm/rcar-du: dsi: Support DSC in the pipeline
2026-06-15 13:11 [PATCH v5 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
` (2 preceding siblings ...)
2026-06-15 13:11 ` [PATCH v5 3/7] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
@ 2026-06-15 13:11 ` Tomi Valkeinen
2026-06-15 13:11 ` [PATCH v5 5/7] arm64: dts: renesas: r8a779g0: Add DSC Tomi Valkeinen
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Tomi Valkeinen @ 2026-06-15 13:11 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Marek Vasut,
Laurent Pinchart, Kieran Bingham, Philipp Zabel
Cc: linux-renesas-soc, linux-clk, linux-kernel, dri-devel, devicetree,
Tomi Valkeinen
Enabling DSI clocks on rcar-du needs some tricks as the DU dot clock is
provided by the DSI. Thus, we call rcar_mipi_dsi_pclk_enable() from the
crtc, when enabling the crtc.
With DSC (added in upcoming patch) in the pipeline, between the DU and
the DSI, the above call path is broken as the crtc tries to call
rcar_mipi_dsi_pclk_enable() on the DSC.
To solve this problem, make sure we store the DSI bridge to the
rcdu->dsi[] array, instead of the first bridge in the DSI pipeline
(which can be DCS), by checking the bridge's bridge->type.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
---
drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c | 18 ++++++++++++++++--
drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 1 +
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c
index db2088529b48..ac85838ab3b8 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c
@@ -89,9 +89,23 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
drm_bridge_get(bridge);
if (output == RCAR_DU_OUTPUT_DSI0 ||
- output == RCAR_DU_OUTPUT_DSI1)
+ output == RCAR_DU_OUTPUT_DSI1) {
+ struct drm_bridge *dsi_bridge;
+
+ /*
+ * When we have a DSC block between the DU and the DSI,
+ * the "bridge" points to the DSC. Detect the DSC by looking
+ * at the bridge type, and skip the DSC if the bridge is not
+ * the DSI bridge.
+ */
+
+ dsi_bridge = bridge->type == DRM_MODE_CONNECTOR_DSI ?
+ bridge :
+ bridge->next_bridge;
+
rcdu->dsi[output - RCAR_DU_OUTPUT_DSI0] =
- drm_bridge_get(bridge);
+ drm_bridge_get(dsi_bridge);
+ }
}
/*
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
index aaafee1c060b..f429f03a380c 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
@@ -957,6 +957,7 @@ static int rcar_mipi_dsi_host_attach(struct mipi_dsi_host *host,
/* Initialize the DRM bridge. */
dsi->bridge.of_node = dsi->dev->of_node;
+ dsi->bridge.type = DRM_MODE_CONNECTOR_DSI;
drm_bridge_add(&dsi->bridge);
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v5 5/7] arm64: dts: renesas: r8a779g0: Add DSC
2026-06-15 13:11 [PATCH v5 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
` (3 preceding siblings ...)
2026-06-15 13:11 ` [PATCH v5 4/7] drm/rcar-du: dsi: Support DSC in the pipeline Tomi Valkeinen
@ 2026-06-15 13:11 ` Tomi Valkeinen
2026-06-23 20:27 ` sashiko-bot
2026-06-15 13:11 ` [PATCH v5 6/7] arm64: dts: renesas: sparrow-hawk: Enable DisplayPort by adding DSC Tomi Valkeinen
2026-06-15 13:12 ` [PATCH v5 7/7] arm64: dts: renesas: white-hawk: Add second mini-DP output support Tomi Valkeinen
6 siblings, 1 reply; 12+ messages in thread
From: Tomi Valkeinen @ 2026-06-15 13:11 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Marek Vasut,
Laurent Pinchart, Kieran Bingham, Philipp Zabel
Cc: linux-renesas-soc, linux-clk, linux-kernel, dri-devel, devicetree,
Tomi Valkeinen
From: Marek Vasut <marek.vasut+renesas@mailbox.org>
The Renesas DSC Display Stream Compression is a bridge embedded in the
Renesas R-Car V4H SoC. The bridge is placed between DU and DSI1 units.
The current dtsi file does not represent the DSC at all, and thus the
pipeline for DSI1 has not been functional.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[tomi.valkeinen: separated the sparrowhawk changes]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
index 82a7278836e5..717bd41807ec 100644
--- a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
@@ -2298,6 +2298,35 @@ du_out_dsi0: endpoint {
port@1 {
reg = <1>;
du_out_dsi1: endpoint {
+ remote-endpoint = <&dsc_in_dsi1>;
+ };
+ };
+ };
+ };
+
+ dsc: bridge@feb8d000 {
+ compatible = "renesas,r8a779g0-dsc";
+ reg = <0 0xfeb8d000 0 0x400>;
+ interrupts = <GIC_SPI 559 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 2819>;
+ power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+ resets = <&cpg 2819>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dsc_in_dsi1: endpoint {
+ remote-endpoint = <&du_out_dsi1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dsc_out_dsi1: endpoint {
remote-endpoint = <&dsi1_in>;
};
};
@@ -2534,7 +2563,7 @@ ports {
port@0 {
reg = <0>;
dsi1_in: endpoint {
- remote-endpoint = <&du_out_dsi1>;
+ remote-endpoint = <&dsc_out_dsi1>;
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v5 5/7] arm64: dts: renesas: r8a779g0: Add DSC
2026-06-15 13:11 ` [PATCH v5 5/7] arm64: dts: renesas: r8a779g0: Add DSC Tomi Valkeinen
@ 2026-06-23 20:27 ` sashiko-bot
0 siblings, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-06-23 20:27 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: robh, wsa+renesas, devicetree, conor+dt, dri-devel
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The rcar_dsc driver does not deassert its hardware reset, leaving the DSC block permanently in reset.
- [Medium] Mixing devm_drm_bridge_add with manual pm_runtime_disable creates a devres cleanup ordering bug and a use-after-disable window.
--
commit ffeafc5aca0f12828e91ec48615ef59b3d5989f2
Author: Marek Vasut <marek.vasut+renesas@mailbox.org>
arm64: dts: renesas: r8a779g0: Add DSC
This commit adds the Renesas DSC Display Stream Compression bridge to the
r8a779g0 device tree. The node is placed between the DU and DSI1 units to
make the DSI1 pipeline functional.
> --- a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> @@ -2298,6 +2298,35 @@ du_out_dsi0: endpoint {
[ ... ]
> + dsc: bridge@feb8d000 {
> + compatible = "renesas,r8a779g0-dsc";
[Severity: Medium]
Does the driver backing this device introduce a devres cleanup regression?
Looking at rcar_dsc.c, rcar_dsc_probe() uses a managed function for the
bridge but manually enables PM runtime:
drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c:rcar_dsc_probe() {
...
pm_runtime_enable(&pdev->dev);
ret = devm_drm_bridge_add(dev, &dsc->bridge);
...
}
Then rcar_dsc_remove() manually disables PM runtime:
drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c:rcar_dsc_remove() {
pm_runtime_disable(&pdev->dev);
}
If the driver is unbound, rcar_dsc_remove() manually calls
pm_runtime_disable(). Only after this returns do the devres handlers
run to call drm_bridge_remove().
If a DRM atomic commit executes during this window, rcar_dsc_atomic_enable()
will call pm_runtime_get_sync(). Because PM runtime is disabled, won't this
fail, trigger a warning, and leave the hardware unpowered?
Using devm_pm_runtime_enable() instead would guarantee the correct reverse
cleanup order.
> + reg = <0 0xfeb8d000 0 0x400>;
> + interrupts = <GIC_SPI 559 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cpg CPG_MOD 2819>;
> + power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
> + resets = <&cpg 2819>;
[Severity: High]
Is there a regression here that leaves the DSC block permanently in reset?
Looking at rcar_dsc_probe() in drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c,
it doesn't appear to request or explicitly deassert the hardware reset line
defined here.
If the DSC block is left in its initial reset state, won't it fail to pass
pixel data and break the display pipeline?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260615-rcar-du-dsc-v5-0-aed1a28610e4@ideasonboard.com?part=5
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v5 6/7] arm64: dts: renesas: sparrow-hawk: Enable DisplayPort by adding DSC
2026-06-15 13:11 [PATCH v5 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
` (4 preceding siblings ...)
2026-06-15 13:11 ` [PATCH v5 5/7] arm64: dts: renesas: r8a779g0: Add DSC Tomi Valkeinen
@ 2026-06-15 13:11 ` Tomi Valkeinen
2026-06-23 20:37 ` sashiko-bot
2026-06-15 13:12 ` [PATCH v5 7/7] arm64: dts: renesas: white-hawk: Add second mini-DP output support Tomi Valkeinen
6 siblings, 1 reply; 12+ messages in thread
From: Tomi Valkeinen @ 2026-06-15 13:11 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Marek Vasut,
Laurent Pinchart, Kieran Bingham, Philipp Zabel
Cc: linux-renesas-soc, linux-clk, linux-kernel, dri-devel, devicetree,
Tomi Valkeinen
From: Marek Vasut <marek.vasut+renesas@mailbox.org>
DisplayPort on the Sparrow Hawk board uses sn65dsi86 bridge, which in
turn gets the video stream from the SoC's DSI1 port. DSI1 pipeline has a
DSC block in between the DU and the DSI1. However, there was no DSC
driver in Linux and also the DSC was not defined in the dts files, and
thus the DisplayPort output did not work.
Now that we have DSC defined in the SoC dts file (r8a779g0.dtsi), we can
enable DSC for sparrowhawk.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[tomi.valkeinen: separated the sparrow hawk changes from the soc changes]
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
---
arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts b/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts
index af680290ce81..0a5ebe0460ca 100644
--- a/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts
+++ b/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts
@@ -288,6 +288,11 @@ channel4 {
};
};
+/* Page 27 / DSI to Display */
+&dsc {
+ status = "okay";
+};
+
/* Page 27 / DSI to Display */
&dsi1 {
status = "okay";
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v5 6/7] arm64: dts: renesas: sparrow-hawk: Enable DisplayPort by adding DSC
2026-06-15 13:11 ` [PATCH v5 6/7] arm64: dts: renesas: sparrow-hawk: Enable DisplayPort by adding DSC Tomi Valkeinen
@ 2026-06-23 20:37 ` sashiko-bot
0 siblings, 0 replies; 12+ messages in thread
From: sashiko-bot @ 2026-06-23 20:37 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: devicetree, dri-devel, wsa+renesas, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The rcar_dsc driver ignores the `resets` property from the DT binding, failing to deassert the DSC hardware module's reset state.
--
commit a8616c71b764dc9fa4ae244e47795371e7fead44
Author: Marek Vasut <marek.vasut+renesas@mailbox.org>
drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver
This commit introduces a rudimentary DSC bridge driver for the Renesas R-Car
V4H SoC. The driver functions as a pass-through to enable the DSI1 pipeline
and performs VESA DSC encoding.
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c b/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c
> new file mode 100644
> index 0000000000000..362e683289d69
> --- /dev/null
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_dsc.c
[ ... ]
> +static int rcar_dsc_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct rcar_dsc *dsc;
> + int ret;
> +
> + dsc = devm_drm_bridge_alloc(dev, struct rcar_dsc, bridge,
> + &rcar_dsc_bridge_ops);
> + if (IS_ERR(dsc))
> + return PTR_ERR(dsc);
> +
> + platform_set_drvdata(pdev, dsc);
> +
> + dsc->dev = &pdev->dev;
> +
> + dsc->bridge.next_bridge = of_drm_get_bridge_by_endpoint(dev->of_node,
> + 1, 0);
[Severity: High]
Does this driver fail to retrieve and deassert the DSC module's hardware reset
state?
If the reset control isn't retrieved and deasserted, the DSC hardware module
will remain in a reset state, breaking the display pipeline functionality. It
might coincidentally work if the bootloader has already deasserted the reset,
but could fail on suspend/resume or when the bootloader does not initialize
the display.
Should the driver use devm_reset_control_get_exclusive() here and deassert
the reset state during probe?
> + if (IS_ERR(dsc->bridge.next_bridge))
> + return PTR_ERR(dsc->bridge.next_bridge);
> +
> + dsc->bridge.of_node = dev->of_node;
> +
> + pm_runtime_enable(&pdev->dev);
> +
> + ret = devm_drm_bridge_add(dev, &dsc->bridge);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260615-rcar-du-dsc-v5-0-aed1a28610e4@ideasonboard.com?part=6
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v5 7/7] arm64: dts: renesas: white-hawk: Add second mini-DP output support
2026-06-15 13:11 [PATCH v5 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
` (5 preceding siblings ...)
2026-06-15 13:11 ` [PATCH v5 6/7] arm64: dts: renesas: sparrow-hawk: Enable DisplayPort by adding DSC Tomi Valkeinen
@ 2026-06-15 13:12 ` Tomi Valkeinen
6 siblings, 0 replies; 12+ messages in thread
From: Tomi Valkeinen @ 2026-06-15 13:12 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Marek Vasut,
Laurent Pinchart, Kieran Bingham, Philipp Zabel
Cc: linux-renesas-soc, linux-clk, linux-kernel, dri-devel, devicetree,
Tomi Valkeinen
From: Geert Uytterhoeven <geert+renesas@glider.be>
Add support for the mini-DisplayPort connector on the White Hawk
BreakOut board. This connector is driven by a TI SN65DSI86 DSI to eDP
bridge, which in turn gets the pixel data from the second DSI channel on
the R-Car V4H SoC. Note that this port is not present on the White Hawk
Single development board.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[tomi.valkeinen: added status=okay for dsc]
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
---
.../arm64/boot/dts/renesas/r8a779g0-white-hawk.dts | 94 ++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk.dts b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk.dts
index 784d4e8b204c..89d60b83ac4f 100644
--- a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk.dts
+++ b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk.dts
@@ -12,4 +12,98 @@
/ {
model = "Renesas White Hawk CPU and Breakout boards based on r8a779g0";
compatible = "renesas,white-hawk-breakout", "renesas,white-hawk-cpu", "renesas,r8a779g0";
+
+ sn65dsi86_refclk2: clk-x16 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <38400000>;
+ };
+
+ mini-dp-con2 {
+ compatible = "dp-connector";
+ label = "CN15";
+ type = "mini";
+
+ port {
+ mini_dp_con_in2: endpoint {
+ remote-endpoint = <&sn65dsi86_out2>;
+ };
+ };
+ };
+};
+
+&dsc {
+ status = "okay";
+};
+
+&dsi1 {
+ status = "okay";
+
+ ports {
+ port@1 {
+ dsi1_out: endpoint {
+ remote-endpoint = <&sn65dsi86_in2>;
+ data-lanes = <1 2 3 4>;
+ };
+ };
+ };
+};
+
+&i2c4 {
+ pinctrl-0 = <&i2c4_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+ clock-frequency = <400000>;
+
+ bridge@2c {
+ pinctrl-0 = <&irq1_pins>;
+ pinctrl-names = "default";
+
+ compatible = "ti,sn65dsi86";
+ reg = <0x2c>;
+
+ clocks = <&sn65dsi86_refclk2>;
+ clock-names = "refclk";
+
+ interrupts-extended = <&intc_ex 1 IRQ_TYPE_LEVEL_HIGH>;
+
+ enable-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
+
+ vccio-supply = <®_1p8v>;
+ vpll-supply = <®_1p8v>;
+ vcca-supply = <®_1p2v>;
+ vcc-supply = <®_1p2v>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ sn65dsi86_in2: endpoint {
+ remote-endpoint = <&dsi1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ sn65dsi86_out2: endpoint {
+ remote-endpoint = <&mini_dp_con_in2>;
+ };
+ };
+ };
+ };
+};
+
+&pfc {
+ i2c4_pins: i2c4 {
+ groups = "i2c4";
+ function = "i2c4";
+ };
+
+ irq1_pins: irq1 {
+ groups = "intc_ex_irq1_a";
+ function = "intc_ex";
+ };
};
--
2.43.0
^ permalink raw reply related [flat|nested] 12+ messages in thread