Patch "drm: bridge: dw_hdmi: only trigger hotplug event on link change" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm: bridge: dw_hdmi: only trigger hotplug event on link change

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-bridge-dw_hdmi-only-trigger-hotplug-event-on-lin.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c31a6899a0265e5443a22a0a6b9373dd6206cd60
Author: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
Date:   Fri Aug 26 20:57:33 2022 +0200

    drm: bridge: dw_hdmi: only trigger hotplug event on link change
    
    [ Upstream commit da09daf881082266e4075657fac53c7966de8e4d ]
    
    There are two events that signal a real change of the link state: HPD going
    high means the sink is newly connected or wants the source to re-read the
    EDID, RX sense going low is a indication that the link has been disconnected.
    
    Ignore the other two events that also trigger interrupts, but don't need
    immediate attention: HPD going low does not necessarily mean the link has
    been lost and should not trigger a immediate read of the status. RX sense
    going high also does not require a detect cycle, as HPD going high is the
    right point in time to read the EDID.
    
    Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
    Reviewed-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx> (v1)
    Reviewed-by: Robert Foss <robert.foss@xxxxxxxxxx>
    Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220826185733.3213248-1-l.stach@xxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 25d58dcfc87e..d3129a3e6ab7 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2970,6 +2970,7 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
 {
 	struct dw_hdmi *hdmi = dev_id;
 	u8 intr_stat, phy_int_pol, phy_pol_mask, phy_stat;
+	enum drm_connector_status status = connector_status_unknown;
 
 	intr_stat = hdmi_readb(hdmi, HDMI_IH_PHY_STAT0);
 	phy_int_pol = hdmi_readb(hdmi, HDMI_PHY_POL0);
@@ -3008,13 +3009,15 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
 			cec_notifier_phys_addr_invalidate(hdmi->cec_notifier);
 			mutex_unlock(&hdmi->cec_notifier_mutex);
 		}
-	}
 
-	if (intr_stat & HDMI_IH_PHY_STAT0_HPD) {
-		enum drm_connector_status status = phy_int_pol & HDMI_PHY_HPD
-						 ? connector_status_connected
-						 : connector_status_disconnected;
+		if (phy_stat & HDMI_PHY_HPD)
+			status = connector_status_connected;
+
+		if (!(phy_stat & (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE)))
+			status = connector_status_disconnected;
+	}
 
+	if (status != connector_status_unknown) {
 		dev_dbg(hdmi->dev, "EVENT=%s\n",
 			status == connector_status_connected ?
 			"plugin" : "plugout");



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux