The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Cunyuan Liu <cunyuan.liu@cixtech.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: boris.brezillon@collabora.com, steven.price@arm.com,
	liviu.dudau@arm.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, gary.yang@cixtech.com,
	fugang.duan@cixtech.com, daniel.almeida@collabora.com,
	aliceryhl@google.com, p.zabel@pengutronix.de,
	daniel@fooishbar.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	cix-kernel-upstream@cixtech.com, robin.wang@cixtech.com
Subject: Re: [PATCH v3 3/7] dt-bindings: gpu: arm,mali-valhall-csf: Add system-cache policies
Date: Tue, 24 Nov 2026 14:17:20 +0800	[thread overview]
Message-ID: <awUr8JIE8GTgxwL4@cix> (raw)
In-Reply-To: <20261122-greedy-cuddly-hog-06c4ac@quoll>

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

  reply	other threads:[~2026-11-24  6:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 12:38 [PATCH v3 0/7] Add initial GPU support for CIX Sky1 Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 1/7] drm/panthor: Add optional external reset support Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 2/7] drm/panthor: Allow operation without an OPP table Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 3/7] dt-bindings: gpu: arm,mali-valhall-csf: Add system-cache policies Cunyuan Liu
2026-11-22 16:58   ` Krzysztof Kozlowski
2026-11-24  6:17     ` Cunyuan Liu [this message]
2026-11-19 12:38 ` [PATCH v3 4/7] drm/panthor: Add system-cache allocation policy support Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 5/7] dt-bindings: gpu: Add CIX Sky1 Mali support Cunyuan Liu
2026-11-22 17:01   ` Krzysztof Kozlowski
2026-11-24  6:20     ` Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 6/7] drm/panthor: Add CIX Sky1 compatible Cunyuan Liu
2026-11-19 12:38 ` [PATCH v3 7/7] arm64: dts: cix: Add GPU support for Sky1 Orion O6 Cunyuan Liu

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=awUr8JIE8GTgxwL4@cix \
    --to=cunyuan.liu@cixtech.com \
    --cc=aliceryhl@google.com \
    --cc=boris.brezillon@collabora.com \
    --cc=cix-kernel-upstream@cixtech.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=daniel@fooishbar.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fugang.duan@cixtech.com \
    --cc=gary.yang@cixtech.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=robin.wang@cixtech.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=steven.price@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox