Re: [PATCH v3 3/7] dt-bindings: gpu: arm,mali-valhall-csf: Add system-cache policies
From: Cunyuan Liu
Date: Tue Nov 24 2026 - 01:17:38 EST
Hi Krzysztof,
On 2026-11-22 17:58:56 +0100, Krzysztof Kozlowski wrote:
> On Thu, Nov 19, 2026 at 08:38:46PM +0800, Cunyuan Liu wrote:
> > Describe system-cache allocation policies for Mali GPUs with SYSC_ALLOC
> > registers. The policy depends on how the GPU is integrated with the rest
> > of the system and belongs in DT rather than a platform table in the driver.
>
> Explain why.
>
>
> > [...]
> > + arm,sysc-alloc:
> > + $ref: /schemas/types.yaml#/definitions/uint32-matrix
> > + minItems: 1
> > + maxItems: 32
> > + items:
> > + items:
> > + - description: GPU internal source ID
> > + minimum: 0
> > + maximum: 31
> > + - description: Read allocation policy
> > + enum: [0, 2, 3, 4, 5]
> > + - description: Write allocation policy
> > + enum: [0, 2, 3, 4, 5]
> > + description:
> > + System-cache allocation policies for GPU architecture 11.0.3 and later.
> > + Each entry contains a source ID, a read policy and a write policy.
> > + Source IDs must be unique. Reserved source IDs and access directions
> > + not supported by the GPU must use zero policies. Policy values are
> > + 0 for L2 allocation, 2 for never allocate, 3 for always allocate,
> > + 4 for partial allocation and 5 for L2 partial allocation. When present,
> > + all source policies start at zero and the listed entries override them.
> > + Omitted sources therefore use L2 allocation. If absent, the register
> > + defaults are preserved.
>
> Looks like integration specific, so implied by the compatible.
>
SYSC_ALLOC is a standard Mali GPU feature (architecture 11.0.3 and
later), not a Sky1-specific register, so other SoCs integrating these
GPUs may also need different allocation policies depending on their
system cache integration.
On CIX Sky1, devices on the MMHUB bus (such as the display controller)
cannot access the system-level cache. Buffers shared between the GPU and
MMHUB devices therefore require specific SYSC_ALLOC policies, otherwise
the GPU display output is corrupted.
In v2, these policies were in the driver via panthor_soc_data, similar
to the MediaTek mt8196 asn_hash table. I moved them to DT in v3 and
split them into this patch following Liviu's and Daniel's review on v2
so we could discuss the representation here.
Krzysztof, Liviu, Daniel: should I drop arm,sysc-alloc from DT and
derive the policies from "cix,sky1-mali" in the driver, or keep a
DT property?
Best regards,
Cunyuan