forked from Minki/linux
c7ff297639
Update the firmware with OS supported policies mask, so that firmware can relinquish its internal controls. Without this update several Tiger Lake laptops gets performance limited with in few seconds of executing in turbo region. The existing way of enumerating firmware policies via IDSP method and selecting policy by directly writing those policy UUIDS via _OSC method is not supported in newer generation of hardware. There is a new UUID "B23BA85D-C8B7-3542-88DE-8DE2FFCFD698" is defined for updating policy capabilities. As part of ACPI _OSC method: Arg0 - UUID: B23BA85D-C8B7-3542-88DE-8DE2FFCFD698 Arg1 - Rev ID: 1 Arg2 - Count: 2 Arg3 - Capability buffers: Array of Arg2 DWORDS DWORD1: As defined in the ACPI 5.0 Specification - Bit 0: Query Flag - Bits 1-3: Always 0 - Bits 4-31: Reserved DWORD2 and beyond: - Bit0: set to 1 to indicate Intel(R) Dynamic Tuning is active, 0 to indicate it is disabled and legacy thermal mechanism should be enabled. - Bit1: set to 1 to indicate Intel(R) Dynamic Tuning is controlling active cooling, 0 to indicate bios shall enable legacy thermal zone with active trip point. - Bit2: set to 1 to indicate Intel(R) Dynamic Tuning is controlling passive cooling, 0 to indicate bios shall enable legacy thermal zone with passive trip point. - Bit3: set to 1 to indicate Intel(R) Dynamic Tuning is handling critical trip point, 0 to indicate bios shall enable legacy thermal zone with critical trip point. - Bits 4:31: Reserved From sysfs interface, there is an existing interface to update policy UUID using attribute "current_uuid". User space can write the same UUID for ACTIVE, PASSIVE and CRITICAL policy. Driver converts these UUIDs to DWORD2 Bit 1 to Bit 3. When any of the policy is activated by user space it is assumed that dynamic tuning is active. For example $cd /sys/bus/platform/devices/INTC1040:00/uuids To support active policy $echo "3A95C389-E4B8-4629-A526-C52C88626BAE" > current_uuid To support passive policy $echo "42A441D6-AE6A-462b-A84B-4A8CE79027D3" > current_uuid To support critical policy $echo "97C68AE7-15FA-499c-B8C9-5DA81D606E0A" > current_uuid To check all the supported policies $cat current_uuid 3A95C389-E4B8-4629-A526-C52C88626BAE 42A441D6-AE6A-462b-A84B-4A8CE79027D3 97C68AE7-15FA-499c-B8C9-5DA81D606E0A To match the bit format for DWORD2, rearranged enum int3400_thermal_uuid and int3400_thermal_uuids[] by swapping current INT3400_THERMAL_ACTIVE and INT3400_THERMAL_PASSIVE_1. If the policies are enumerated via IDSP method then legacy method is used, if not the new method is used to update policy support. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
---|---|---|
.. | ||
broadcom | ||
intel | ||
qcom | ||
samsung | ||
st | ||
tegra | ||
ti-soc-thermal | ||
amlogic_thermal.c | ||
armada_thermal.c | ||
cpufreq_cooling.c | ||
cpuidle_cooling.c | ||
da9062-thermal.c | ||
db8500_thermal.c | ||
devfreq_cooling.c | ||
dove_thermal.c | ||
gov_bang_bang.c | ||
gov_fair_share.c | ||
gov_power_allocator.c | ||
gov_step_wise.c | ||
gov_user_space.c | ||
hisi_thermal.c | ||
imx8mm_thermal.c | ||
imx_sc_thermal.c | ||
imx_thermal.c | ||
k3_bandgap.c | ||
Kconfig | ||
khadas_mcu_fan.c | ||
kirkwood_thermal.c | ||
Makefile | ||
max77620_thermal.c | ||
mtk_thermal.c | ||
qoriq_thermal.c | ||
rcar_gen3_thermal.c | ||
rcar_thermal.c | ||
rockchip_thermal.c | ||
rzg2l_thermal.c | ||
spear_thermal.c | ||
sprd_thermal.c | ||
sun8i_thermal.c | ||
thermal_core.c | ||
thermal_core.h | ||
thermal_helpers.c | ||
thermal_hwmon.c | ||
thermal_hwmon.h | ||
thermal_mmio.c | ||
thermal_netlink.c | ||
thermal_netlink.h | ||
thermal_of.c | ||
thermal_sysfs.c | ||
thermal-generic-adc.c | ||
uniphier_thermal.c |