On Sat Mar 28 15:14:51 2026 +0000, David Carlier wrote:
> The Mali C55 driver doesn't depend on PM. For this reason, if pm_runtime
> is not compiled in it is required to manually power-off the peripheral
> during the driver's remove() handler.
>
> Also pm_runtime_enable() is called during probe but mali_c55_remove()
> never calls pm_runtime_disable(), leaving the device's runtime PM state
> enabled after the driver is unbound.
>
> Manually power-off the peripheral in remove() if the peripheral has not
> been suspended using runtime_pm and disable runtime pm.
>
> Cc: [email protected]
> Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
> Signed-off-by: David Carlier <[email protected]>
> Reviewed-by: Jacopo Mondi <[email protected]>
> Signed-off-by: Jacopo Mondi <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/platform/arm/mali-c55/mali-c55-core.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
index 305b8cbb9d1c..00aed62c63d9 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
@@ -858,6 +858,11 @@ static void mali_c55_remove(struct platform_device *pdev)
struct mali_c55 *mali_c55 = platform_get_drvdata(pdev);
mali_c55_media_frameworks_deinit(mali_c55);
+ if (!pm_runtime_suspended(&pdev->dev)) {
+ __mali_c55_power_off(mali_c55);
+ pm_runtime_set_suspended(&pdev->dev);
+ }
+ pm_runtime_disable(&pdev->dev);
kfree(mali_c55->context.registers);
of_reserved_mem_device_release(&pdev->dev);
}
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]