Re: [PATCH v1 2/2] drm/sched: limit sched score update to jobs change

2025-09-05 Thread Tomeu Vizoso
;t > *think* it would be affected though. It would still pick the least > loaded (based on active jobs) scheduler at job submit time. Unless there > is some hidden behaviour in that driver where it would be important to > consider number of entities too. Anyway, it would be good for rocket > driver to double-check and ack. Hello, thanks for pinging. I think it should be fine for Rocket. Acked-by: Tomeu Vizoso Regards, Tomeu

Re: [PATCH] accel/rocket: Fix usages of kfree() and sizeof()

2025-09-03 Thread Tomeu Vizoso
On Wed, Aug 13, 2025 at 6:02 PM Brigham Campbell wrote: > > Replace usages of kfree() with kvfree() for pointers which were > allocated using kvmalloc(), as required by the kernel memory management > API. > > Use sizeof() on the type that a pointer references instead of the > pointer itself. In t

Re: [PATCH 0/2] Rocket Kconfig fixes

2025-09-02 Thread Tomeu Vizoso
Thanks, Heiko, I have applied them to drm-misc-next. Regards, Tomeu On Thu, Aug 14, 2025 at 1:35 PM Heiko Stuebner wrote: > > More common indentation and depending on the actual accel framework. > > Heiko Stuebner (2): > accel/rocket: Fix indentation of Kconfig entry > accel/rocket: Depend

Re: [PATCH] accel/rocket: Check the correct DMA irq status to warn about

