diff options
| author | Johan Hovold <[email protected]> | 2025-03-24 13:24:48 +0000 |
|---|---|---|
| committer | Bjorn Andersson <[email protected]> | 2025-05-09 22:12:55 +0000 |
| commit | 5090ac9191a19c61beeade60d3d839e509fab640 (patch) | |
| tree | 23ff554e6a0a43b807d421f29ca4a11dd44c731c /scripts/gcc-plugins/randomize_layout_plugin.c | |
| parent | soc: qcom: smp2p: Fix fallback to qcom,ipc parse (diff) | |
| download | kernel-5090ac9191a19c61beeade60d3d839e509fab640.tar.gz kernel-5090ac9191a19c61beeade60d3d839e509fab640.zip | |
soc: qcom: pmic_glink_altmode: fix spurious DP hotplug events
The PMIC GLINK driver is currently generating DisplayPort hotplug
notifications whenever something is connected to (or disconnected from)
a port regardless of the type of notification sent by the firmware.
These notifications are forwarded to user space by the DRM subsystem as
connector "change" uevents:
KERNEL[1556.223776] change /devices/platform/soc@0/ae00000.display-subsystem/ae01000.display-controller/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/platform/soc@0/ae00000.display-subsystem/ae01000.display-controller/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=36
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4176
MAJOR=226
MINOR=0
On the Lenovo ThinkPad X13s and T14s, the PMIC GLINK firmware sends two
identical notifications with orientation information when connecting a
charger, each generating a bogus DRM hotplug event. On the X13s, two
such notification are also sent every 90 seconds while a charger remains
connected, which again are forwarded to user space:
port = 1, svid = ff00, mode = 255, hpd_state = 0
payload = 01 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00
Note that the firmware only sends on of these when connecting an
ethernet adapter.
Fix the spurious hotplug events by only forwarding hotplug notifications
for the Type-C DisplayPort service id. This also reduces the number of
uevents from four to two when an actual DisplayPort altmode device is
connected:
port = 0, svid = ff01, mode = 2, hpd_state = 0
payload = 00 01 02 00 f2 0c 01 ff 03 00 00 00 00 00 00 00
port = 0, svid = ff01, mode = 2, hpd_state = 1
payload = 00 01 02 00 f2 0c 01 ff 43 00 00 00 00 00 00 00
Fixes: 080b4e24852b ("soc: qcom: pmic_glink: Introduce altmode support")
Cc: [email protected] # 6.3
Cc: Bjorn Andersson <[email protected]>
Reported-by: Clayton Craft <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Acked-by: Konrad Dybcio <[email protected]>
Tested-by: Clayton Craft <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions
