diff options
author | Lukas Wunner <[email protected]> | 2018-03-03 10:53:24 +0100 |
---|---|---|
committer | Lukas Wunner <[email protected]> | 2018-03-13 22:58:02 +0100 |
commit | 8948ca1a12c9a039361bbc3e4627064153971d57 (patch) | |
tree | bc351baa3285bccaf044e71b8d7ca6612a8480e6 /tools/perf/scripts/python/stackcollapse.py | |
parent | dcac86b7d0be71563d6219ce52c9918e44b84f0a (diff) |
vga_switcheroo: Deduplicate power state tracking
If DRM drivers use runtime PM, they currently notify vga_switcheroo
whenever they ->runtime_suspend or ->runtime_resume to update
vga_switcheroo's internal power state tracking.
That's essentially a duplication of a functionality performed by the
PM core as it already tracks the GPU's power state and vga_switcheroo
can always query it.
Introduce a new internal helper vga_switcheroo_pwr_state() which does
just that if runtime PM is used, or falls back to vga_switcheroo's
internal power state tracking if manual power control is used.
Drop a redundant power state check in set_audio_state() while at it.
This removes one of the two purposes of the notification mechanism
implemented by vga_switcheroo_set_dynamic_switch(). The other one is
power management of the audio device and we'll remove that next.
Cc: Dave Airlie <[email protected]>
Cc: Ben Skeggs <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Reviewed-by: Peter Wu <[email protected]>
Tested-by: Kai Heng Feng <[email protected]> # AMD PowerXpress
Tested-by: Mike Lothian <[email protected]> # AMD PowerXpress
Tested-by: Denis Lisov <[email protected]> # Nvidia Optimus
Tested-by: Peter Wu <[email protected]> # Nvidia Optimus
Tested-by: Lukas Wunner <[email protected]> # MacBook Pro
Signed-off-by: Lukas Wunner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/0aa49d735b988aa04524a8dc339582ace33f0f94.1520068884.git.lukas@wunner.de
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions