All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Add RZ/G3L GFX support
@ 2026-03-20 16:41 Biju
  2026-03-20 16:41 ` [PATCH v2 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC Biju
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Biju @ 2026-03-20 16:41 UTC (permalink / raw)
  To: David Airlie, Simona Vetter, Steven Price, Boris Brezillon,
	Adrián Larumbe, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Geert Uytterhoeven, Magnus Damm
  Cc: Biju Das, dri-devel, devicetree, linux-kernel, linux-renesas-soc,
	Prabhakar Mahadev Lad, Biju Das

From: Biju Das <biju.das.jz@bp.renesas.com>

The Renesas RZ/G3L SoC includes the Arm Mali-G31 GPU as a 3D Graphics
Engine (GE3D). The Arm Mali-G31 GPU is a graphics acceleration platform
that is based on open standards. It supports 2D graphics, 3D graphics, and
General Purpose computing on GPU (GPGPU). Add the binding and driver
support for suspend/resume functionality along with some improvements in
panfrost driver.

v1->v2:
 * Dropped duplicate err assignment
 * Changed the format string of dev_err to "%d" and simplify the dev_err()
   line by using err rather than the same PTR_ERR().
 * Collected tags

Biju Das (4):
  dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC
  drm/panfrost: Drop redundant optional clock checks in runtime PM
  drm/panfrost: Add bus_ace optional clock support for RZ/G2L
  drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC

 .../bindings/gpu/arm,mali-bifrost.yaml        |  2 ++
 drivers/gpu/drm/panfrost/panfrost_device.c    | 34 ++++++++++++++-----
 drivers/gpu/drm/panfrost/panfrost_device.h    |  1 +
 drivers/gpu/drm/panfrost/panfrost_drv.c       |  1 +
 4 files changed, 30 insertions(+), 8 deletions(-)

-- 
2.43.0


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

* [PATCH v2 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC
  2026-03-20 16:41 [PATCH v2 0/4] Add RZ/G3L GFX support Biju
@ 2026-03-20 16:41 ` Biju
  2026-03-26 14:10   ` Geert Uytterhoeven
  2026-03-20 16:41 ` [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM Biju
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Biju @ 2026-03-20 16:41 UTC (permalink / raw)
  To: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Geert Uytterhoeven, Magnus Damm
  Cc: Biju Das, dri-devel, devicetree, linux-kernel, linux-renesas-soc,
	Prabhakar Mahadev Lad, Biju Das

From: Biju Das <biju.das.jz@bp.renesas.com>

Add a compatible string for the Renesas RZ/G3L SoC variants that include a
Mali-G31 GPU. These variants share the same restrictions on interrupts,
clocks, and power domains as the RZ/G2L SoC, so extend the existing schema
validation accordingly.

Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Collected tag
---
 Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
index db49b8ff8c74..9db9f84ad964 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
@@ -26,6 +26,7 @@ properties:
               - realtek,rtd1619-mali
               - renesas,r9a07g044-mali
               - renesas,r9a07g054-mali
+              - renesas,r9a08g046-mali
               - renesas,r9a09g047-mali
               - renesas,r9a09g056-mali
               - renesas,r9a09g057-mali
@@ -150,6 +151,7 @@ allOf:
             enum:
               - renesas,r9a07g044-mali
               - renesas,r9a07g054-mali
+              - renesas,r9a08g046-mali
               - renesas,r9a09g047-mali
               - renesas,r9a09g056-mali
               - renesas,r9a09g057-mali
-- 
2.43.0


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

* [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-20 16:41 [PATCH v2 0/4] Add RZ/G3L GFX support Biju
  2026-03-20 16:41 ` [PATCH v2 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC Biju
@ 2026-03-20 16:41 ` Biju
  2026-03-20 21:19   ` Adrián Larumbe
  2026-03-26 15:32   ` Adrián Larumbe
  2026-03-20 16:41 ` [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Biju
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 19+ messages in thread
From: Biju @ 2026-03-20 16:41 UTC (permalink / raw)
  To: Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter
  Cc: Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, Biju Das, linux-renesas-soc

From: Biju Das <biju.das.jz@bp.renesas.com>

The clk_enable() and clk_disable() APIs already handle NULL clock pointers
gracefully — clk_enable() returns 0 and clk_disable() returns immediately
when passed a NULL or optional clock. The explicit if (pfdev->bus_clock)
guards around these calls in the runtime suspend/resume paths are
therefore unnecessary. Remove them to simplify the code.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Collected tag
---
 drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index dedc13e56631..01e702a0b2f0 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
 		if (ret)
 			goto err_clk;
 
-		if (pfdev->bus_clock) {
-			ret = clk_enable(pfdev->bus_clock);
-			if (ret)
-				goto err_bus_clk;
-		}
+		ret = clk_enable(pfdev->bus_clock);
+		if (ret)
+			goto err_bus_clk;
 	}
 
 	panfrost_device_reset(pfdev, true);
@@ -464,9 +462,7 @@ static int panfrost_device_runtime_suspend(struct device *dev)
 	panfrost_gpu_power_off(pfdev);
 
 	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
-		if (pfdev->bus_clock)
-			clk_disable(pfdev->bus_clock);
-
+		clk_disable(pfdev->bus_clock);
 		clk_disable(pfdev->clock);
 		reset_control_assert(pfdev->rstc);
 	}
-- 
2.43.0


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

* [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L
  2026-03-20 16:41 [PATCH v2 0/4] Add RZ/G3L GFX support Biju
  2026-03-20 16:41 ` [PATCH v2 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC Biju
  2026-03-20 16:41 ` [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM Biju
@ 2026-03-20 16:41 ` Biju
  2026-03-20 21:15   ` Adrián Larumbe
  2026-03-26 15:32   ` Adrián Larumbe
  2026-03-20 16:41 ` [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC Biju
  2026-03-27  2:14 ` [PATCH v2 0/4] Add RZ/G3L GFX support Adrián Larumbe
  4 siblings, 2 replies; 19+ messages in thread
From: Biju @ 2026-03-20 16:41 UTC (permalink / raw)
  To: Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter
  Cc: Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, Biju Das, linux-renesas-soc

From: Biju Das <biju.das.jz@bp.renesas.com>

On RZ/G2L SoCs, the GPU MMU requires a bus_ace clock to operate correctly.
Without it, unbind/bind cycles leave the GPU non-operational, manifesting
as an AS_ACTIVE bit stuck and a soft reset timeout falling back to hard
reset. Add bus_ace_clock as an optional clock, wiring it into init/fini,
and the runtime suspend/resume paths alongside the existing optional
bus_clock.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Dropped duplicate err assignment
 * Changed the format string of dev_err to "%d" and simplify the dev_err()
   line by using err rather than the same PTR_ERR().
 * Collected tag
---
 drivers/gpu/drm/panfrost/panfrost_device.c | 22 ++++++++++++++++++++++
 drivers/gpu/drm/panfrost/panfrost_device.h |  1 +
 2 files changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index 01e702a0b2f0..7fed22d555a5 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -70,8 +70,21 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
 			goto disable_clock;
 	}
 
+	pfdev->bus_ace_clock = devm_clk_get_optional(pfdev->base.dev, "bus_ace");
+	if (IS_ERR(pfdev->bus_ace_clock)) {
+		err = PTR_ERR(pfdev->bus_ace_clock);
+		dev_err(pfdev->base.dev, "get bus_ace_clock failed %d\n", err);
+		goto disable_bus_clock;
+	}
+
+	err = clk_prepare_enable(pfdev->bus_ace_clock);
+	if (err)
+		goto disable_bus_clock;
+
 	return 0;
 
+disable_bus_clock:
+	clk_disable_unprepare(pfdev->bus_clock);
 disable_clock:
 	clk_disable_unprepare(pfdev->clock);
 
@@ -80,6 +93,7 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
 
 static void panfrost_clk_fini(struct panfrost_device *pfdev)
 {
+	clk_disable_unprepare(pfdev->bus_ace_clock);
 	clk_disable_unprepare(pfdev->bus_clock);
 	clk_disable_unprepare(pfdev->clock);
 }
@@ -432,6 +446,10 @@ static int panfrost_device_runtime_resume(struct device *dev)
 		ret = clk_enable(pfdev->bus_clock);
 		if (ret)
 			goto err_bus_clk;
+
+		ret = clk_enable(pfdev->bus_ace_clock);
+		if (ret)
+			goto err_bus_ace_clk;
 	}
 
 	panfrost_device_reset(pfdev, true);
@@ -439,6 +457,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
 
 	return 0;
 
+err_bus_ace_clk:
+	if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
+		clk_disable(pfdev->bus_clock);
 err_bus_clk:
 	if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
 		clk_disable(pfdev->clock);
@@ -462,6 +483,7 @@ static int panfrost_device_runtime_suspend(struct device *dev)
 	panfrost_gpu_power_off(pfdev);
 
 	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
+		clk_disable(pfdev->bus_ace_clock);
 		clk_disable(pfdev->bus_clock);
 		clk_disable(pfdev->clock);
 		reset_control_assert(pfdev->rstc);
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h
index 0f3992412205..ec55c136b1b6 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.h
+++ b/drivers/gpu/drm/panfrost/panfrost_device.h
@@ -136,6 +136,7 @@ struct panfrost_device {
 	void __iomem *iomem;
 	struct clk *clock;
 	struct clk *bus_clock;
+	struct clk *bus_ace_clock;
 	struct regulator_bulk_data *regulators;
 	struct reset_control *rstc;
 	/* pm_domains for devices with more than one. */
-- 
2.43.0


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

* [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC
  2026-03-20 16:41 [PATCH v2 0/4] Add RZ/G3L GFX support Biju
                   ` (2 preceding siblings ...)
  2026-03-20 16:41 ` [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Biju
@ 2026-03-20 16:41 ` Biju
  2026-03-20 21:14   ` Adrián Larumbe
  2026-03-26 15:33   ` Adrián Larumbe
  2026-03-27  2:14 ` [PATCH v2 0/4] Add RZ/G3L GFX support Adrián Larumbe
  4 siblings, 2 replies; 19+ messages in thread
From: Biju @ 2026-03-20 16:41 UTC (permalink / raw)
  To: Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter
  Cc: Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, Biju Das, linux-renesas-soc

From: Biju Das <biju.das.jz@bp.renesas.com>

RZ/G3L SoC is embedded with Mali-G31 GPU system. Add GPU_PM_RT support as
it needs to be assert/deassert the reset during suspend/resume.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Collected tag
---
 drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 711f5101aa04..3d0bdba2a474 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -1156,6 +1156,7 @@ static const struct of_device_id dt_match[] = {
 	  .data = &amlogic_data, },
 	{ .compatible = "amlogic,meson-g12a-mali",
 	  .data = &amlogic_data, },
+	{ .compatible = "renesas,r9a08g046-mali", .data = &default_pm_rt_data },
 	{ .compatible = "renesas,r9a09g047-mali", .data = &default_pm_rt_data },
 	{ .compatible = "arm,mali-t604", .data = &default_data, },
 	{ .compatible = "arm,mali-t624", .data = &default_data, },
-- 
2.43.0


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

* Re: [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC
  2026-03-20 16:41 ` [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC Biju
@ 2026-03-20 21:14   ` Adrián Larumbe
  2026-03-26 15:33   ` Adrián Larumbe
  1 sibling, 0 replies; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-20 21:14 UTC (permalink / raw)
  To: Biju
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, linux-renesas-soc

Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>

On 20.03.2026 16:41, Biju wrote:
From: Biju Das <biju.das.jz@bp.renesas.com>

RZ/G3L SoC is embedded with Mali-G31 GPU system. Add GPU_PM_RT support as
it needs to be assert/deassert the reset during suspend/resume.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Collected tag
---
 drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 711f5101aa04..3d0bdba2a474 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -1156,6 +1156,7 @@ static const struct of_device_id dt_match[] = {
 	  .data = &amlogic_data, },
 	{ .compatible = "amlogic,meson-g12a-mali",
 	  .data = &amlogic_data, },
+	{ .compatible = "renesas,r9a08g046-mali", .data = &default_pm_rt_data },
 	{ .compatible = "renesas,r9a09g047-mali", .data = &default_pm_rt_data },
 	{ .compatible = "arm,mali-t604", .data = &default_data, },
 	{ .compatible = "arm,mali-t624", .data = &default_data, },
--
2.43.0


Adrian Larumbe

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

* Re: [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L
  2026-03-20 16:41 ` [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Biju
@ 2026-03-20 21:15   ` Adrián Larumbe
  2026-03-26 15:32   ` Adrián Larumbe
  1 sibling, 0 replies; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-20 21:15 UTC (permalink / raw)
  To: Biju
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, linux-renesas-soc

Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>

On 20.03.2026 16:41, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> On RZ/G2L SoCs, the GPU MMU requires a bus_ace clock to operate correctly.
> Without it, unbind/bind cycles leave the GPU non-operational, manifesting
> as an AS_ACTIVE bit stuck and a soft reset timeout falling back to hard
> reset. Add bus_ace_clock as an optional clock, wiring it into init/fini,
> and the runtime suspend/resume paths alongside the existing optional
> bus_clock.
>
> Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Dropped duplicate err assignment
>  * Changed the format string of dev_err to "%d" and simplify the dev_err()
>    line by using err rather than the same PTR_ERR().
>  * Collected tag
> ---
>  drivers/gpu/drm/panfrost/panfrost_device.c | 22 ++++++++++++++++++++++
>  drivers/gpu/drm/panfrost/panfrost_device.h |  1 +
>  2 files changed, 23 insertions(+)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index 01e702a0b2f0..7fed22d555a5 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -70,8 +70,21 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
>  			goto disable_clock;
>  	}
>
> +	pfdev->bus_ace_clock = devm_clk_get_optional(pfdev->base.dev, "bus_ace");
> +	if (IS_ERR(pfdev->bus_ace_clock)) {
> +		err = PTR_ERR(pfdev->bus_ace_clock);
> +		dev_err(pfdev->base.dev, "get bus_ace_clock failed %d\n", err);
> +		goto disable_bus_clock;
> +	}
> +
> +	err = clk_prepare_enable(pfdev->bus_ace_clock);
> +	if (err)
> +		goto disable_bus_clock;
> +
>  	return 0;
>
> +disable_bus_clock:
> +	clk_disable_unprepare(pfdev->bus_clock);
>  disable_clock:
>  	clk_disable_unprepare(pfdev->clock);
>
> @@ -80,6 +93,7 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
>
>  static void panfrost_clk_fini(struct panfrost_device *pfdev)
>  {
> +	clk_disable_unprepare(pfdev->bus_ace_clock);
>  	clk_disable_unprepare(pfdev->bus_clock);
>  	clk_disable_unprepare(pfdev->clock);
>  }
> @@ -432,6 +446,10 @@ static int panfrost_device_runtime_resume(struct device *dev)
>  		ret = clk_enable(pfdev->bus_clock);
>  		if (ret)
>  			goto err_bus_clk;
> +
> +		ret = clk_enable(pfdev->bus_ace_clock);
> +		if (ret)
> +			goto err_bus_ace_clk;
>  	}
>
>  	panfrost_device_reset(pfdev, true);
> @@ -439,6 +457,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
>
>  	return 0;
>
> +err_bus_ace_clk:
> +	if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
> +		clk_disable(pfdev->bus_clock);
>  err_bus_clk:
>  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
>  		clk_disable(pfdev->clock);
> @@ -462,6 +483,7 @@ static int panfrost_device_runtime_suspend(struct device *dev)
>  	panfrost_gpu_power_off(pfdev);
>
>  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
> +		clk_disable(pfdev->bus_ace_clock);
>  		clk_disable(pfdev->bus_clock);
>  		clk_disable(pfdev->clock);
>  		reset_control_assert(pfdev->rstc);
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h
> index 0f3992412205..ec55c136b1b6 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.h
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.h
> @@ -136,6 +136,7 @@ struct panfrost_device {
>  	void __iomem *iomem;
>  	struct clk *clock;
>  	struct clk *bus_clock;
> +	struct clk *bus_ace_clock;
>  	struct regulator_bulk_data *regulators;
>  	struct reset_control *rstc;
>  	/* pm_domains for devices with more than one. */
> --
> 2.43.0


Adrian Larumbe

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

* Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-20 16:41 ` [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM Biju
@ 2026-03-20 21:19   ` Adrián Larumbe
  2026-03-20 21:32     ` Biju Das
  2026-03-26 15:32   ` Adrián Larumbe
  1 sibling, 1 reply; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-20 21:19 UTC (permalink / raw)
  To: Biju
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, linux-renesas-soc

Hi Biju,

On 20.03.2026 16:41, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> The clk_enable() and clk_disable() APIs already handle NULL clock pointers
> gracefully — clk_enable() returns 0 and clk_disable() returns immediately
> when passed a NULL or optional clock. The explicit if (pfdev->bus_clock)
> guards around these calls in the runtime suspend/resume paths are
> therefore unnecessary. Remove them to simplify the code.
>
> Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Collected tag
> ---
>  drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index dedc13e56631..01e702a0b2f0 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
>  		if (ret)
>  			goto err_clk;
>
> -		if (pfdev->bus_clock) {
> -			ret = clk_enable(pfdev->bus_clock);
> -			if (ret)
> -				goto err_bus_clk;
> -		}
> +		ret = clk_enable(pfdev->bus_clock);
> +		if (ret)
> +			goto err_bus_clk;
>  	}

It seems clk_prepare_enable() can also deal with NULL clock device pointers gracefully,
so maybe you could also do away with pointer checks in panfrost_clk_init?

Other than that,

Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>

>  	panfrost_device_reset(pfdev, true);
> @@ -464,9 +462,7 @@ static int panfrost_device_runtime_suspend(struct device *dev)
>  	panfrost_gpu_power_off(pfdev);
>
>  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
> -		if (pfdev->bus_clock)
> -			clk_disable(pfdev->bus_clock);
> -
> +		clk_disable(pfdev->bus_clock);
>  		clk_disable(pfdev->clock);
>  		reset_control_assert(pfdev->rstc);
>  	}
> --
> 2.43.0


Adrian Larumbe

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

* RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-20 21:19   ` Adrián Larumbe
@ 2026-03-20 21:32     ` Biju Das
  2026-03-21 14:16       ` Biju Das
  0 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2026-03-20 21:32 UTC (permalink / raw)
  To: Adrián Larumbe, biju.das.au
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc@vger.kernel.org



> -----Original Message-----
> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Adrián Larumbe
> Sent: 20 March 2026 21:20
> To: biju.das.au <biju.das.au@gmail.com>
> Cc: Boris Brezillon <boris.brezillon@collabora.com>; Rob Herring <robh@kernel.org>; Steven Price
> <steven.price@arm.com>; Maarten Lankhorst <maarten.lankhorst@linux.intel.com>; Maxime Ripard
> <mripard@kernel.org>; Thomas Zimmermann <tzimmermann@suse.de>; David Airlie <airlied@gmail.com>;
> Simona Vetter <simona@ffwll.ch>; Biju Das <biju.das.jz@bp.renesas.com>; dri-
> devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; Geert Uytterhoeven
> <geert+renesas@glider.be>; Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; linux-
> renesas-soc@vger.kernel.org
> Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
> 
> Hi Biju,
> 
> On 20.03.2026 16:41, Biju wrote:
> > From: Biju Das <biju.das.jz@bp.renesas.com>
> >
> > The clk_enable() and clk_disable() APIs already handle NULL clock
> > pointers gracefully — clk_enable() returns 0 and clk_disable() returns
> > immediately when passed a NULL or optional clock. The explicit if
> > (pfdev->bus_clock) guards around these calls in the runtime
> > suspend/resume paths are therefore unnecessary. Remove them to simplify the code.
> >
> > Reviewed-by: Steven Price <steven.price@arm.com>
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v1->v2:
> >  * Collected tag
> > ---
> >  drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
> >  1 file changed, 4 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
> > b/drivers/gpu/drm/panfrost/panfrost_device.c
> > index dedc13e56631..01e702a0b2f0 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> > @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
> >  		if (ret)
> >  			goto err_clk;
> >
> > -		if (pfdev->bus_clock) {
> > -			ret = clk_enable(pfdev->bus_clock);
> > -			if (ret)
> > -				goto err_bus_clk;
> > -		}
> > +		ret = clk_enable(pfdev->bus_clock);
> > +		if (ret)
> > +			goto err_bus_clk;
> >  	}
> 
> It seems clk_prepare_enable() can also deal with NULL clock device pointers gracefully, so maybe you
> could also do away with pointer checks in panfrost_clk_init?

This is the only check and no need to print rate for optional clk. That is the reason I have not
touched this.

	if (pfdev->bus_clock) {
		rate = clk_get_rate(pfdev->bus_clock);
		dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);

		err = clk_prepare_enable(pfdev->bus_clock);
		if (err)
			goto disable_clock;
	}

Cheers,
Biju
> 
> Other than that,
> 
> Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>
> 
> >  	panfrost_device_reset(pfdev, true);
> > @@ -464,9 +462,7 @@ static int panfrost_device_runtime_suspend(struct device *dev)
> >  	panfrost_gpu_power_off(pfdev);
> >
> >  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
> > -		if (pfdev->bus_clock)
> > -			clk_disable(pfdev->bus_clock);
> > -
> > +		clk_disable(pfdev->bus_clock);
> >  		clk_disable(pfdev->clock);
> >  		reset_control_assert(pfdev->rstc);
> >  	}
> > --
> > 2.43.0
> 
> 
> Adrian Larumbe

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

* RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-20 21:32     ` Biju Das
@ 2026-03-21 14:16       ` Biju Das
  2026-03-24 17:10         ` Adrián Larumbe
  0 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2026-03-21 14:16 UTC (permalink / raw)
  To: Adrián Larumbe
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc@vger.kernel.org

Hi Adrián Larumbe,

Thanks for the feedback.

> -----Original Message-----
> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Biju Das
> Sent: 20 March 2026 21:32
> Subject: RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
> 
> 
> 
> > -----Original Message-----
> > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
> > Adrián Larumbe
> > Sent: 20 March 2026 21:20
> > Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional
> > clock checks in runtime PM
> >
> > Hi Biju,
> >
> > On 20.03.2026 16:41, Biju wrote:
> > > From: Biju Das <biju.das.jz@bp.renesas.com>
> > >
> > > The clk_enable() and clk_disable() APIs already handle NULL clock
> > > pointers gracefully — clk_enable() returns 0 and clk_disable()
> > > returns immediately when passed a NULL or optional clock. The
> > > explicit if
> > > (pfdev->bus_clock) guards around these calls in the runtime
> > > suspend/resume paths are therefore unnecessary. Remove them to simplify the code.
> > >
> > > Reviewed-by: Steven Price <steven.price@arm.com>
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > ---
> > > v1->v2:
> > >  * Collected tag
> > > ---
> > >  drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
> > >  1 file changed, 4 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > index dedc13e56631..01e702a0b2f0 100644
> > > --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
> > >  		if (ret)
> > >  			goto err_clk;
> > >
> > > -		if (pfdev->bus_clock) {
> > > -			ret = clk_enable(pfdev->bus_clock);
> > > -			if (ret)
> > > -				goto err_bus_clk;
> > > -		}
> > > +		ret = clk_enable(pfdev->bus_clock);
> > > +		if (ret)
> > > +			goto err_bus_clk;
> > >  	}
> >
> > It seems clk_prepare_enable() can also deal with NULL clock device
> > pointers gracefully, so maybe you could also do away with pointer checks in panfrost_clk_init?
> 
> This is the only check and no need to print rate for optional clk. That is the reason I have not
> touched this.
> 
> 	if (pfdev->bus_clock) {
> 		rate = clk_get_rate(pfdev->bus_clock);
> 		dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);
> 
> 		err = clk_prepare_enable(pfdev->bus_clock);
> 		if (err)
> 			goto disable_clock;
> 	}

The above block is good for optional clock.

Otherwise, there will be 2 checks for optional clk.

One here:

if (pfdev->bus_clock) {
	rate = clk_get_rate(pfdev->bus_clock);
	dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);
}

and one inside the clk_prepare_enable(): 

err = clk_prepare_enable(pfdev->bus_clock);

Please let me know your thoughts.

Cheers,
Biju

> 
> Cheers,
> Biju
> >
> > Other than that,
> >
> > Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>
> >
> > >  	panfrost_device_reset(pfdev, true); @@ -464,9 +462,7 @@ static int
> > > panfrost_device_runtime_suspend(struct device *dev)
> > >  	panfrost_gpu_power_off(pfdev);
> > >
> > >  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
> > > -		if (pfdev->bus_clock)
> > > -			clk_disable(pfdev->bus_clock);
> > > -
> > > +		clk_disable(pfdev->bus_clock);
> > >  		clk_disable(pfdev->clock);
> > >  		reset_control_assert(pfdev->rstc);
> > >  	}
> > > --
> > > 2.43.0
> >
> >
> > Adrian Larumbe

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

* Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-21 14:16       ` Biju Das
@ 2026-03-24 17:10         ` Adrián Larumbe
  2026-03-26  8:55           ` Biju Das
  0 siblings, 1 reply; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-24 17:10 UTC (permalink / raw)
  To: Biju Das
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc@vger.kernel.org

On 21.03.2026 14:16, Biju Das wrote:
> Hi Adrián Larumbe,
>
> Thanks for the feedback.
>
> > -----Original Message-----
> > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Biju Das
> > Sent: 20 March 2026 21:32
> > Subject: RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
> >
> >
> >
> > > -----Original Message-----
> > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
> > > Adrián Larumbe
> > > Sent: 20 March 2026 21:20
> > > Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional
> > > clock checks in runtime PM
> > >
> > > Hi Biju,
> > >
> > > On 20.03.2026 16:41, Biju wrote:
> > > > From: Biju Das <biju.das.jz@bp.renesas.com>
> > > >
> > > > The clk_enable() and clk_disable() APIs already handle NULL clock
> > > > pointers gracefully — clk_enable() returns 0 and clk_disable()
> > > > returns immediately when passed a NULL or optional clock. The
> > > > explicit if
> > > > (pfdev->bus_clock) guards around these calls in the runtime
> > > > suspend/resume paths are therefore unnecessary. Remove them to simplify the code.
> > > >
> > > > Reviewed-by: Steven Price <steven.price@arm.com>
> > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > ---
> > > > v1->v2:
> > > >  * Collected tag
> > > > ---
> > > >  drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
> > > >  1 file changed, 4 insertions(+), 8 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > index dedc13e56631..01e702a0b2f0 100644
> > > > --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
> > > >  		if (ret)
> > > >  			goto err_clk;
> > > >
> > > > -		if (pfdev->bus_clock) {
> > > > -			ret = clk_enable(pfdev->bus_clock);
> > > > -			if (ret)
> > > > -				goto err_bus_clk;
> > > > -		}
> > > > +		ret = clk_enable(pfdev->bus_clock);
> > > > +		if (ret)
> > > > +			goto err_bus_clk;
> > > >  	}
> > >
> > > It seems clk_prepare_enable() can also deal with NULL clock device
> > > pointers gracefully, so maybe you could also do away with pointer checks in panfrost_clk_init?
> >
> > This is the only check and no need to print rate for optional clk. That is the reason I have not
> > touched this.
> >
> > 	if (pfdev->bus_clock) {
> > 		rate = clk_get_rate(pfdev->bus_clock);
> > 		dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);
> >
> > 		err = clk_prepare_enable(pfdev->bus_clock);
> > 		if (err)
> > 			goto disable_clock;
> > 	}
>
> The above block is good for optional clock.
>
> Otherwise, there will be 2 checks for optional clk.
>
> One here:
>
> if (pfdev->bus_clock) {
> 	rate = clk_get_rate(pfdev->bus_clock);
> 	dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);
> }
>
> and one inside the clk_prepare_enable():
>
> err = clk_prepare_enable(pfdev->bus_clock);
>
> Please let me know your thoughts.

You're right, it's probably best to leave it the way it is.

Cheers,
Adrian

> Cheers,
> Biju
>
> >
> > Cheers,
> > Biju
> > >
> > > Other than that,
> > >
> > > Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>
> > >
> > > >  	panfrost_device_reset(pfdev, true); @@ -464,9 +462,7 @@ static int
> > > > panfrost_device_runtime_suspend(struct device *dev)
> > > >  	panfrost_gpu_power_off(pfdev);
> > > >
> > > >  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
> > > > -		if (pfdev->bus_clock)
> > > > -			clk_disable(pfdev->bus_clock);
> > > > -
> > > > +		clk_disable(pfdev->bus_clock);
> > > >  		clk_disable(pfdev->clock);
> > > >  		reset_control_assert(pfdev->rstc);
> > > >  	}
> > > > --
> > > > 2.43.0
> > >
> > >
> > > Adrian Larumbe

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

* RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-24 17:10         ` Adrián Larumbe
@ 2026-03-26  8:55           ` Biju Das
  2026-03-26 11:58             ` Adrián Larumbe
  0 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2026-03-26  8:55 UTC (permalink / raw)
  To: Adrián Larumbe
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc@vger.kernel.org

Hi Adrian,

> -----Original Message-----
> From: Adrián Larumbe <adrian.larumbe@collabora.com>
> Sent: 24 March 2026 17:11
> Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
> 
> On 21.03.2026 14:16, Biju Das wrote:
> > Hi Adrián Larumbe,
> >
> > Thanks for the feedback.
> >
> > > -----Original Message-----
> > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf
> > > Of Biju Das
> > > Sent: 20 March 2026 21:32
> > > Subject: RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional
> > > clock checks in runtime PM
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On
> > > > Behalf Of Adrián Larumbe
> > > > Sent: 20 March 2026 21:20
> > > > Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional
> > > > clock checks in runtime PM
> > > >
> > > > Hi Biju,
> > > >
> > > > On 20.03.2026 16:41, Biju wrote:
> > > > > From: Biju Das <biju.das.jz@bp.renesas.com>
> > > > >
> > > > > The clk_enable() and clk_disable() APIs already handle NULL
> > > > > clock pointers gracefully — clk_enable() returns 0 and
> > > > > clk_disable() returns immediately when passed a NULL or optional
> > > > > clock. The explicit if
> > > > > (pfdev->bus_clock) guards around these calls in the runtime
> > > > > suspend/resume paths are therefore unnecessary. Remove them to simplify the code.
> > > > >
> > > > > Reviewed-by: Steven Price <steven.price@arm.com>
> > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > ---
> > > > > v1->v2:
> > > > >  * Collected tag
> > > > > ---
> > > > >  drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
> > > > >  1 file changed, 4 insertions(+), 8 deletions(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > index dedc13e56631..01e702a0b2f0 100644
> > > > > --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
> > > > >  		if (ret)
> > > > >  			goto err_clk;
> > > > >
> > > > > -		if (pfdev->bus_clock) {
> > > > > -			ret = clk_enable(pfdev->bus_clock);
> > > > > -			if (ret)
> > > > > -				goto err_bus_clk;
> > > > > -		}
> > > > > +		ret = clk_enable(pfdev->bus_clock);
> > > > > +		if (ret)
> > > > > +			goto err_bus_clk;
> > > > >  	}
> > > >
> > > > It seems clk_prepare_enable() can also deal with NULL clock device
> > > > pointers gracefully, so maybe you could also do away with pointer checks in panfrost_clk_init?
> > >
> > > This is the only check and no need to print rate for optional clk.
> > > That is the reason I have not touched this.
> > >
> > > 	if (pfdev->bus_clock) {
> > > 		rate = clk_get_rate(pfdev->bus_clock);
> > > 		dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);
> > >
> > > 		err = clk_prepare_enable(pfdev->bus_clock);
> > > 		if (err)
> > > 			goto disable_clock;
> > > 	}
> >
> > The above block is good for optional clock.
> >
> > Otherwise, there will be 2 checks for optional clk.
> >
> > One here:
> >
> > if (pfdev->bus_clock) {
> > 	rate = clk_get_rate(pfdev->bus_clock);
> > 	dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate); }
> >
> > and one inside the clk_prepare_enable():
> >
> > err = clk_prepare_enable(pfdev->bus_clock);
> >
> > Please let me know your thoughts.
> 
> You're right, it's probably best to leave it the way it is.

