From: Mario Limonciello Date: Fri, 28 Feb 2025 16:31:53 +0000 (-0600) Subject: HID: amd_sfh: Don't show wrong status for amd_sfh_hpd_info() X-Git-Tag: v6.15-rc1~171^2~14^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01601fdd40ecf4467c8ae4d215dbb7d2a0599a2c;p=thirdparty%2Flinux.git HID: amd_sfh: Don't show wrong status for amd_sfh_hpd_info() When HPD is present but has been disabled, avoid reporting HPD status to PMF. Cc: Pratap Nirujogi Tested-by: Anson Tsao Signed-off-by: Mario Limonciello Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c index ffb98b4c36cbd..837d59e7a6610 100644 --- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c +++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c @@ -129,7 +129,7 @@ static int amd_sfh_hpd_info(u8 *user_present) if (!user_present) return -EINVAL; - if (!emp2 || !emp2->dev_en.is_hpd_present) + if (!emp2 || !emp2->dev_en.is_hpd_present || !emp2->dev_en.is_hpd_enabled) return -ENODEV; hpdstatus.val = readl(emp2->mmio + amd_get_c2p_val(emp2, 4));