Re: [PATCH] drm/etnaviv: fix runtime PM cleanup during teardown
From: Norman Herms
Date: Tue Nov 24 2026 - 13:00:36 EST
In reply to
https://lore.kernel.org/all/awU8xkTrwuJyKJbA@xxxxxxxxxxxxxxxxxxxx/
You're right, I put that the wrong way. The clock leak is a bug of its
own in remove(), and this patch only hides it.
I tried what you describe, in etnaviv_gpu_platform_remove() after
component_del():
if (!pm_runtime_resume_and_get(&pdev->dev)) {
pm_runtime_disable(&pdev->dev);
etnaviv_gpu_clk_disable(gpu);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);
} else {
pm_runtime_disable(&pdev->dev);
}
pm_runtime_dont_use_autosuspend(&pdev->dev);
Same board and test as before (7.3.6 with local patches, rmmod and
insmod of etnaviv, clk_enable_count of the reg, bus and core clocks
after each rmmod): without a change the three counts go up by one per
round, with this they stay unchanged over three rounds.
I left out etnaviv_gpu_hw_suspend(): the component unbind has already
freed the command buffer, and the resume only brings the GPU to
INITIALIZED, so it would do nothing there.
I won't send a patch for this myself, but I can test one.
Norman