Re: [PATCH 6/9] drm/panthor: Reset GPU after L2 cache power off

Boris Brezillon
2025-03-03T12:35:30Z

On Mon, 3 Mar 2025 12:08:51 +0000
Liviu Dudau <liviu.dudau@arm.com> wrote:

> On Fri, Feb 28, 2025 at 06:05:36PM +0100, Marek Vasut wrote:
> > On 2/28/25 12:06 PM, Liviu Dudau wrote:
> > > Hi Marek,
> >
> > Hi,
> >
> > > On Thu, Feb 27, 2025 at 05:58:06PM +0100, Marek Vasut wrote:
> > > > This seems necessary on Freescale i.MX95 Mali G310 to reliably resume
> > > > from runtime PM suspend. Without this, if only the L2 is powered down
> > > > on RPM entry, the GPU gets stuck and does not indicate the firmware is
> > > > booted after RPM resume.
> > >
> > > That doesn't sound right. Can you tell me what GPU firmware are you running
> > > (we are now printing the git sha of the image at boot time).
> > Please see below. It could be some sort of NXP firmware fork ?
> >
> > It comes from the NXP firmware repo , mali-imx-r50.2-710cfb6 .
> >
> > panthor 4d900000.gpu: [drm] clock rate = 1000000000
> > panthor 4d900000.gpu: EM: created perf domain
> > panthor 4d900000.gpu: [drm] mali-unknown id 0xac74 major 0x0 minor 0x0
> > status 0x1
> > panthor 4d900000.gpu: [drm] Features: L2:0x7110306 Tiler:0x809 Mem:0x1
> > MMU:0x2830 AS:0xff
> > panthor 4d900000.gpu: [drm] shader_present=0x1 l2_present=0x1
> > tiler_present=0x1
> > panthor 4d900000.gpu: [drm] Firmware protected mode entry not be supported,
> > ignoring
> > panthor 4d900000.gpu: [drm] Firmware git sha:
> > 8e5cfcfec20cc8aff8509d37e72babc935d34a3b
>
> This looks like it has been part of a R50 release of the DDK, which is recent
> enough to consider it up-to-date. The issues you're seeing with fast resume are
> probably due to some integration issues or other quirks.
>
> Boris has the most recent experience with playing with fast resume, maybe
> he can share some tips on where to add messages in Panthor to try to debug
> your problem.

If you end up with fast_reset=true, that means the FW claims it entered
a suspend state from which is can resume quickly (fast-reset), and in
that case, we're only supposed to power on the L2 block at resume time
AFAIK. If there's a component that can tell us more, it's probably the
FW, unfortunately, it doesn't tell us much through the FW interface,
especially if it's not booting properly. Do you hit this error [1]
without this patch, and if you do, what's the status reported there?

[1]https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/gpu/drm/panthor/panthor_fw.c#L1051