Re: [PATCH v2 2/3] drm/panthor: Add initial support for CIX Sky1
From: Cunyuan Liu
Date: Mon Nov 16 2026 - 00:58:52 EST
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