platform/x86/amd/pmf: Handle AMT and CQL events for Auto mode
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Tue, 2 Aug 2022 15:11:47 +0000 (20:41 +0530)
committerHans de Goede <hdegoede@redhat.com>
Mon, 15 Aug 2022 11:23:38 +0000 (13:23 +0200)
commit7d77dcc83adaffacbb9000924a212566170c1257
tree0f0b6345154d16cc7ecf1c60630f33d76cc96f5c
parent3f5571d9952473c183762b801c61c42b9dbe1903
platform/x86/amd/pmf: Handle AMT and CQL events for Auto mode

The transition to auto-mode happens when the PMF driver receives
AMT (Auto Mode transition) event. transition logic will reside in the
PMF driver but the events would come from other supported drivers[1].

The thermal parameters would vary between when a performance "on-lap" mode
is detected and versus when not. The CQL event would get triggered from
other drivers, so that PMF driver would adjust the system thermal config
based on the ACPI inputs.

OEMs can control whether or not to enable AMT or CQL via other supported
drivers[1] but the actual transition logic resides in the AMD PMF driver.
When an AMT event is received the automatic mode transition RAPL algorithm
will run. When a CQL event is received an performance "on-lap" mode will
be enabled and thermal parameters will be adjusted accordingly.

[1]
Link: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-hans&id=755b249250df1b612d982f3b702c831b26ecdf73
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Mark Pearson <markpearson@lenovo.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20220802151149.2123699-10-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd/pmf/acpi.c
drivers/platform/x86/amd/pmf/auto-mode.c
drivers/platform/x86/amd/pmf/core.c
drivers/platform/x86/amd/pmf/pmf.h