aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/slab.py
diff options
context:
space:
mode:
authorAlexis Belmonte <alexbelm48@gmail.com>2024-07-08 14:55:55 +0200
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-07-09 15:16:52 +0300
commitd2343023349441173cefcdeb517fc7d5273b4fab (patch)
tree981b54bdb989b7c99c5879dc257efad230d5daca /scripts/gdb/linux/slab.py
parent356eda93fa48b2cd6c4a4628a6b9c94743f270f8 (diff)
platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops
Fix a platform profile option switch/getter bug on some Omen and Victus laptops dismissing userspace choice when selecting performance mode in inadequate conditions (e.g. by being disconnected from the AC power plug) by - hooking an ACPI notify handler through the omen_register_powersource_event_handler method that listens to AC power source changes (plugging in/out the AC power plug) - keeping an intermediate active_platform_profile variable that is set when userspace changes the platform profile setting - restoring the selected platform profile kept in active_platform_profile when AC power is plugged back into the laptop through the power_supply_is_system_supplied call check, unless if the user decided to alter the platform profile mid-way Add a dependency to the POWER_SUPPLY subsystem to be able to check for power_supply_is_system_supplied. Introduce intermediary functions to leverage platform profile <-> internal thermal profile translation code from platform_profile_omen_set and callers. These changes makes the module compliant with the principles defined in the Platform Profile Selection page of the Kernel documentation on those kind of laptops; which is to not "(...) let userspace know about any sub-optimal conditions which are impeding reaching the requested performance level". Since the Omen and Victus laptops share the same embedded controller system, the fix is applicable to both categories of laptops. Signed-off-by: Alexis Belmonte <alexbelm48@gmail.com> Link: https://lore.kernel.org/r/Zovh22-7B1jI7sfF@alexis-pc [ij: Made active_platform_profile_lock static] Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts/gdb/linux/slab.py')
0 files changed, 0 insertions, 0 deletions