From: Igor Paunovic <royalnet026@gmail.com>
To: Jiaxing Hu <gahing@gahingwoo.com>
Cc: Igor Paunovic <royalnet026@gmail.com>,
linux-rockchip@lists.infradead.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core
Date: Wed, 9 Sep 2026 14:48:04 +0200 [thread overview]
Message-ID: <20260909124806.14525-1-royalnet026@gmail.com> (raw)
In-Reply-To: <20260903112208.952061-1-gahing@gahingwoo.com>
Hi Jiaxing,
I finally ran reserved0-build.py. Three things back, one of them a bug
in the script.
First, it works: pointed at your geom corpus it produces the full
report, 415 lines, no warnings. Thank you for writing it in a way that
runs anywhere - only numpy, and the parts that need your files skip
themselves cleanly.
Second, the bug. Point it one directory higher, at a corpus that also
contains files outside the geometry set, and it dies:
File "reserved0-build.py", line 431, in dump
% (o["off"], o["v"], o["RESERVED_0"],
KeyError: 'v'
The cause is small and I think you will spot it faster than I can
describe it. read_ops() gives an undecoded dispatch a short dict -
dict(off=off, undecoded=True), no "v", no "RESERVED_0". Everywhere else
you are careful about that: the good/bad split, the row groups, the
per-file value sets, and the "mixed" comprehension itself all filter on
"if not o['undecoded']". dump() is the one place that walks f["ops"]
straight through, so the first undecoded dispatch in a dumped file
raises.
It needs a corpus where a file has both more than one RESERVED_0 and at
least one undecoded dispatch. In mine that is exactly one file out of
thirteen: chain, with 2 undecoded dispatches out of 26. It lands in
"others", so dump(others[0]) hits it. Skipping undecoded ops in dump(),
or printing them as a short "undecoded" line, is all it takes.
Third, the corpus I owe you. I have not collected it yet, and I do not
want to give you a date I am not sure of. To be precise about where it
stands: every .rknn on this disk is still yours - 103 files, and all
103 declare the same build string, 2.3.2 (@2025-04-03T08:26:16). So the
axis I offered to test, whether 34/66 <-> 0x4044 survives a different
toolkit version, is still untested. It is on my list, behind the DVFS
series review.
One more thing, unrelated to the script, from your earlier mail: the
/dev/accel/accel2 you saw after two rebind cycles is the same thing I
hit on RK3588, where the minor walked 1 -> 10 over ten cycles and only
rmmod reset it. I traced it in the source afterwards: rocket_device_init()
allocates the DRM device with devm on the shared rknn platform device,
which is only unregistered at module removal, so each unbind leaves a
drm_device alive holding its minor.
You do not need a new patch for it - it is already written and waiting:
[PATCH v2 1/2] accel/rocket: release the shared device's devres on teardown
https://lore.kernel.org/all/20260731064933.12548-2-royalnet026@gmail.com/
That series has your Reviewed-by on 2/2 already. If you rebind on RK3576
often, that patch is worth carrying locally in the meantime.
Thanks again for the script.
Igor
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Igor Paunovic <royalnet026@gmail.com>
To: Jiaxing Hu <gahing@gahingwoo.com>
Cc: Igor Paunovic <royalnet026@gmail.com>,
linux-rockchip@lists.infradead.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core
Date: Wed, 9 Sep 2026 14:48:04 +0200 [thread overview]
Message-ID: <20260909124806.14525-1-royalnet026@gmail.com> (raw)
In-Reply-To: <20260903112208.952061-1-gahing@gahingwoo.com>
Hi Jiaxing,
I finally ran reserved0-build.py. Three things back, one of them a bug
in the script.
First, it works: pointed at your geom corpus it produces the full
report, 415 lines, no warnings. Thank you for writing it in a way that
runs anywhere - only numpy, and the parts that need your files skip
themselves cleanly.
Second, the bug. Point it one directory higher, at a corpus that also
contains files outside the geometry set, and it dies:
File "reserved0-build.py", line 431, in dump
% (o["off"], o["v"], o["RESERVED_0"],
KeyError: 'v'
The cause is small and I think you will spot it faster than I can
describe it. read_ops() gives an undecoded dispatch a short dict -
dict(off=off, undecoded=True), no "v", no "RESERVED_0". Everywhere else
you are careful about that: the good/bad split, the row groups, the
per-file value sets, and the "mixed" comprehension itself all filter on
"if not o['undecoded']". dump() is the one place that walks f["ops"]
straight through, so the first undecoded dispatch in a dumped file
raises.
It needs a corpus where a file has both more than one RESERVED_0 and at
least one undecoded dispatch. In mine that is exactly one file out of
thirteen: chain, with 2 undecoded dispatches out of 26. It lands in
"others", so dump(others[0]) hits it. Skipping undecoded ops in dump(),
or printing them as a short "undecoded" line, is all it takes.
Third, the corpus I owe you. I have not collected it yet, and I do not
want to give you a date I am not sure of. To be precise about where it
stands: every .rknn on this disk is still yours - 103 files, and all
103 declare the same build string, 2.3.2 (@2025-04-03T08:26:16). So the
axis I offered to test, whether 34/66 <-> 0x4044 survives a different
toolkit version, is still untested. It is on my list, behind the DVFS
series review.
One more thing, unrelated to the script, from your earlier mail: the
/dev/accel/accel2 you saw after two rebind cycles is the same thing I
hit on RK3588, where the minor walked 1 -> 10 over ten cycles and only
rmmod reset it. I traced it in the source afterwards: rocket_device_init()
allocates the DRM device with devm on the shared rknn platform device,
which is only unregistered at module removal, so each unbind leaves a
drm_device alive holding its minor.
You do not need a new patch for it - it is already written and waiting:
[PATCH v2 1/2] accel/rocket: release the shared device's devres on teardown
https://lore.kernel.org/all/20260731064933.12548-2-royalnet026@gmail.com/
That series has your Reviewed-by on 2/2 already. If you rebind on RK3576
often, that patch is worth carrying locally in the meantime.
Thanks again for the script.
Igor
next prev parent reply other threads:[~2026-09-09 12:48 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 11:08 [PATCH v9 00/13] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 11:08 ` [PATCH v9 01/13] accel/rocket: take the completion register writes under job_lock Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 11:08 ` [PATCH v9 02/13] accel/rocket: wait for a running IRQ handler before resetting a core Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-25 12:31 ` Igor Paunovic
2026-08-25 12:31 ` Igor Paunovic
2026-08-25 12:45 ` Igor Paunovic
2026-08-25 12:45 ` Igor Paunovic
2026-08-24 11:08 ` [PATCH v9 03/13] accel/rocket: let the core suspend after a reset Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-25 12:32 ` Igor Paunovic
2026-08-25 12:32 ` Igor Paunovic
2026-08-25 12:45 ` Igor Paunovic
2026-08-25 12:45 ` Igor Paunovic
2026-08-24 11:08 ` [PATCH v9 04/13] accel/rocket: factor the completion tail out of the IRQ handler Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 11:08 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 11:08 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core Jiaxing Hu
2026-08-25 12:32 ` Igor Paunovic
2026-08-25 12:32 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Igor Paunovic
2026-08-25 12:32 ` Igor Paunovic
2026-08-27 1:49 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core Jiaxing Hu
2026-08-27 1:49 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-08-27 17:48 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core Igor Paunovic
2026-08-27 17:48 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Igor Paunovic
2026-08-31 4:07 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core Jiaxing Hu
2026-08-31 4:07 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-09-02 10:01 ` Igor Paunovic
2026-09-02 10:01 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core Igor Paunovic
2026-09-03 11:22 ` Jiaxing Hu
2026-09-03 11:22 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-09-09 12:48 ` Igor Paunovic [this message]
2026-09-09 12:48 ` [PATCH v9 05/13] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core Igor Paunovic
2026-08-24 11:08 ` [PATCH v9 06/13] dt-bindings: power: rockchip: allow resets in a power domain node Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 16:24 ` Conor Dooley
2026-08-24 16:24 ` Conor Dooley
2026-08-24 11:08 ` [PATCH v9 07/13] dt-bindings: iommu: rockchip: describe the RK3576 NPU MMU Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 16:25 ` Conor Dooley
2026-08-24 16:25 ` Conor Dooley
2026-08-24 11:08 ` [PATCH v9 08/13] pmdomain/rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 11:31 ` Abel Vesa
2026-08-24 11:31 ` Abel Vesa
2026-08-24 11:08 ` [PATCH v9 09/13] pmdomain/rockchip: cycle optional power-domain resets on power-on Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 11:30 ` Abel Vesa
2026-08-24 11:30 ` Abel Vesa
2026-08-24 11:08 ` [PATCH v9 10/13] accel/rocket: select the per-core clock and reset counts from match data Jiaxing Hu
2026-08-24 11:08 ` Jiaxing Hu
2026-08-24 11:09 ` [PATCH v9 11/13] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-08-24 11:09 ` Jiaxing Hu
2026-08-24 11:09 ` [PATCH v9 12/13] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes Jiaxing Hu
2026-08-24 11:09 ` Jiaxing Hu
2026-08-24 11:09 ` [PATCH v9 13/13] arm64: dts: rockchip: rk3576-rock-4d: enable NPU Jiaxing Hu
2026-08-24 11:09 ` Jiaxing Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260909124806.14525-1-royalnet026@gmail.com \
--to=royalnet026@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gahing@gahingwoo.com \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.