On Fri, Aug 29, 2025 at 6:41 AM Steven Price <steven.pr...@arm.com> wrote: > > On 28/08/2025 21:18, Chia-I Wu wrote: > > Some socs such as mt8196 require custom ASN hash. > > I don't know the full details of this, but I'm puzzled by the "require" > here. > > AIUI the "custom ASN hash support" (or L2C_SLICE_HASH as it was renamed) > affects the efficiency of the L2 caches in the GPU. It basically > determines how addresses are striped over the individual caches. > > So (unless there is a specific errata) not setting a custom hash will > work just fine, but the performance might be slightly reduced. All memory access results in faults unless custom ASN hash is enabled on mt8196.
It sounds like this is a soc-specific quirk. I will check with the vendor, and likely turn this into a quirk. > > kbase provides both a DT option and a module parameter which can be used > to override the defaults (although the parameter descriptions say "for > testing" which I think is somewhat telling). > > How we should describe this somewhat depends on whether this is a > specific workaround for a SoC - in which case Boris's suggestion of > using a different compatible string and panthor_soc_data seems like a > good choice. Or if this is exposed as a general "tuning" parameter, in > which case this might be appropriate. > > I believe the tuning is related to more than just a SoC (the external > memory system has an impact). So I guess a DT level knob makes most > sense here. > > Steve > > > Chia-I Wu (2): > > dt-bindings: gpu: mali-valhall-csf: add asn-hash > > drm/panthor: add asn-hash support > > > > .../bindings/gpu/arm,mali-valhall-csf.yaml | 8 ++++++ > > drivers/gpu/drm/panthor/panthor_device.c | 28 +++++++++++++++++++ > > drivers/gpu/drm/panthor/panthor_device.h | 6 ++++ > > drivers/gpu/drm/panthor/panthor_gpu.c | 17 +++++++++++ > > drivers/gpu/drm/panthor/panthor_regs.h | 4 +++ > > 5 files changed, 63 insertions(+) > > >