If you are happy with the series, can you please merge it?

Cheers,
Biju

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

* Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-26  8:55           ` Biju Das
@ 2026-03-26 11:58             ` Adrián Larumbe
  2026-03-26 15:36               ` Biju Das
  0 siblings, 1 reply; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-26 11:58 UTC (permalink / raw)
  To: Biju Das
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc@vger.kernel.org

On 26.03.2026 08:55, Biju Das wrote:
> Hi Adrian,
>
> > -----Original Message-----
> > From: Adrián Larumbe <adrian.larumbe@collabora.com>
> > Sent: 24 March 2026 17:11
> > Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
> >
> > On 21.03.2026 14:16, Biju Das wrote:
> > > Hi Adrián Larumbe,
> > >
> > > Thanks for the feedback.
> > >
> > > > -----Original Message-----
> > > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf
> > > > Of Biju Das
> > > > Sent: 20 March 2026 21:32
> > > > Subject: RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional
> > > > clock checks in runtime PM
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On
> > > > > Behalf Of Adrián Larumbe
> > > > > Sent: 20 March 2026 21:20
> > > > > Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional
> > > > > clock checks in runtime PM
> > > > >
> > > > > Hi Biju,
> > > > >
> > > > > On 20.03.2026 16:41, Biju wrote:
> > > > > > From: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > >
> > > > > > The clk_enable() and clk_disable() APIs already handle NULL
> > > > > > clock pointers gracefully — clk_enable() returns 0 and
> > > > > > clk_disable() returns immediately when passed a NULL or optional
> > > > > > clock. The explicit if
> > > > > > (pfdev->bus_clock) guards around these calls in the runtime
> > > > > > suspend/resume paths are therefore unnecessary. Remove them to simplify the code.
> > > > > >
> > > > > > Reviewed-by: Steven Price <steven.price@arm.com>
> > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > > ---
> > > > > > v1->v2:
> > > > > >  * Collected tag
> > > > > > ---
> > > > > >  drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
> > > > > >  1 file changed, 4 insertions(+), 8 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > index dedc13e56631..01e702a0b2f0 100644
> > > > > > --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
> > > > > >  		if (ret)
> > > > > >  			goto err_clk;
> > > > > >
> > > > > > -		if (pfdev->bus_clock) {
> > > > > > -			ret = clk_enable(pfdev->bus_clock);
> > > > > > -			if (ret)
> > > > > > -				goto err_bus_clk;
> > > > > > -		}
> > > > > > +		ret = clk_enable(pfdev->bus_clock);
> > > > > > +		if (ret)
> > > > > > +			goto err_bus_clk;
> > > > > >  	}
> > > > >
> > > > > It seems clk_prepare_enable() can also deal with NULL clock device
> > > > > pointers gracefully, so maybe you could also do away with pointer checks in panfrost_clk_init?
> > > >
> > > > This is the only check and no need to print rate for optional clk.
> > > > That is the reason I have not touched this.
> > > >
> > > > 	if (pfdev->bus_clock) {
> > > > 		rate = clk_get_rate(pfdev->bus_clock);
> > > > 		dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);
> > > >
> > > > 		err = clk_prepare_enable(pfdev->bus_clock);
> > > > 		if (err)
> > > > 			goto disable_clock;
> > > > 	}
> > >
> > > The above block is good for optional clock.
> > >
> > > Otherwise, there will be 2 checks for optional clk.
> > >
> > > One here:
> > >
> > > if (pfdev->bus_clock) {
> > > 	rate = clk_get_rate(pfdev->bus_clock);
> > > 	dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate); }
> > >
> > > and one inside the clk_prepare_enable():
> > >
> > > err = clk_prepare_enable(pfdev->bus_clock);
> > >
> > > Please let me know your thoughts.
> >
> > You're right, it's probably best to leave it the way it is.
>
> If you are happy with the series, can you please merge it?

Will do, I'll add my Rb's and let you know when it's merged.

> Cheers,
> Biju

Adrian Larumbe

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

* Re: [PATCH v2 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC
  2026-03-20 16:41 ` [PATCH v2 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC Biju
@ 2026-03-26 14:10   ` Geert Uytterhoeven
  0 siblings, 0 replies; 19+ messages in thread
From: Geert Uytterhoeven @ 2026-03-26 14:10 UTC (permalink / raw)
  To: Biju
  Cc: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Magnus Damm, Biju Das, dri-devel, devicetree, linux-kernel,
	linux-renesas-soc, Prabhakar Mahadev Lad

On Fri, 20 Mar 2026 at 17:42, Biju <biju.das.au@gmail.com> wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> Add a compatible string for the Renesas RZ/G3L SoC variants that include a
> Mali-G31 GPU. These variants share the same restrictions on interrupts,
> clocks, and power domains as the RZ/G2L SoC, so extend the existing schema
> validation accordingly.
>
> Acked-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.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] 19+ messages in thread

* Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-20 16:41 ` [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM Biju
  2026-03-20 21:19   ` Adrián Larumbe
@ 2026-03-26 15:32   ` Adrián Larumbe
  1 sibling, 0 replies; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-26 15:32 UTC (permalink / raw)
  To: Biju
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, linux-renesas-soc

Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>

On 20.03.2026 16:41, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> The clk_enable() and clk_disable() APIs already handle NULL clock pointers
> gracefully — clk_enable() returns 0 and clk_disable() returns immediately
> when passed a NULL or optional clock. The explicit if (pfdev->bus_clock)
> guards around these calls in the runtime suspend/resume paths are
> therefore unnecessary. Remove them to simplify the code.
>
> Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Collected tag
> ---
>  drivers/gpu/drm/panfrost/panfrost_device.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index dedc13e56631..01e702a0b2f0 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
>  		if (ret)
>  			goto err_clk;
>
> -		if (pfdev->bus_clock) {
> -			ret = clk_enable(pfdev->bus_clock);
> -			if (ret)
> -				goto err_bus_clk;
> -		}
> +		ret = clk_enable(pfdev->bus_clock);
> +		if (ret)
> +			goto err_bus_clk;
>  	}
>
>  	panfrost_device_reset(pfdev, true);
> @@ -464,9 +462,7 @@ static int panfrost_device_runtime_suspend(struct device *dev)
>  	panfrost_gpu_power_off(pfdev);
>
>  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
> -		if (pfdev->bus_clock)
> -			clk_disable(pfdev->bus_clock);
> -
> +		clk_disable(pfdev->bus_clock);
>  		clk_disable(pfdev->clock);
>  		reset_control_assert(pfdev->rstc);
>  	}
> --
> 2.43.0


