On Mon, 10 Sep 2012 18:23:05 +1000, Dave Airlie airlied@gmail.com wrote:
(oops' forgot reply to all)
My midlayer-smell-o-meter just cranked up to 11 when reading this comment ;-)
I'd have expected:
- Drivers to check the power state and enable the gpu if it's off in their cs ioctl (instead of the brute-force every ioctl there is approach in the drm core)
The problem is it won't just be the CS ioctl, so I just went with the larger hammer, I started annotating all the nouveau ioctls adding a wake up check at the top, and then realised that I need to start annotating all the non-gpu paths as well, like drm open, sysfs, basically anywhere that might cause us to access any GPU resources. Once I started annotating everywhere I realised just bashing it into the top most ioctl then sticking the whole lot into the drm core made sense. You have to think the device is gone completely, not the device is asleep. its not asleep, its effectively dead.
This reminds me of some of the power island patches that we making the rounds a few years ago - effectively shadowing register blocks to avoid waking up the device for trivial queries. In many ways it was just a fine grained suspend/resume. Not sure if that concept helps here, but it may be worth digging around to see how they went about waking up individual devices. -Chris