Skip to content

Commit 01601fd

Browse files
superm1Jiri Kosina
authored andcommitted
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 <[email protected]> Tested-by: Anson Tsao <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 832ecb0 commit 01601fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int amd_sfh_hpd_info(u8 *user_present)
129129
if (!user_present)
130130
return -EINVAL;
131131

132-
if (!emp2 || !emp2->dev_en.is_hpd_present)
132+
if (!emp2 || !emp2->dev_en.is_hpd_present || !emp2->dev_en.is_hpd_enabled)
133133
return -ENODEV;
134134

135135
hpdstatus.val = readl(emp2->mmio + amd_get_c2p_val(emp2, 4));

0 commit comments

Comments
 (0)