Devicetree
 help / color / mirror / Atom feed
From: Cunyuan Liu <cunyuan.liu@cixtech.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>,
	boris.brezillon@collabora.com, steven.price@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, 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 v2 2/3] drm/panthor: Add initial support for CIX Sky1
Date: Mon, 16 Nov 2026 13:58:38 +0800	[thread overview]
Message-ID: <avqbjnqaU1kdxDzK@cix> (raw)
In-Reply-To: <CAPj87rOi0+T7E7Kge4z-8L9FuCSTt6dCqT+9+YtF3wDkd4vRVg@mail.gmail.com>

Hi Daniel,

Thanks, this is a good suggestion. Separate read and write policies
make the configuration much easier to understand.

On 2026-11-13 12:24:18 +0000, Daniel Stone wrote:
> > > > +static const struct panthor_sysc_config sysc_config_cix_sky1 = {
> > > > +     /* Sky1 needs these SYSC_ALLOC policies for correct display of GPU output. */
> > > > +     .alloc = {
> > > > +             0x00230000, 0x00000023, 0x00000000, 0x00000000,
> > > > +             0x00523222, 0x00523200, 0x00000022, 0x00000032,
> > > > +     },
> > > > +};
> > >
> > > These should not be in the driver but in the device tree bindings. If you extract
> > > the system cache code into a separate patch we can have a proper discussion there.
> >
> > I will move the eight SYSC_ALLOC values into a DT property, such as
> > arm,sysc-alloc, and submit the system-cache support as a separate patch.
> 
> Whilst doing this, please break the properties out. At the moment,
> it's written as 32-bit groups of 4 source+RW pairs. I would much
> prefer to have groups of [<sourceR, sourceW>, <sourceR, sourceW>, ...]
> than just the raw register values to be dumped into SYSC_ALLOC*.
> 
> FWIW, I agree with everything else Liviu said. I don't have a strong
> opinion on skipping out devfreq if OPPs are not present vs. exposing a
> single fixed OPP from the clock provider, but the former does seem
> better for me.
>

I will change the DT property to use <source-id read-policy write-policy>
entries. I will add an explicit source ID so that the DT only needs to list
sources with nonzero policies. The Sky1 configuration would look like this:

  arm,sysc-alloc = <2 3 2>, <4 3 0>, <16 2 2>,
       <17 2 3>, <18 2 5>, <21 2 3>,
       <22 0 5>, <24 2 0>, <28 2 3>;

When this property is present, the driver will start with all source
policies set to 0 (L2 allocation), then apply the entries from DT. Sources
not listed will keep policy 0. If the property is absent, the driver will
leave the SYSC_ALLOC registers unchanged.

I will also add checks for the GPU architecture and supported read/write
directions. Unsupported directions will have to use 0. Duplicate source
IDs, out-of-range IDs and invalid policies will be rejected.

Would this format, with an explicit source ID added to the read/write
pair, be suitable? I will submit the system-cache support as a separate
patch, as Liviu suggested.

Thanks also for your feedback on devfreq. I plan to use the generic
no-OPP approach based on Panfrost, unless there are further concerns.

Best regards,
Cunyuan

  reply	other threads:[~2026-11-16  5:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 12:08 [PATCH v2 0/3] Add initial GPU support for CIX Sky1 Cunyuan Liu
2026-11-09 12:08 ` [PATCH v2 1/3] dt-bindings: gpu: Add CIX Sky1 Mali support Cunyuan Liu
2026-11-09 12:15   ` sashiko-bot
2026-11-09 12:09 ` [PATCH v2 2/3] drm/panthor: Add initial support for CIX Sky1 Cunyuan Liu
2026-11-10 10:03   ` Liviu Dudau
2026-11-11 13:00     ` Cunyuan Liu
2026-11-13 12:24       ` Daniel Stone
2026-11-16  5:58         ` Cunyuan Liu [this message]
2026-11-09 12:09 ` [PATCH v2 3/3] 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=avqbjnqaU1kdxDzK@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=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