[RFC] accel/rocket: DVFS on RK3588 - a hardware constraint, and some numbers

Igor Paunovic royalnet026 at gmail.com
Sat Sep 5 00:01:16 PDT 2026


Hi Jiaxing,

> Drop it. A Signed-off-by says I passed the patch along, and on your
> copy I did not.

Done for v2: 1/7 keeps your Reviewed-by and loses the Signed-off-by.

>   Tested-by: Jiaxing Hu <gahing at gahingwoo.com> # RK3576, two cores

Thank you. That is the second SoC for the fix, and the one where the
same code runs with a different core count. One request: the tag sits in
this thread rather than under the patch, so b4 will not see it when
Tomeu applies, and it drops a trailer I repost on your behalf as a
from/email mismatch. If you have a minute, a one-line reply with it on
the patch itself lets it be collected with the rest:

  https://lore.kernel.org/dri-devel/20260904125936.26234-1-royalnet026@gmail.com/

If not, I will carry it on the next revision should one be needed.

> an accel device takes the next free minor, so after two rebinds the
> NPU sat at /dev/accel/accel2

I saw the same here - the minor walked from 1 to 10 over ten unbind/bind
rounds, and only a module reload put it back to 0 - and I think it is
more than the next free minor. rocket_device_init() allocates the
drm_device with devm_drm_dev_alloc() against the module's "rknn"
platform device, so the drm_dev_put() that frees it hangs off that
device's devres, and that device is only unregistered in
rocket_unregister(). rocket_device_fini() calls drm_dev_unregister() and
nothing else. The minor's xa_erase() is a drmm action on the drm_device,
so it runs at the last drm_dev_put(), which does not come until module
exit. Every unbind therefore leaves one unregistered drm_device behind,
still holding its minor, and the reload is what finally frees them.
That is the devm leak the automated review raised on the fix; the
climbing minor is the visible half of it. It wants its own patch, not a
line in this thread - I will look at it once the series has had a first
round.

Glad the unbind path paid its hour back on your side. A bug found in
unsent work is the cheap kind.

Igor



More information about the Linux-rockchip mailing list