[Intel-gfx] [PATCH 6/6] DRAFT: drm/i915: do adapter power state notification on PC8+ enable/disable

Daniel Vetter daniel at ffwll.ch
Mon Aug 26 11:19:06 CEST 2013


On Mon, Aug 26, 2013 at 9:43 AM, Ville Syrjälä
<ville.syrjala at linux.intel.com> wrote:
> My quick and dirty idea for runtime PM would be something like this:
> - for ioctls just slap rpm_get_sync/put() around drm_ioctl,
>   not optimal but it's very easy for getting started
> - all sysfs/debugfs stuff would need to be handled individually
> - to deal w/ gtt mmaps just call put_fence or something during suspend,
>   grab one ref in fault and probably release it from a delayed work,
>   or mabe record a timestamp at last fault time and check it in the idle
>   callback
> - grab one ref per request (or per active ring maybe?)
> - grab one ref per active pipe
> - maybe some odd delayed work would need another reference
>
> With that, I think everything of importance would hold a reference,
> so the runtime pm idle callback shouldn't really need to do much.

I think we can do this cheaper:
- Grab a ref everywhere we want to disallow pc8+ currently (by hooking
into the same get/put calls Paulo's patches sprinkled all over). That
should cover 100% of all the runtime stuff - Paulo's pc8+ test is
rather extensive.

That leaves us with the debugfs/sysfs crap doing register access.
Cheap and dirty (and likely to make Chris rage) is to add get/put
calls with a suitable timeout to the register i/o functions. Less
cheap (but I'm unsure whether that's better) would be to sprinkle
get/put calls around all relevant sysfs/debugfs files. Pure s/w stuff
like the error state wouldn't need it though (and we should try hard
not to require it in case runtime pm hangs).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list