2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/platform/x86/amd
Shyam Sundar S K 78296429e2
platform/x86/amd/pmf: Fix to Update HPD Data When ALS is Disabled
If the Ambient Light Sensor (ALS) is disabled, the current code in the PMF
driver does not query for Human Presence Detection (HPD) data in
amd_pmf_get_sensor_info(). As a result, stale HPD data is used by PMF-TA
to evaluate policy conditions, leading to unexpected behavior in the policy
output actions.

To resolve this issue, modify the PMF driver to query HPD data
independently of ALS.

Since user_present is a boolean, modify the current code to return true if
the user is present and false if the user is away or if the sensor is not
detected, and report this status to the PMF TA firmware accordingly.

With this change, amd_pmf_get_sensor_info() now returns void instead of
int.

Fixes: cedecdba60 ("platform/x86/amd/pmf: Get ambient light information from AMD SFH driver")
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20240730142316.3846259-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-08-08 14:53:35 +03:00
..
pmc platform/x86/amd/pmc: Send OS_HINT command for new AMD platform 2024-07-30 15:33:46 +03:00
pmf platform/x86/amd/pmf: Fix to Update HPD Data When ALS is Disabled 2024-08-08 14:53:35 +03:00
hsmp.c platform/x86/amd/hsmp: Check HSMP support on AMD family of processors 2024-06-03 11:57:28 +02:00
Kconfig platform/x86/amd/hsmp: Add support for ACPI based probing 2024-01-31 10:30:48 +02:00
Makefile platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature 2023-12-11 11:33:44 +01:00
wbrf.c platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature 2023-12-11 11:33:44 +01:00