2025-09-01 Thread Tomeu Vizoso
On Mon, Aug 18, 2025 at 8:56 PM Heiko Stuebner wrote: > > Right now, the code checks the DMA_READ_ERROR state 2 times, while > I guess it was supposed to warn about both read and write errors. > > Change the 2nd check to look at the write-error flag. > > Fixes: 0810d5ad88a1 ("accel/rocket: Add job

Re: [PATCH] MAINTAINERS: adjust file entry in DRM ACCEL DRIVER FOR ROCKCHIP NPU

2025-09-01 Thread Tomeu Vizoso
Thanks, Lukas, I have applied it to drm-misc-next. Regards, Tomeu On Tue, Aug 26, 2025 at 8:32 AM Lukas Bulwahn wrote: > > From: Lukas Bulwahn > > Commit a7352c849492 ("dt-bindings: npu: rockchip,rknn: Add bindings") adds > the device-tree binding rockchip,rk3588-rknn-core.yaml, whereas the co

Re: [PATCH next] accel/rocket: Fix some error checking in rocket_core_init()

2025-09-01 Thread Tomeu Vizoso
On Thu, Aug 21, 2025 at 2:30 PM Dan Carpenter wrote: > > The problem is that pm_runtime_get_sync() can return 1 on success so > checking for zero doesn't work. Use the pm_runtime_resume_and_get() > function instead. The pm_runtime_resume_and_get() function does > additional cleanup as well so th

Re: [PATCH 0/2] accel/rocket: Fix build errors and sparse warning

2025-08-03 Thread Tomeu Vizoso
Hi Brigham, thanks for the fixes. Will pick them up. Hope you don't mind if I change the subject of the first patch to something a bit more specific, such as: accel/rocket: Adapt to changes in drm/sched API Regards, Tomeu On Sat, Aug 2, 2025 at 9:25 PM Brigham Campbell wrote: > > Fix two bui

[PATCH v9 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B

2025-07-21 Thread Tomeu Vizoso
d-off-by: Nicolas Frattaroli Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi | 57 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi b/arch/arm64/boot/dts/rockchip/r

[PATCH v9 08/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588-base

2025-07-21 Thread Tomeu Vizoso
in the DT bindings (Nicolas Frattaroli) v4: - Adapt to changes in bindings v6: - pclk and npu clocks are needed by all clocks (Rob Herring) v8: - Remove notion of top core (Robin Murphy) Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base

[PATCH v9 09/10] arm64: dts: rockchip: Enable the NPU on quartzpro64

2025-07-21 Thread Tomeu Vizoso
Enable the nodes added in a previous commit to the rk3588s device tree. v2: - Split nodes (Sebastian Reichel) - Sort nodes (Sebastian Reichel) - Add board regulators (Sebastian Reichel) v8: - Remove notion of top core (Robin Murphy) Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso

[PATCH v9 07/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains

2025-07-21 Thread Tomeu Vizoso
be on, add a label to the NPU power domain node so board files can reference it. Signed-off-by: Nicolas Frattaroli Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64

[PATCH v9 05/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-07-21 Thread Tomeu Vizoso
directions (Robin Murphy) Reviewed-by: Jeff Hugo Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/rocket_drv.c | 2 ++ drivers/accel/rocket/rocket_gem.c | 56 +++ drivers/accel/rocket/rocket_gem.h | 4 +++ include/uapi/drm/rock

[PATCH v9 06/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-07-21 Thread Tomeu Vizoso
: Krzysztof Kozlowski Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- .../bindings/npu/rockchip,rk3588-rknn-core.yaml| 112 + 1 file changed, 112 insertions(+) diff --git a/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml b/Documentation/devicetree

[PATCH v9 04/10] accel/rocket: Add job submission IOCTL

2025-07-21 Thread Tomeu Vizoso
the IOMMU (Robin Murphy) - Specify the size of the embedded structs in the IOCTLs for future extensibility (Rob Herring) - Expose only 32 bits for the address of the regcmd BO (Robin Murphy) Tested-by: Heiko Stuebner Reviewed-by: Jeff Hugo Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket

[PATCH v9 03/10] accel/rocket: Add IOCTL for BO creation

2025-07-21 Thread Tomeu Vizoso
dma_sync_sgtable_for_device (Robin Murphy) Reviewed-by: Jeffrey Hugo Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile | 3 +- drivers/accel/rocket/rocket_drv.c | 15 - drivers/accel/rocket/rocket_drv.h | 4 ++ drivers/accel/rocket/rocket_gem.c

[PATCH v9 02/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-07-21 Thread Tomeu Vizoso
Heiko Stuebner Reviewed-by: Jeff Hugo Signed-off-by: Tomeu Vizoso --- Documentation/accel/index.rst| 1 + Documentation/accel/rocket/index.rst | 19 +++ MAINTAINERS | 10 ++ drivers/accel/Kconfig| 1 + drivers/accel/Makefile

[PATCH v9 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-07-21 Thread Tomeu Vizoso
/mesa/mesa/-/merge_requests/29698 Signed-off-by: Tomeu Vizoso --- Changes in v9: - Rename the DT reference for the IOMMU for core 0 - Link to v8: https://lore.kernel.org/r/20250713-6-10-rocket-v8-0-64fa3115e...@tomeuvizoso.net Changes in v8: - Kconfig improvements - Removed notion of top core

[PATCH v8 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B

2025-07-13 Thread Tomeu Vizoso
d-off-by: Nicolas Frattaroli Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi | 57 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi b/arch/arm64/boot/dts/rockchip/r

[PATCH v8 07/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains

2025-07-13 Thread Tomeu Vizoso
be on, add a label to the NPU power domain node so board files can reference it. Signed-off-by: Nicolas Frattaroli Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64

[PATCH v8 09/10] arm64: dts: rockchip: Enable the NPU on quartzpro64

2025-07-13 Thread Tomeu Vizoso
Enable the nodes added in a previous commit to the rk3588s device tree. v2: - Split nodes (Sebastian Reichel) - Sort nodes (Sebastian Reichel) - Add board regulators (Sebastian Reichel) v8: - Remove notion of top core (Robin Murphy) Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso

[PATCH v8 08/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588-base

2025-07-13 Thread Tomeu Vizoso
in the DT bindings (Nicolas Frattaroli) v4: - Adapt to changes in bindings v6: - pclk and npu clocks are needed by all clocks (Rob Herring) v8: - Remove notion of top core (Robin Murphy) Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base

[PATCH v8 06/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-07-13 Thread Tomeu Vizoso
: Krzysztof Kozlowski Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- .../bindings/npu/rockchip,rk3588-rknn-core.yaml| 112 + 1 file changed, 112 insertions(+) diff --git a/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml b/Documentation/devicetree

[PATCH v8 04/10] accel/rocket: Add job submission IOCTL

2025-07-13 Thread Tomeu Vizoso
the IOMMU (Robin Murphy) - Specify the size of the embedded structs in the IOCTLs for future extensibility (Rob Herring) - Expose only 32 bits for the address of the regcmd BO (Robin Murphy) Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3

[PATCH v8 05/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-07-13 Thread Tomeu Vizoso
directions (Robin Murphy) Reviewed-by: Jeff Hugo Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/rocket_drv.c | 2 ++ drivers/accel/rocket/rocket_gem.c | 56 +++ drivers/accel/rocket/rocket_gem.h | 4 +++ include/uapi/drm/rock

[PATCH v8 02/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-07-13 Thread Tomeu Vizoso
Heiko Stuebner Signed-off-by: Tomeu Vizoso --- Documentation/accel/index.rst| 1 + Documentation/accel/rocket/index.rst | 19 +++ MAINTAINERS | 10 ++ drivers/accel/Kconfig| 1 + drivers/accel/Makefile | 1 + drivers/accel/r

[PATCH v8 03/10] accel/rocket: Add IOCTL for BO creation

2025-07-13 Thread Tomeu Vizoso
dma_sync_sgtable_for_device (Robin Murphy) Reviewed-by: Jeffrey Hugo Tested-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile | 3 +- drivers/accel/rocket/rocket_drv.c | 15 - drivers/accel/rocket/rocket_drv.h | 4 ++ drivers/accel/rocket/rocket_gem.c

[PATCH v8 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-07-13 Thread Tomeu Vizoso
/mesa/mesa/-/merge_requests/29698 Signed-off-by: Tomeu Vizoso --- Changes in v8: - Kconfig improvements - Removed notion of top core, all cores are equivalent now - Explicitly allocate DMA addresses - Sync BOs always in both directions - UAPI improvements - Simplified job scheduling - Misc. style

Re: [PATCH v7 02/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-07-12 Thread Tomeu Vizoso
On Fri, Jul 11, 2025 at 7:38 PM Andrew Davis wrote: > > On 6/6/25 1:28 AM, Tomeu Vizoso wrote: > > This initial version supports the NPU as shipped in the RK3588 SoC and > > described in the first part of its TRM, in Chapter 36. > > > > This NPU contains 3 indepen

Re: [PATCH v7 04/10] accel/rocket: Add job submission IOCTL

2025-07-11 Thread Tomeu Vizoso
On Fri, Jul 11, 2025 at 6:40 PM Robin Murphy wrote: > > On 11/07/2025 5:00 pm, Tomeu Vizoso wrote: > > On Tue, Jun 24, 2025 at 3:50 PM Robin Murphy wrote: > >> > >> On 2025-06-06 7:28 am, Tomeu Vizoso wrote: > >> [...] > >>> diff --git a/dr

Re: [PATCH v7 06/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-07-11 Thread Tomeu Vizoso
On Tue, Jun 24, 2025 at 3:27 PM Robin Murphy wrote: > > On 2025-06-06 7:28 am, Tomeu Vizoso wrote: > > Add the bindings for the Neural Processing Unit IP from Rockchip. > > > > v2: > > - Adapt to new node structure (one node per core, each with its own > >I

Re: [PATCH v7 04/10] accel/rocket: Add job submission IOCTL

2025-07-11 Thread Tomeu Vizoso
On Tue, Jun 24, 2025 at 3:50 PM Robin Murphy wrote: > > On 2025-06-06 7:28 am, Tomeu Vizoso wrote: > [...] > > diff --git a/drivers/accel/rocket/rocket_device.h > > b/drivers/accel/rocket/rocket_device.h > > index > > 10acfe8

Re: [PATCH v7 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-06-23 Thread Tomeu Vizoso
On Fri, Jun 20, 2025 at 11:28 AM Heiko Stuebner wrote: > > Am Freitag, 6. Juni 2025, 08:28:20 Mitteleuropäische Sommerzeit schrieb Tomeu > Vizoso: > > This series adds a new driver for the NPU that Rockchip includes in its > > newer SoCs, developed by them on the NVDLA

[PATCH v7 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-06-05 Thread Tomeu Vizoso
/mesa/mesa/-/merge_requests/29698 Signed-off-by: Tomeu Vizoso --- Changes in v7: - Actually enable process isolation by allocating its own IOMMU domain to each DRM client. - Link to v6: https://lore.kernel.org/r/20250604-6-10-rocket-v6-0-237ac75dd...@tomeuvizoso.net Changes in v6: - Make all

[PATCH v7 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B

2025-06-05 Thread Tomeu Vizoso
From: Nicolas Frattaroli The NPU on the ROCK5B uses the same regulator for both the sram-supply and the npu's supply. Add this regulator, and enable all the NPU bits. Also add the regulator as a domain-supply to the pd_npu power domain. Signed-off-by: Nicolas Frattaroli Signed-off-by:

[PATCH v7 09/10] arm64: dts: rockchip: Enable the NPU on quartzpro64

2025-06-05 Thread Tomeu Vizoso
Enable the nodes added in a previous commit to the rk3588s device tree. v2: - Split nodes (Sebastian Reichel) - Sort nodes (Sebastian Reichel) - Add board regulators (Sebastian Reichel) Signed-off-by: Tomeu Vizoso --- .../arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 30

[PATCH v7 04/10] accel/rocket: Add job submission IOCTL

2025-06-05 Thread Tomeu Vizoso
isolation (Daniel Stone and Robin Murphy) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3 +- drivers/accel/rocket/rocket_core.c | 10 + drivers/accel/rocket/rocket_core.h | 14 + drivers/accel/rocket/rocket_device.c | 2 + drivers/accel/rocket/rocket_device.h | 2

[PATCH v7 08/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588-base

2025-06-05 Thread Tomeu Vizoso
in the DT bindings (Nicolas Frattaroli) v4: - Adapt to changes in bindings v6: - pclk and npu clocks are needed by all clocks (Rob Herring) Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 87 +++ 1 file changed, 87 insertions(+) diff --

[PATCH v7 07/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains

2025-06-05 Thread Tomeu Vizoso
be on, add a label to the NPU power domain node so board files can reference it. Signed-off-by: Nicolas Frattaroli Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/r

[PATCH v7 06/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-06-05 Thread Tomeu Vizoso
incidentally related (Kever Yang) - Mark pclk and npu clocks as required by all clocks (Rob Herring) v7: - Remove allOf section, not needed now that all nodes require 4 clocks (Heiko Stübner) Signed-off-by: Sebastian Reichel Signed-off-by: Tomeu Vizoso Reviewed-by: Krzysztof Kozlowski

[PATCH v7 02/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-06-05 Thread Tomeu Vizoso
ad of GFP_ZERO (Jeff Hugo) - Explicitly include linux/container_of.h (Jeff Hugo) - pclk and npu clocks are now needed by all cores (Rob Herring) v7: - Assign its own IOMMU domain to each client, for isolation (Daniel Stone and Robin Murphy) Signed-off-by: Tomeu Vizoso --- Documentation/accel/inde

[PATCH v7 05/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-06-05 Thread Tomeu Vizoso
same IOCTLs from the Etnaviv driver. v2: - Don't break UABI by reordering the IOCTL IDs (Jeff Hugo) v3: - Check that padding fields in IOCTLs are zero (Jeff Hugo) v6: - Fix conversion logic to make sure we use DMA_BIDIRECTIONAL when needed (Lucas Stach) Signed-off-by: Tomeu Vizoso Reviewe

[PATCH v7 03/10] accel/rocket: Add IOCTL for BO creation

2025-06-05 Thread Tomeu Vizoso
(Markus Elfring) v7: - Assign its own IOMMU domain to each client, for isolation (Daniel Stone and Robin Murphy) Reviewed-by: Jeffrey Hugo Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3 +- drivers/accel/rocket/rocket_device.c | 4 ++ drivers/accel/rocket

Re: [PATCH v6 06/10] accel/rocket: Add IOCTL for BO creation

2025-06-05 Thread Tomeu Vizoso
On Thu, Jun 5, 2025 at 3:37 PM Robin Murphy wrote: > > On 05/06/2025 8:41 am, Tomeu Vizoso wrote: > [...] > >> In fact this is precisely the usage model I would suggest for this sort > >> of thing, and IIRC I had a similar conversation with the Ethos driver > >

Re: [PATCH v6 06/10] accel/rocket: Add IOCTL for BO creation

2025-06-05 Thread Tomeu Vizoso
On Thu, Jun 5, 2025 at 2:29 PM Daniel Stone wrote: > > Hey, > > On Thu, 5 Jun 2025 at 08:41, Tomeu Vizoso wrote: > > > Indeed if you're using the IOMMU API directly then you need to do your > > > own address space management either way, so matching bits of proc

Re: [PATCH v6 06/10] accel/rocket: Add IOCTL for BO creation

2025-06-05 Thread Tomeu Vizoso
On Wed, Jun 4, 2025 at 7:03 PM Robin Murphy wrote: > > On 2025-06-04 5:18 pm, Daniel Stone wrote: > > Hi Tomeu, > > I have some bad news ... > > > > On Wed, 4 Jun 2025 at 08:57, Tomeu Vizoso wrote: > >> +int rocket_ioctl_create_bo(struct drm_device *dev,

[PATCH v6 07/10] accel/rocket: Add job submission IOCTL

2025-06-04 Thread Tomeu Vizoso
macros (Thomas Zimmermann) - Add padding to ioctls and check for zero (Jeff Hugo) - Improve error handling (Nicolas Frattaroli) v6: - Use mutexes guard (Markus Elfring) - Use u64_to_user_ptr (Jeff Hugo) - Drop rocket_fence (Rob Herring) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket

[PATCH v6 02/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588-base

2025-06-04 Thread Tomeu Vizoso
rockchip,iommu compatible to IOMMU nodes (Sebastian Reichel) v3: - Adapt to a split of the register block in the DT bindings (Nicolas Frattaroli) v4: - Adapt to changes in bindings v6: - pclk and npu clocks are needed by all clocks (Rob Herring) Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/

Re: [PATCH v6 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-06-04 Thread Tomeu Vizoso
On Wed, Jun 4, 2025 at 10:25 AM Heiko Stübner wrote: > > Am Mittwoch, 4. Juni 2025, 09:57:14 Mitteleuropäische Sommerzeit schrieb > Tomeu Vizoso: > > Add the bindings for the Neural Processing Unit IP from Rockchip. > > > > v2: > > - Adapt to new node structure

[PATCH v6 06/10] accel/rocket: Add IOCTL for BO creation

2025-06-04 Thread Tomeu Vizoso
(Markus Elfring) Reviewed-by: Jeffrey Hugo Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3 +- drivers/accel/rocket/rocket_device.c | 4 ++ drivers/accel/rocket/rocket_device.h | 2 + drivers/accel/rocket/rocket_drv.c| 7 +- drivers/accel/rocket/rocket_gem.c

Re: [PATCH v5 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-06-04 Thread Tomeu Vizoso
On Wed, May 28, 2025 at 3:41 PM Rob Herring wrote: > > On Tue, May 20, 2025 at 5:27 AM Tomeu Vizoso wrote: > > > > Add the bindings for the Neural Processing Unit IP from Rockchip. > > > > v2: > > - Adapt to new node structure (one node per core, each with its

[PATCH v6 08/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-06-04 Thread Tomeu Vizoso
same IOCTLs from the Etnaviv driver. v2: - Don't break UABI by reordering the IOCTL IDs (Jeff Hugo) v3: - Check that padding fields in IOCTLs are zero (Jeff Hugo) v6: - Fix conversion logic to make sure we use DMA_BIDIRECTIONAL when needed (Lucas Stach) Signed-off-by: Tomeu Vizoso Reviewe

[PATCH v6 05/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-06-04 Thread Tomeu Vizoso
ad of GFP_ZERO (Jeff Hugo) - Explicitly include linux/container_of.h (Jeff Hugo) - pclk and npu clocks are now needed by all cores (Rob Herring) Signed-off-by: Tomeu Vizoso --- Documentation/accel/index.rst| 1 + Documentation/accel/rocket/index.rst | 19 +++ MAINTA

[PATCH v6 03/10] arm64: dts: rockchip: Enable the NPU on quartzpro64

2025-06-04 Thread Tomeu Vizoso
Enable the nodes added in a previous commit to the rk3588s device tree. v2: - Split nodes (Sebastian Reichel) - Sort nodes (Sebastian Reichel) - Add board regulators (Sebastian Reichel) Signed-off-by: Tomeu Vizoso --- .../arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 30

[PATCH v6 09/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains

2025-06-04 Thread Tomeu Vizoso
be on, add a label to the NPU power domain node so board files can reference it. Signed-off-by: Nicolas Frattaroli Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/r

[PATCH v6 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B

2025-06-04 Thread Tomeu Vizoso
From: Nicolas Frattaroli The NPU on the ROCK5B uses the same regulator for both the sram-supply and the npu's supply. Add this regulator, and enable all the NPU bits. Also add the regulator as a domain-supply to the pd_npu power domain. Signed-off-by: Nicolas Frattaroli Signed-off-by:

[PATCH v6 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-06-04 Thread Tomeu Vizoso
incidentally related (Kever Yang) - Mark pclk and npu clocks as required by all clocks (Rob Herring) Signed-off-by: Sebastian Reichel Signed-off-by: Tomeu Vizoso Reviewed-by: Krzysztof Kozlowski --- .../bindings/npu/rockchip,rk3588-rknn-core.yaml| 144 + 1 file changed

[PATCH v6 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-06-04 Thread Tomeu Vizoso
/mesa/mesa/-/merge_requests/29698 Signed-off-by: Tomeu Vizoso --- Changes in v6: - Make all cores depend on pclk and npu clocks - Fix BO sync direction logic - Misc. cleanups - Link to v5: https://lore.kernel.org/r/20250520-6-10-rocket-v5-0-18c9ca0fc...@tomeuvizoso.net Changes in v5: - Use bulk

Re: [PATCH v5 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-06-04 Thread Tomeu Vizoso
On Wed, May 28, 2025 at 5:34 PM Tomeu Vizoso wrote: > > On Wed, May 28, 2025 at 3:41 PM Rob Herring wrote: > > > > On Tue, May 20, 2025 at 5:27 AM Tomeu Vizoso wrote: > > > > > > Add the bindings for the Neural Processing Unit IP from Rockchip. >

Re: [PATCH v5 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-06-02 Thread Tomeu Vizoso
Hi Rob, [adding Kever to CC] On Wed, May 28, 2025 at 3:41 PM Rob Herring wrote: > > On Tue, May 20, 2025 at 5:27 AM Tomeu Vizoso wrote: > > > > Add the bindings for the Neural Processing Unit IP from Rockchip. > > > > v2: > > - Adapt to new node structure (

Re: [PATCH v4 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-05-31 Thread Tomeu Vizoso
On Fri, May 30, 2025 at 8:50 PM Jagan Teki wrote: > > On Mon, 19 May 2025 at 19:14, Tomeu Vizoso wrote: > > > > This series adds a new driver for the NPU that Rockchip includes in its > > newer SoCs, developed by them on the NVDLA base. > > > > In its curren

Re: [PATCH v5 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-28 Thread Tomeu Vizoso
On Wed, May 28, 2025 at 3:41 PM Rob Herring wrote: > > On Tue, May 20, 2025 at 5:27 AM Tomeu Vizoso wrote: > > > > Add the bindings for the Neural Processing Unit IP from Rockchip. > > > > v2: > > - Adapt to new node structure (one node per core, each with its

[PATCH v5 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-20 Thread Tomeu Vizoso
://devicetree.org/schemas/npu/rockchip,rk3588-rknn-core.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Neural Processing Unit IP from Rockchip + +maintainers: + - Tomeu Vizoso + +description: + Rockchip IP for accelerating inference of neural networks, based on NVIDIA's + open s

[PATCH v5 06/10] accel/rocket: Add IOCTL for BO creation

2025-05-20 Thread Tomeu Vizoso
Hugo Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3 +- drivers/accel/rocket/rocket_device.c | 4 ++ drivers/accel/rocket/rocket_device.h | 2 + drivers/accel/rocket/rocket_drv.c| 7 +- drivers/accel/rocket/rocket_gem.c| 131

[PATCH v5 08/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-05-20 Thread Tomeu Vizoso
same IOCTLs from the Etnaviv driver. v2: - Don't break UABI by reordering the IOCTL IDs (Jeff Hugo) v3: - Check that padding fields in IOCTLs are zero (Jeff Hugo) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/rocket_drv.c | 2 + drivers/accel/rocket/rocket_

[PATCH v5 03/10] arm64: dts: rockchip: Enable the NPU on quartzpro64

2025-05-20 Thread Tomeu Vizoso
Enable the nodes added in a previous commit to the rk3588s device tree. v2: - Split nodes (Sebastian Reichel) - Sort nodes (Sebastian Reichel) - Add board regulators (Sebastian Reichel) Signed-off-by: Tomeu Vizoso --- .../arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 30

[PATCH v5 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-05-20 Thread Tomeu Vizoso
/mesa/mesa/-/merge_requests/29698 Signed-off-by: Tomeu Vizoso --- Changes in v5: - Use bulk clk API - Rename bindings file - Syntax improvement to bindings - Link to v4: https://lore.kernel.org/r/20250519-6-10-rocket-v4-0-d6dff6b4c...@tomeuvizoso.net Changes in v4: - Several fixes to DT bindings

[PATCH v5 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B

2025-05-20 Thread Tomeu Vizoso
From: Nicolas Frattaroli The NPU on the ROCK5B uses the same regulator for both the sram-supply and the npu's supply. Add this regulator, and enable all the NPU bits. Also add the regulator as a domain-supply to the pd_npu power domain. Signed-off-by: Nicolas Frattaroli Signed-off-by:

[PATCH v5 09/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains

2025-05-20 Thread Tomeu Vizoso
be on, add a label to the NPU power domain node so board files can reference it. Signed-off-by: Nicolas Frattaroli Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/r

[PATCH v5 07/10] accel/rocket: Add job submission IOCTL

2025-05-20 Thread Tomeu Vizoso
macros (Thomas Zimmermann) - Add padding to ioctls and check for zero (Jeff Hugo) - Improve error handling (Nicolas Frattaroli) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3 +- drivers/accel/rocket/rocket_core.c | 14 +- drivers/accel/rocket/rocket_core.h | 14

[PATCH v5 05/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-05-20 Thread Tomeu Vizoso
anups (Thomas Zimmermann and Jeff Hugo) - Make use of GPL-2.0-only for the copyright notice (Jeff Hugo) - PM improvements (Nicolas Frattaroli) v4: - Use bulk clk API (Krzysztof Kozlowski) Signed-off-by: Tomeu Vizoso --- Documentation/accel/index.rst| 1 + Documentation/accel/rocket/inde

[PATCH v5 02/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588s

2025-05-20 Thread Tomeu Vizoso
rockchip,iommu compatible to IOMMU nodes (Sebastian Reichel) v3: - Adapt to a split of the register block in the DT bindings (Nicolas Frattaroli) v4: - Adapt to changes in bindings Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 85 +++ 1 f

[PATCH v4 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-05-19 Thread Tomeu Vizoso
/mesa/mesa/-/merge_requests/29698 Signed-off-by: Tomeu Vizoso --- Changes in v4: - Several fixes to DT bindings. - Link to v3: https://lore.kernel.org/r/20250516-6-10-rocket-v3-0-7051ac922...@tomeuvizoso.net Changes in v3: - Reference in the device tree only the register blocks that are

[PATCH v4 08/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-05-19 Thread Tomeu Vizoso
same IOCTLs from the Etnaviv driver. v2: - Don't break UABI by reordering the IOCTL IDs (Jeff Hugo) v3: - Check that padding fields in IOCTLs are zero (Jeff Hugo) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/rocket_drv.c | 2 + drivers/accel/rocket/rocket_

[PATCH v4 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-19 Thread Tomeu Vizoso
Kozlowski) - Add reg-names to list of required properties (Krzysztof Kozlowski) - Fix example (Krzysztof Kozlowski) Signed-off-by: Tomeu Vizoso Signed-off-by: Sebastian Reichel --- .../bindings/npu/rockchip,rknn-core.yaml | 149 + 1 file changed, 149 insertions

[PATCH v4 07/10] accel/rocket: Add job submission IOCTL

2025-05-19 Thread Tomeu Vizoso
macros (Thomas Zimmermann) - Add padding to ioctls and check for zero (Jeff Hugo) - Improve error handling (Nicolas Frattaroli) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3 +- drivers/accel/rocket/rocket_core.c | 14 +- drivers/accel/rocket/rocket_core.h | 14

[PATCH v4 09/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains

2025-05-19 Thread Tomeu Vizoso
be on, add a label to the NPU power domain node so board files can reference it. Signed-off-by: Nicolas Frattaroli Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/r

[PATCH v4 02/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588s

2025-05-19 Thread Tomeu Vizoso
rockchip,iommu compatible to IOMMU nodes (Sebastian Reichel) v3: - Adapt to a split of the register block in the DT bindings (Nicolas Frattaroli) v4: - Adapt to changes in bindings Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 85 +++ 1 f

[PATCH v4 03/10] arm64: dts: rockchip: Enable the NPU on quartzpro64

2025-05-19 Thread Tomeu Vizoso
Enable the nodes added in a previous commit to the rk3588s device tree. v2: - Split nodes (Sebastian Reichel) - Sort nodes (Sebastian Reichel) - Add board regulators (Sebastian Reichel) Signed-off-by: Tomeu Vizoso --- .../arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 30

[PATCH v4 05/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-05-19 Thread Tomeu Vizoso
anups (Thomas Zimmermann and Jeff Hugo) - Make use of GPL-2.0-only for the copyright notice (Jeff Hugo) - PM improvements (Nicolas Frattaroli) Signed-off-by: Tomeu Vizoso --- Documentation/accel/index.rst| 1 + Documentation/accel/rocket/index.rst | 25 +++ MAINTA

[PATCH v4 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B

2025-05-19 Thread Tomeu Vizoso
From: Nicolas Frattaroli The NPU on the ROCK5B uses the same regulator for both the sram-supply and the npu's supply. Add this regulator, and enable all the NPU bits. Also add the regulator as a domain-supply to the pd_npu power domain. Signed-off-by: Nicolas Frattaroli Signed-off-by:

[PATCH v4 06/10] accel/rocket: Add IOCTL for BO creation

2025-05-19 Thread Tomeu Vizoso
ivers/accel/rocket/rocket_gem.c b/drivers/accel/rocket/rocket_gem.c new file mode 100644 index ..8a8a7185daac4740081293aae6945c9b2bbeb2dd --- /dev/null +++ b/drivers/accel/rocket/rocket_gem.c @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copy

Re: [PATCH v3 02/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588s

2025-05-19 Thread Tomeu Vizoso
On Mon, May 19, 2025 at 10:47 AM Krzysztof Kozlowski wrote: > > On 19/05/2025 10:27, Tomeu Vizoso wrote: > > On Mon, May 19, 2025 at 8:08 AM Krzysztof Kozlowski wrote: > >> > >> On 16/05/2025 18:53, Tomeu Vizoso wrote: > >>> See Chapter 36 "RKNN&quo

Re: [PATCH v3 02/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588s

2025-05-19 Thread Tomeu Vizoso
On Mon, May 19, 2025 at 8:08 AM Krzysztof Kozlowski wrote: > > On 16/05/2025 18:53, Tomeu Vizoso wrote: > > See Chapter 36 "RKNN" from the RK3588 TRM (Part 1). > > > > This is a derivative of NVIDIA's NVDLA, but with its own front-end > > proces

[PATCH v3 07/10] accel/rocket: Add job submission IOCTL

2025-05-16 Thread Tomeu Vizoso
macros (Thomas Zimmermann) - Add padding to ioctls and check for zero (Jeff Hugo) - Improve error handling (Nicolas Frattaroli) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/Makefile| 3 +- drivers/accel/rocket/rocket_core.c | 14 +- drivers/accel/rocket/rocket_core.h | 14

[PATCH v3 09/10] arm64: dts: rockchip: add pd_npu label for RK3588 power domains

2025-05-16 Thread Tomeu Vizoso
be on, add a label to the NPU power domain node so board files can reference it. Signed-off-by: Nicolas Frattaroli Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/r

[PATCH v3 10/10] arm64: dts: rockchip: enable NPU on ROCK 5B

2025-05-16 Thread Tomeu Vizoso
From: Nicolas Frattaroli The NPU on the ROCK5B uses the same regulator for both the sram-supply and the npu's supply. Add this regulator, and enable all the NPU bits. Also add the regulator as a domain-supply to the pd_npu power domain. Signed-off-by: Nicolas Frattaroli Signed-off-by:

[PATCH v3 03/10] arm64: dts: rockchip: Enable the NPU on quartzpro64

2025-05-16 Thread Tomeu Vizoso
Enable the nodes added in a previous commit to the rk3588s device tree. v2: - Split nodes (Sebastian Reichel) - Sort nodes (Sebastian Reichel) - Add board regulators (Sebastian Reichel) Signed-off-by: Tomeu Vizoso --- .../arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 30

[PATCH v3 08/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-05-16 Thread Tomeu Vizoso
same IOCTLs from the Etnaviv driver. v2: - Don't break UABI by reordering the IOCTL IDs (Jeff Hugo) v3: - Check that padding fields in IOCTLs are zero (Jeff Hugo) Signed-off-by: Tomeu Vizoso --- drivers/accel/rocket/rocket_drv.c | 2 + drivers/accel/rocket/rocket_

[PATCH v3 06/10] accel/rocket: Add IOCTL for BO creation

2025-05-16 Thread Tomeu Vizoso
ivers/accel/rocket/rocket_gem.c b/drivers/accel/rocket/rocket_gem.c new file mode 100644 index ..8a8a7185daac4740081293aae6945c9b2bbeb2dd --- /dev/null +++ b/drivers/accel/rocket/rocket_gem.c @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copy

[PATCH v3 05/10] accel/rocket: Add a new driver for Rockchip's NPU

2025-05-16 Thread Tomeu Vizoso
anups (Thomas Zimmermann and Jeff Hugo) - Make use of GPL-2.0-only for the copyright notice (Jeff Hugo) - PM improvements (Nicolas Frattaroli) Signed-off-by: Tomeu Vizoso --- Documentation/accel/index.rst| 1 + Documentation/accel/rocket/index.rst | 25 +++ MAINTA

[PATCH v3 02/10] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588s

2025-05-16 Thread Tomeu Vizoso
rockchip,iommu compatible to IOMMU nodes (Sebastian Reichel) v3: - Adapt to a split of the register block in the DT bindings (Nicolas Frattaroli) Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 85 +++ 1 file changed, 85 insertions(+) diff --g

[PATCH v3 00/10] New DRM accel driver for Rockchip's RKNN NPU

2025-05-16 Thread Tomeu Vizoso
/mesa/mesa/-/merge_requests/29698 Signed-off-by: Tomeu Vizoso --- Changes in v3: - Reference in the device tree only the register blocks that are actually used. - Several style and robustness fixes suggested in the mailing list. - Added patches from Nicolas Frattaroli that add support to the NPU

[PATCH v3 01/10] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-16 Thread Tomeu Vizoso
would ever use (Nicolas Frattaroli) - Group supplies (Rob Herring) - Explain the way in which the top core is special (Rob Herring) Signed-off-by: Tomeu Vizoso Signed-off-by: Sebastian Reichel --- .../bindings/npu/rockchip,rknn-core.yaml | 162 + 1 file changed, 162

Re: [PATCH v2 1/7] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-16 Thread Tomeu Vizoso
On Fri, May 16, 2025 at 12:25 PM Nicolas Frattaroli wrote: > > On Thursday, 15 May 2025 10:30:14 Central European Summer Time Tomeu Vizoso > wrote: > > On Wed, May 14, 2025 at 7:50 PM Nicolas Frattaroli > > wrote: > > > > > > On Wednesday, 14 May 2025 17:1

Re: [PATCH v2 4/7] accel/rocket: Add a new driver for Rockchip's NPU

2025-05-16 Thread Tomeu Vizoso
On Fri, Apr 25, 2025 at 8:22 PM Nicolas Frattaroli wrote: > > On Tuesday, 25 February 2025 08:55:50 Central European Summer Time Tomeu > Vizoso wrote: > > This initial version supports the NPU as shipped in the RK3588 SoC and > > described in the first part of i

Re: [PATCH v2 1/7] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-15 Thread Tomeu Vizoso
On Wed, May 14, 2025 at 7:50 PM Nicolas Frattaroli wrote: > > On Wednesday, 14 May 2025 17:18:22 Central European Summer Time Tomeu Vizoso > wrote: > > Hi Nicolas, > > > > Thanks for looking at this. Some thoughts below: > > > > On Fri, Apr 25, 2025 a

Re: [PATCH v2 1/7] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-14 Thread Tomeu Vizoso
Hi Rob, On Tue, Feb 25, 2025 at 5:02 PM Rob Herring wrote: > > On Tue, Feb 25, 2025 at 08:55:47AM +0100, Tomeu Vizoso wrote: > > Add the bindings for the Neural Processing Unit IP from Rockchip. > > > > v2: > > - Adapt to new node structure (one node per core,

Re: [PATCH v2 1/7] dt-bindings: npu: rockchip,rknn: Add bindings

2025-05-14 Thread Tomeu Vizoso
Hi Nicolas, Thanks for looking at this. Some thoughts below: On Fri, Apr 25, 2025 at 8:50 PM Nicolas Frattaroli wrote: > > On Tuesday, 25 February 2025 08:55:47 Central European Summer Time Tomeu > Vizoso wrote: > > Add the bindings for the Neural Processing Unit IP from Rockc

Re: [PATCH v2] drm/etnaviv: Fix flush sequence logic

2025-05-08 Thread Tomeu Vizoso
On Thu, May 8, 2025 at 7:08 PM Lucas Stach wrote: > > Am Donnerstag, dem 08.05.2025 um 16:56 +0200 schrieb Tomeu Vizoso: > > We should be comparing the last submitted sequence number with that of > > the address space we may be switching to. > > > This isn't the re

[PATCH v2] drm/etnaviv: Fix flush sequence logic

2025-05-08 Thread Tomeu Vizoso
We should be comparing the last submitted sequence number with that of the address space we may be switching to. Fixes: 27b67278e007 ("drm/etnaviv: rework MMU handling") Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 2 +- 1 file changed, 1 insertion(+),

  1   2   3   4   5   6   >