]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: thinkpad_acpi: Disable DYTC CQL mode around switching to balanced mode
authorHans de Goede <hdegoede@redhat.com>
Sun, 21 Mar 2021 11:31:08 +0000 (12:31 +0100)
committerHans de Goede <hdegoede@redhat.com>
Sun, 21 Mar 2021 16:46:51 +0000 (17:46 +0100)
commitfdf1b17d3e25f7ff90411c6d5defab63eb042a79
tree03ba742e032d5550eaff4f727428e2ccf3b1774c
parentca90f59d6fdb336c799275458fb3bba7bd815639
platform/x86: thinkpad_acpi: Disable DYTC CQL mode around switching to balanced mode

Testing has shown that setting /sys/firmware/acpi/platform_profile to
"balanced" when /sys/bus/platform/devices/thinkpad_acpi/dytc_lapmode
reports 1, causes dytc_lapmode to get reset to 0 and then it becomes
stuck at 0 for aprox. 30 minutes even if the laptop is used on a lap.

Disabling CQL (when enabled) before issuing the DYTC_CMD_RESET to get
back to balanced mode and re-enabling it afterwards again, like the
code already does when switching to low-power / performance mode fixes
this.

Fixes: 4da0802ae3e5 ("platform/x86: thinkpad_acpi: Add platform profile support")
Tested-by: Mark Pearson <markpearson@lenovo.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210321113108.7069-1-hdegoede@redhat.com
drivers/platform/x86/thinkpad_acpi.c