Re: [PATCH v3 01/27] media: dt-bindings: media: rockchip-rga: add rockchip,rk3588-rga3
From: Sven Püschel
Date: Tue Mar 24 2026 - 12:02:12 EST
Hi Nicolas,
On 3/24/26 1:55 PM, Nicolas Dufresne wrote:
Le mardi 24 mars 2026 à 11:22 +0100, Sven Püschel a écrit :
Hi Nicolas,That is a way better list, thanks.
On 3/19/26 7:44 PM, Nicolas Dufresne wrote:
Le mardi 27 janvier 2026 à 15:39 +0100, Sven Püschel a écrit :I've found a more complete list in the librga docs [1]. There are a
Add a new compatible for the RGA3 (Raster Graphic Acceleration 3)Nothing import, but some more details on the differences can be found here.
peripheral found on the RK3588 SoC. Also specify an iommu property,
as the RGA3 contains the generic rockchip iommu. The RGA2 also has
an iommu, but it's specific to the RGA2.
The existing binding refers to the RGA2 peripheral. The RK3588
contains one RGA2 core and two RGA3 cores. Both feature a similar
functionality of scaling, cropping and rotating of up to two input
images into one output image. Key differences of the RGA3 are:
- supports 10bit YUV output formats
- supports 8x8 tiles and FBCD as inputs and outputs
- supports BT2020 color space conversion
- max output resolution of (8192-64)x(8192-64)
- MMU can map up to 32G DDR RAM
- fully planar formats (3 planes) are not supported
- max scale up/down factor of 8 (RGA2 allows up to 16)
https://github.com/sravansenthiln1/rga-demos/tree/main
They also removed from RGA3 the neural network quantization support
(CLIP((source + offset) * scale). I suppose that integer tensors are fading
away, and the accelerator does not do floats.
bunch of different RGA2 versions out there, the RGA2 from the rk3288
isn't the same as the RGA2-Enhanced contained in the rk3588/rk3399. Only
the latter one includes the NN features.
[1]
https://github.com/airockchip/librga/blob/main/docs/Rockchip_Developer_Guide_RGA_EN.md#design-index
No implication, pretty much everything I looked in in rockchip-linux/kernel onOne things that isn't clear, even in the upstream RGA2 implementation is if theI don't know. Looking at the vendor driver for the RGA3 it sets a cache
accelerator is cache coherent. When I study the BSP usage of RGA2, they
integrate the RGA2 directly into GStreamer software video converter. They don't
do anything to flush the cache, indicating that RGA2 is most probably cache
coherent.
Do you know if RGA3 has the same feature or if this is one of the difference ?
Typically, RKIOMMU users are not, in RGA2, a completely custom mmu was used (and
implemented inside the driver, as standalone).
flush flag when the source is virtual memory (vs. dma-bufs and physical
memory). So I'd assume the RGA3 is not cache coherent. From a chat with
my colleagues, they found it a bit odd that the RGA2 should be cache
coherent, as it looks like a strange exception for a minor peripheral.
Does this imply anything for my driver or is the whole cache coherency
handled by the underlying buffer handling or is this just for the
difference documentation?
Btw. to which BSP do you refer?
github. Checking again, with a bit more knowledge then last time (but still very
little), indeed, it seems that virtual address handling is similar to what VB2
USERPTR code is doing. Basically, locks pages, and sync them in some ways.
I was just trying to help gather what this driver is leaving behind.
We should say, "this driver supports two variants", rather then there exist. CanSigned-off-by: Sven Püschel <s.pueschel@xxxxxxxxxxxxxx>
---
.../devicetree/bindings/media/rockchip-rga.yaml | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.yaml b/Documentation/devicetree/bindings/media/rockchip-rga.yaml
index ac17cda65191b..7735d8794c719 100644
--- a/Documentation/devicetree/bindings/media/rockchip-rga.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip-rga.yaml
@@ -9,7 +9,9 @@ title: Rockchip 2D raster graphic acceleration controller (RGA)
description:
RGA is a standalone 2D raster graphic acceleration unit. It accelerates 2D
graphics operations, such as point/line drawing, image scaling, rotation,
- BitBLT, alpha blending and image blur/sharpness.
+ BitBLT, alpha blending and image blur/sharpness. There exist two variants
+ named RGA2 and RGA3 that differ in the supported inputs/output formats,
+ the attached IOMMU and the supported operations on the input.
we clarify that we don't support BitBLT, I think it is miss-leading. In general,
I found most 2D m2m fooling people into thinking, great, that chip is supported
until they find that v4l2 m2m can only handle a tiny subset.
Isn't talking about drivers/implementation at this point incorrect? In my understanding the dt docs just describe the Hardware (which can do more than the m2m API supports).
Btw.: given the multitude of different RGA versions (as I've only found out recently through the librga docs) I'll adjust the docs to avoid implying that there only exists a RGA2 and RGA3. Instead more like "there exist various RGA versions" and that some SoCs (aka. the rk3588) contain RGA cores with different version (making the rga3 distiction necessary, as rk3588-rga doesn't imply if it's the RGA2-Enhanced or the RGA3 core).
Sincerely
Sven
Nicolas
Ah, no. I'd rather thought that this just describes that there is amaintainers:You really can't use this chip with CMA ?
- Jacob Chen <jacob-chen@xxxxxxxxxx>
@@ -20,6 +22,7 @@ properties:
oneOf:
- const: rockchip,rk3288-rga
- const: rockchip,rk3399-rga
+ - const: rockchip,rk3588-rga3
- items:
- enum:
- rockchip,rk3228-rga
@@ -45,6 +48,9 @@ properties:
power-domains:
maxItems: 1
+ iommus:
+ maxItems: 1
+
resets:
maxItems: 3
@@ -54,6 +60,17 @@ properties:
- const: axi
- const: ahb
+allOf:
+- if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - rockchip,rk3588-rga3
+ then:
+ required:
+ - iommus
+
dedicated iommu (which also has a appropriate dt node) for this
peripheral. I'll just drop this block (which also fixes the indentation
issue).
Sincerely
Sven
Nicolas
required:
- compatible
- reg