On Mon, Nov 23, 2026 at 05:10:39PM +0000, Norman Herms wrote: > In reply to > https://lore.kernel.org/all/[email protected]/
> For the remove hunk this is more than a cleanup: without it the GPU > clocks stay enabled after unbind. > > __device_release_driver() resumes the device and calls > pm_runtime_put_sync() before ->remove(). With the 200 ms autosuspend > set up in etnaviv_gpu_platform_probe(), that put only arms the timer, > and pm_runtime_disable() in etnaviv_gpu_platform_remove() cancels it, > so etnaviv_gpu_rpm_suspend() never runs. > > To reproduce, read clk_enable_count of the "reg", "bus" and "core" > clocks in debugfs after each "rmmod etnaviv; modprobe etnaviv" round. > On an Allwinner A733 (NPU on etnaviv with local patches) they went > 1, 2, 3 over three rounds; with this patch they stayed at 0. I have > not looked at the probe hunk. I don't doubt that there may be bugs in this driver but the patch in question is still wrong as any reference held by user space is not an issue. The driver should make sure the hardware is in a defined state at remove by explicitly resuming the device before disabling the clocks (many drivers get it wrong). Johan