Adrian Larumbe

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

* Re: [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L
  2026-03-20 16:41 ` [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Biju
  2026-03-20 21:15   ` Adrián Larumbe
@ 2026-03-26 15:32   ` Adrián Larumbe
  1 sibling, 0 replies; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-26 15:32 UTC (permalink / raw)
  To: Biju
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, linux-renesas-soc

Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>

On 20.03.2026 16:41, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> On RZ/G2L SoCs, the GPU MMU requires a bus_ace clock to operate correctly.
> Without it, unbind/bind cycles leave the GPU non-operational, manifesting
> as an AS_ACTIVE bit stuck and a soft reset timeout falling back to hard
> reset. Add bus_ace_clock as an optional clock, wiring it into init/fini,
> and the runtime suspend/resume paths alongside the existing optional
> bus_clock.
>
> Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Dropped duplicate err assignment
>  * Changed the format string of dev_err to "%d" and simplify the dev_err()
>    line by using err rather than the same PTR_ERR().
>  * Collected tag
> ---
>  drivers/gpu/drm/panfrost/panfrost_device.c | 22 ++++++++++++++++++++++
>  drivers/gpu/drm/panfrost/panfrost_device.h |  1 +
>  2 files changed, 23 insertions(+)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index 01e702a0b2f0..7fed22d555a5 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -70,8 +70,21 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
>  			goto disable_clock;
>  	}
>
> +	pfdev->bus_ace_clock = devm_clk_get_optional(pfdev->base.dev, "bus_ace");
> +	if (IS_ERR(pfdev->bus_ace_clock)) {
> +		err = PTR_ERR(pfdev->bus_ace_clock);
> +		dev_err(pfdev->base.dev, "get bus_ace_clock failed %d\n", err);
> +		goto disable_bus_clock;
> +	}
> +
> +	err = clk_prepare_enable(pfdev->bus_ace_clock);
> +	if (err)
> +		goto disable_bus_clock;
> +
>  	return 0;
>
> +disable_bus_clock:
> +	clk_disable_unprepare(pfdev->bus_clock);
>  disable_clock:
>  	clk_disable_unprepare(pfdev->clock);
>
> @@ -80,6 +93,7 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
>
>  static void panfrost_clk_fini(struct panfrost_device *pfdev)
>  {
> +	clk_disable_unprepare(pfdev->bus_ace_clock);
>  	clk_disable_unprepare(pfdev->bus_clock);
>  	clk_disable_unprepare(pfdev->clock);
>  }
> @@ -432,6 +446,10 @@ static int panfrost_device_runtime_resume(struct device *dev)
>  		ret = clk_enable(pfdev->bus_clock);
>  		if (ret)
>  			goto err_bus_clk;
> +
> +		ret = clk_enable(pfdev->bus_ace_clock);
> +		if (ret)
> +			goto err_bus_ace_clk;
>  	}
>
>  	panfrost_device_reset(pfdev, true);
> @@ -439,6 +457,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
>
>  	return 0;
>
> +err_bus_ace_clk:
> +	if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
> +		clk_disable(pfdev->bus_clock);
>  err_bus_clk:
>  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
>  		clk_disable(pfdev->clock);
> @@ -462,6 +483,7 @@ static int panfrost_device_runtime_suspend(struct device *dev)
>  	panfrost_gpu_power_off(pfdev);
>
>  	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
> +		clk_disable(pfdev->bus_ace_clock);
>  		clk_disable(pfdev->bus_clock);
>  		clk_disable(pfdev->clock);
>  		reset_control_assert(pfdev->rstc);
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h
> index 0f3992412205..ec55c136b1b6 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.h
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.h
> @@ -136,6 +136,7 @@ struct panfrost_device {
>  	void __iomem *iomem;
>  	struct clk *clock;
>  	struct clk *bus_clock;
> +	struct clk *bus_ace_clock;
>  	struct regulator_bulk_data *regulators;
>  	struct reset_control *rstc;
>  	/* pm_domains for devices with more than one. */
> --
> 2.43.0


Adrian Larumbe

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

* Re: [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC
  2026-03-20 16:41 ` [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC Biju
  2026-03-20 21:14   ` Adrián Larumbe
@ 2026-03-26 15:33   ` Adrián Larumbe
  1 sibling, 0 replies; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-26 15:33 UTC (permalink / raw)
  To: Biju
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Biju Das, dri-devel, linux-kernel, Geert Uytterhoeven,
	Prabhakar Mahadev Lad, linux-renesas-soc

Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>

On 20.03.2026 16:41, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> RZ/G3L SoC is embedded with Mali-G31 GPU system. Add GPU_PM_RT support as
> it needs to be assert/deassert the reset during suspend/resume.
>
> Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Collected tag
> ---
>  drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 711f5101aa04..3d0bdba2a474 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -1156,6 +1156,7 @@ static const struct of_device_id dt_match[] = {
>  	  .data = &amlogic_data, },
>  	{ .compatible = "amlogic,meson-g12a-mali",
>  	  .data = &amlogic_data, },
> +	{ .compatible = "renesas,r9a08g046-mali", .data = &default_pm_rt_data },
>  	{ .compatible = "renesas,r9a09g047-mali", .data = &default_pm_rt_data },
>  	{ .compatible = "arm,mali-t604", .data = &default_data, },
>  	{ .compatible = "arm,mali-t624", .data = &default_data, },
> --
> 2.43.0


Adrian Larumbe

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

* RE: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
  2026-03-26 11:58             ` Adrián Larumbe
@ 2026-03-26 15:36               ` Biju Das
  0 siblings, 0 replies; 19+ messages in thread
From: Biju Das @ 2026-03-26 15:36 UTC (permalink / raw)
  To: Adrián Larumbe
  Cc: Boris Brezillon, Rob Herring, Steven Price, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven, Prabhakar Mahadev Lad,
	linux-renesas-soc@vger.kernel.org

Hi Adrian,

> -----Original Message-----
> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Adrián Larumbe
> Sent: 26 March 2026 11:59
> Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM
> 
> On 26.03.2026 08:55, Biju Das wrote:
> > Hi Adrian,
> >
> > > -----Original Message-----
> > > From: Adrián Larumbe <adrian.larumbe@collabora.com>
> > > Sent: 24 March 2026 17:11
> > > Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant optional
> > > clock checks in runtime PM
> > >
> > > On 21.03.2026 14:16, Biju Das wrote:
> > > > Hi Adrián Larumbe,
> > > >
> > > > Thanks for the feedback.
> > > >
> > > > > -----Original Message-----
> > > > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On
> > > > > Behalf Of Biju Das
> > > > > Sent: 20 March 2026 21:32
> > > > > Subject: RE: [PATCH v2 2/4] drm/panfrost: Drop redundant
> > > > > optional clock checks in runtime PM
> > > > >
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On
> > > > > > Behalf Of Adrián Larumbe
> > > > > > Sent: 20 March 2026 21:20
> > > > > > Subject: Re: [PATCH v2 2/4] drm/panfrost: Drop redundant
> > > > > > optional clock checks in runtime PM
> > > > > >
> > > > > > Hi Biju,
> > > > > >
> > > > > > On 20.03.2026 16:41, Biju wrote:
> > > > > > > From: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > > >
> > > > > > > The clk_enable() and clk_disable() APIs already handle NULL
> > > > > > > clock pointers gracefully — clk_enable() returns 0 and
> > > > > > > clk_disable() returns immediately when passed a NULL or
> > > > > > > optional clock. The explicit if
> > > > > > > (pfdev->bus_clock) guards around these calls in the runtime
> > > > > > > suspend/resume paths are therefore unnecessary. Remove them to simplify the code.
> > > > > > >
> > > > > > > Reviewed-by: Steven Price <steven.price@arm.com>
> > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > > > > ---
> > > > > > > v1->v2:
> > > > > > >  * Collected tag
> > > > > > > ---
> > > > > > >  drivers/gpu/drm/panfrost/panfrost_device.c | 12
> > > > > > > ++++--------
> > > > > > >  1 file changed, 4 insertions(+), 8 deletions(-)
> > > > > > >
> > > > > > > diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > > b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > > index dedc13e56631..01e702a0b2f0 100644
> > > > > > > --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > > +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> > > > > > > @@ -429,11 +429,9 @@ static int panfrost_device_runtime_resume(struct device *dev)
> > > > > > >  		if (ret)
> > > > > > >  			goto err_clk;
> > > > > > >
> > > > > > > -		if (pfdev->bus_clock) {
> > > > > > > -			ret = clk_enable(pfdev->bus_clock);
> > > > > > > -			if (ret)
> > > > > > > -				goto err_bus_clk;
> > > > > > > -		}
> > > > > > > +		ret = clk_enable(pfdev->bus_clock);
> > > > > > > +		if (ret)
> > > > > > > +			goto err_bus_clk;
> > > > > > >  	}
> > > > > >
> > > > > > It seems clk_prepare_enable() can also deal with NULL clock
> > > > > > device pointers gracefully, so maybe you could also do away with pointer checks in
> panfrost_clk_init?
> > > > >
> > > > > This is the only check and no need to print rate for optional clk.
> > > > > That is the reason I have not touched this.
> > > > >
> > > > > 	if (pfdev->bus_clock) {
> > > > > 		rate = clk_get_rate(pfdev->bus_clock);
> > > > > 		dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate);
> > > > >
> > > > > 		err = clk_prepare_enable(pfdev->bus_clock);
> > > > > 		if (err)
> > > > > 			goto disable_clock;
> > > > > 	}
> > > >
> > > > The above block is good for optional clock.
> > > >
> > > > Otherwise, there will be 2 checks for optional clk.
> > > >
> > > > One here:
> > > >
> > > > if (pfdev->bus_clock) {
> > > > 	rate = clk_get_rate(pfdev->bus_clock);
> > > > 	dev_info(pfdev->base.dev, "bus_clock rate = %lu\n", rate); }
> > > >
> > > > and one inside the clk_prepare_enable():
> > > >
> > > > err = clk_prepare_enable(pfdev->bus_clock);
> > > >
> > > > Please let me know your thoughts.
> > >
> > > You're right, it's probably best to leave it the way it is.
> >
> > If you are happy with the series, can you please merge it?
> 
> Will do, I'll add my Rb's and let you know when it's merged.

