powering off the GPU

Lucas Stach l.stach at pengutronix.de
Mon Apr 16 20:03:04 UTC 2018


Am Montag, den 16.04.2018, 20:36 +0100 schrieb James Courtier-Dutton:
> On 16 April 2018 at 11:07, Lucas Stach <l.stach at pengutronix.de>
> wrote:
> > Am Sonntag, den 15.04.2018, 19:19 +0200 schrieb Wladimir J. van der
> > Laan:
> > > On Sun, Apr 15, 2018 at 04:48:34PM +0100, James Courtier-Dutton
> > > wrote:
> > > > Hi,
> > > > 
> > > > Is there any way to power off the GPU without powering off the
> > > > whole device?
> > > > When the machine is idle, I would like the GPU to power down.
> > > 
> > > The hardware supports this, but I don't think the etnaviv kernel
> > > driver currently
> > > has this functionalty implemented.
> > 
> > It has. We are powering down the GPU after 200ms of inactivity. If
> > userspace is idle and doesn't submit graphics work, the kernel will
> > automatically cut clocks and power from the GPU.
> > 
> 
> Great news. Is there some way for me to tell if this is happening.
> cat /sys/....    some file to tell or something like that?

Yes, this is exported to userspace. Maybe you need
CONFIG_PM_ADVANCED_DEBUG, but I'm not sure about this one.

Go to the sysfs path of the GPU. e.g. /sys/devices/soc0/soc/130000.gpu,
there are 3 interesting power properties:
power/runtime_status gets you the current state of the device
power/runtime_active_time tells you how long the GPU was powered up
power/runtime_suspended_time tells you how long it was powered down

Regards,
Lucas


More information about the etnaviv mailing list