From ba0ad8623120f1d09a5a0b1d73eeb9e5200e94a0 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 1 Sep 2023 00:59:08 +0200
Subject: [PATCH 285/463] drm: bridge: dw-hdmi: Report HDMI hotplug events

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 4fd58d829c827..5ee318de2ef13 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2458,7 +2458,13 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi)
 	enum drm_connector_status result;
 
 	result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data);
-	hdmi->last_connector_result = result;
+
+	if (result != hdmi->last_connector_result) {
+		dev_info(hdmi->dev, "read_hpd result: %d", result);
+		handle_plugged_change(hdmi,
+				      result == connector_status_connected);
+		hdmi->last_connector_result = result;
+	}
 
 	return result;
 }
@@ -3141,7 +3147,7 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
 	}
 
 	if (status != connector_status_unknown && !hdmi->extcon) {
-		dev_dbg(hdmi->dev, "EVENT=%s\n",
+		dev_info(hdmi->dev, "EVENT=%s\n",
 			status == connector_status_connected ?
 			"plugin" : "plugout");
 
-- 
2.46.0

