The DisplayPort standard defines a special kind of HPD events called
IRQ_HPD. These events are used to notify DP Source about the events on
the Sink side, for example DP MST events.

Let the MSM DisplayPort driver properly track and handle IRQ_HPD
delivered over the OOB events (e.g. from the USB-C AltMode handler).

Reviewed-by: Pengyu Luo <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
b/drivers/gpu/drm/msm/dp/dp_display.c
index ce919a26fba2..771c8b0744ae 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1566,11 +1566,13 @@ void msm_dp_bridge_hpd_notify(struct drm_bridge *bridge,
                if (hpd_link_status == ISR_HPD_REPLUG_COUNT) {
                        msm_dp_hpd_unplug_handle(dp);
                        msm_dp_hpd_plug_handle(dp);
-               } else if (hpd_link_status == ISR_IRQ_HPD_PULSE_COUNT) {
-                       msm_dp_irq_hpd_handle(dp);
                } else {
                        msm_dp_hpd_plug_handle(dp);
                }
+
+               if (hpd_link_status == ISR_IRQ_HPD_PULSE_COUNT ||
+                   event == DRM_CONNECTOR_DP_IRQ_HPD)
+                       msm_dp_irq_hpd_handle(dp);
        } else {
                msm_dp_hpd_unplug_handle(dp);
        }

-- 
2.47.3

Reply via email to