devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] media: platform: rga: Add RGA3 support
@ 2025-10-07  8:31 Sven Püschel
  2025-10-07  8:31 ` [PATCH 01/16] media: rockchip: rga: use clk_bulk api Sven Püschel
                   ` (17 more replies)
  0 siblings, 18 replies; 36+ messages in thread
From: Sven Püschel @ 2025-10-07  8:31 UTC (permalink / raw)
  To: Jacob Chen, Ezequiel Garcia, Mauro Carvalho Chehab,
	Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-media, linux-rockchip, linux-arm-kernel, linux-kernel,
	devicetree, kernel, Sven Püschel

This series adds support for the Raster Graphic Acceleration 3 (RGA3)
peripheral, which is included in the RK3588 SoC. Unlike the RGA2 it
can use the existing rockchip-iommu-v2 driver to handle iommu mappings.
Also the RK3588 contains two independent RGA3 cores.

Only scaling and format conversions between common 8bit RGB/YUV formats
are implemented. Also the color space conversion is fixed to BT601F.
This already allows a practical usage of the RGA3.

This was tested on a Radxa Rock 5T. With the increased clock speeds in
the devicetree around 160 fps were measured when scaling and converting
from RGBA 480x360 to NV12 3840x2160. Without the clock speed scaling a
default clock division factor of 2 is used and only around 80 fps are
reached with one core. The v4l2-compliance tests only complain about
the already failing colorspace propagation:

  v4l2-compliance 1.28.1, 64 bits, 64-bit time_t
  ...
  		fail: v4l2-test-formats.cpp(923): fmt_cap.g_colorspace() != col
  	test VIDIOC_S_FMT: FAIL
  ...
  Total for rockchip-rga device /dev/video0: 47, Succeeded: 46, Failed: 1, Warnings: 0

  v4l2-compliance 1.28.1, 64 bits, 64-bit time_t
  ...
  		fail: v4l2-test-formats.cpp(923): fmt_cap.g_colorspace() != col
  	test VIDIOC_S_FMT: FAIL
  ...
  Total for rockchip-rga device /dev/video1: 47, Succeeded: 46, Failed: 1, Warnings: 0

  v4l2-compliance 1.28.1, 64 bits, 64-bit time_t
  ...
  		fail: v4l2-test-formats.cpp(923): fmt_cap.g_colorspace() != col
  	test VIDIOC_S_FMT: FAIL
  ...
  Total for rockchip-rga device /dev/video2: 47, Succeeded: 46, Failed: 1, Warnings: 0

Each RGA core is a separate /dev/video device. To distinguish the RGA2
core from the RGA3 cores the Card type is set accordingly. Combining all
cores into a single device and scheduling tasks to the best core might
be a future improvement, if it is desired by upstream to handle the
scheduling and selection in kernel space.

Patch 1-2 are general cleanups
Patch 3-12 prepare the rga driver for the RGA3
Patch 13 documments the RGA3 compatible value
Patch 14 adds the RGA3 cores to the rk3588 dtsi
Patch 15 increases the RGA3 core clock speeds
Patch 16 adds RGA3 support to the rga driver

Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
Sven Püschel (16):
      media: rockchip: rga: use clk_bulk api
      media: rockchip: rga: use stride for offset calculation
      media: rockchip: rga: align stride to 16 bytes
      media: rockchip: rga: move hw specific parts to a dedicated struct
      media: rockchip: rga: use card type to specify rga type
      media: rockchip: rga: change offset to dma_addresses
      media: rockchip: rga: support external iommus
      media: rockchip: rga: remove size from rga_frame
      media: rockchip: rga: remove stride from rga_frame
      media: rockchip: rga: move rga_fmt to rga-hw.h
      media: rockchip: rga: add iommu restore function
      media: rockchip: rga: handle error interrupt
      media: dt-bindings: media: rockchip-rga: add rockchip,rk3588-rga3
      arm64: dts: rockchip: add rga3 dt nodes
      arm64: dts: rockchip: increase rga3 clock speed
      media: rockchip: rga: add rga3 support

 .../devicetree/bindings/media/rockchip-rga.yaml    |   1 +
 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi      |  50 +++
 drivers/media/platform/rockchip/rga/Makefile       |   2 +-
 drivers/media/platform/rockchip/rga/rga-buf.c      |  78 ++--
 drivers/media/platform/rockchip/rga/rga-hw.c       | 356 ++++++++++++---
 drivers/media/platform/rockchip/rga/rga-hw.h       |  15 +-
 drivers/media/platform/rockchip/rga/rga.c          | 404 ++++++-----------
 drivers/media/platform/rockchip/rga/rga.h          |  74 ++--
 drivers/media/platform/rockchip/rga/rga3-hw.c      | 490 +++++++++++++++++++++
 drivers/media/platform/rockchip/rga/rga3-hw.h      | 186 ++++++++
 10 files changed, 1246 insertions(+), 410 deletions(-)
---
base-commit: afb100a5ea7a13d7e6937dcd3b36b19dc6cc9328
change-id: 20251001-spu-rga3-8a00e018b120

Best regards,
-- 
Sven Püschel <s.pueschel@pengutronix.de>


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2025-10-11  5:33 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-07  8:31 [PATCH 00/16] media: platform: rga: Add RGA3 support Sven Püschel
2025-10-07  8:31 ` [PATCH 01/16] media: rockchip: rga: use clk_bulk api Sven Püschel
2025-10-07  8:31 ` [PATCH 02/16] media: rockchip: rga: use stride for offset calculation Sven Püschel
2025-10-07  8:31 ` [PATCH 03/16] media: rockchip: rga: align stride to 16 bytes Sven Püschel
2025-10-07 18:19   ` Nicolas Dufresne
2025-10-07  8:31 ` [PATCH 04/16] media: rockchip: rga: move hw specific parts to a dedicated struct Sven Püschel
2025-10-07  8:31 ` [PATCH 05/16] media: rockchip: rga: use card type to specify rga type Sven Püschel
2025-10-07  8:31 ` [PATCH 06/16] media: rockchip: rga: change offset to dma_addresses Sven Püschel
2025-10-07  8:32 ` [PATCH 07/16] media: rockchip: rga: support external iommus Sven Püschel
2025-10-07  8:32 ` [PATCH 08/16] media: rockchip: rga: remove size from rga_frame Sven Püschel
2025-10-07  8:32 ` [PATCH 09/16] media: rockchip: rga: remove stride " Sven Püschel
2025-10-07  8:32 ` [PATCH 10/16] media: rockchip: rga: move rga_fmt to rga-hw.h Sven Püschel
2025-10-07  8:32 ` [PATCH 11/16] media: rockchip: rga: add iommu restore function Sven Püschel
2025-10-07 18:30   ` Nicolas Dufresne
2025-10-10  8:45     ` Sven Püschel
2025-10-10 13:10       ` Nicolas Dufresne
2025-10-07  8:32 ` [PATCH 12/16] media: rockchip: rga: handle error interrupt Sven Püschel
2025-10-07 18:47   ` Nicolas Dufresne
2025-10-07  8:32 ` [PATCH 13/16] media: dt-bindings: media: rockchip-rga: add rockchip,rk3588-rga3 Sven Püschel
2025-10-07  8:38   ` Krzysztof Kozlowski
2025-10-07 18:12     ` Nicolas Dufresne
2025-10-07  8:32 ` [PATCH 14/16] arm64: dts: rockchip: add rga3 dt nodes Sven Püschel
2025-10-07  8:32 ` [PATCH 15/16] arm64: dts: rockchip: increase rga3 clock speed Sven Püschel
2025-10-07  8:39   ` Krzysztof Kozlowski
2025-10-07  8:32 ` [PATCH 16/16] media: rockchip: rga: add rga3 support Sven Püschel
2025-10-07  8:39   ` Krzysztof Kozlowski
2025-10-07 16:05     ` Sven Püschel
2025-10-08  1:55       ` Krzysztof Kozlowski
2025-10-07 18:54     ` Nicolas Dufresne
2025-10-07 19:41   ` Nicolas Dufresne
2025-10-10  9:21     ` Sven Püschel
2025-10-11  5:32   ` kernel test robot
2025-10-07 18:06 ` [PATCH 00/16] media: platform: rga: Add RGA3 support Nicolas Dufresne
2025-10-10  8:33   ` Sven Püschel
2025-10-10 13:05     ` Nicolas Dufresne
2025-10-09 22:03 ` Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).