Thank you,

Biju

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

* Re: [PATCH v2 0/4] Add RZ/G3L GFX support
  2026-03-20 16:41 [PATCH v2 0/4] Add RZ/G3L GFX support Biju
                   ` (3 preceding siblings ...)
  2026-03-20 16:41 ` [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC Biju
@ 2026-03-27  2:14 ` Adrián Larumbe
  4 siblings, 0 replies; 19+ messages in thread
From: Adrián Larumbe @ 2026-03-27  2:14 UTC (permalink / raw)
  To: Biju
  Cc: David Airlie, Simona Vetter, Steven Price, Boris Brezillon,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
	Magnus Damm, Biju Das, dri-devel, devicetree, linux-kernel,
	linux-renesas-soc, Prabhakar Mahadev Lad

Applied to drm-misc-next.

On 20.03.2026 16:41, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> The Renesas RZ/G3L SoC includes the Arm Mali-G31 GPU as a 3D Graphics
> Engine (GE3D). The Arm Mali-G31 GPU is a graphics acceleration platform
> that is based on open standards. It supports 2D graphics, 3D graphics, and
> General Purpose computing on GPU (GPGPU). Add the binding and driver
> support for suspend/resume functionality along with some improvements in
> panfrost driver.
>
> v1->v2:
>  * Dropped duplicate err assignment
>  * Changed the format string of dev_err to "%d" and simplify the dev_err()
>    line by using err rather than the same PTR_ERR().
>  * Collected tags
>
> Biju Das (4):
>   dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC
>   drm/panfrost: Drop redundant optional clock checks in runtime PM
>   drm/panfrost: Add bus_ace optional clock support for RZ/G2L
>   drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC
>
>  .../bindings/gpu/arm,mali-bifrost.yaml        |  2 ++
>  drivers/gpu/drm/panfrost/panfrost_device.c    | 34 ++++++++++++++-----
>  drivers/gpu/drm/panfrost/panfrost_device.h    |  1 +
>  drivers/gpu/drm/panfrost/panfrost_drv.c       |  1 +
>  4 files changed, 30 insertions(+), 8 deletions(-)
>
> --
> 2.43.0

Adrian Larumbe

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

end of thread, other threads:[~2026-03-27  2:15 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 16:41 [PATCH v2 0/4] Add RZ/G3L GFX support Biju
2026-03-20 16:41 ` [PATCH v2 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC Biju
2026-03-26 14:10   ` Geert Uytterhoeven
2026-03-20 16:41 ` [PATCH v2 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM Biju
2026-03-20 21:19   ` Adrián Larumbe
2026-03-20 21:32     ` Biju Das
2026-03-21 14:16       ` Biju Das
2026-03-24 17:10         ` Adrián Larumbe
2026-03-26  8:55           ` Biju Das
2026-03-26 11:58             ` Adrián Larumbe
2026-03-26 15:36               ` Biju Das
2026-03-26 15:32   ` Adrián Larumbe
2026-03-20 16:41 ` [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Biju
2026-03-20 21:15   ` Adrián Larumbe
2026-03-26 15:32   ` Adrián Larumbe
2026-03-20 16:41 ` [PATCH v2 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC Biju
2026-03-20 21:14   ` Adrián Larumbe
2026-03-26 15:33   ` Adrián Larumbe
2026-03-27  2:14 ` [PATCH v2 0/4] Add RZ/G3L GFX support Adrián Larumbe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.