From 48498c68b5da4c658d7c363dfbbfb6632ca1d324 Mon Sep 17 00:00:00 2001 From: Algea Cao Date: Fri, 14 Mar 2025 11:24:58 +0800 Subject: [PATCH] drm/bridge: synopsys: dw-hdmi-qp: Call handle_plugged_change() when hdmi plug Notify linux userspace hdmi has been plugged in or out and audio needs to be reset. Fixes: b84c5d0c819a ("drm/bridge: synopsys: dw-hdmi-qp: Only set extcon status when hdmi plug/unplug") Change-Id: I7e7f3da2849ae4bb70d838281001a4ead2b7c03a Signed-off-by: Algea Cao Signed-off-by: XiaoTan Luo --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c index 81c22c3b89be..88e612945a3b 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c @@ -2646,10 +2646,13 @@ dw_hdmi_connector_detect(struct drm_connector *connector, bool force) } out: - if (result == connector_status_connected) + if (result == connector_status_connected) { extcon_set_state_sync(hdmi->extcon, EXTCON_DISP_HDMI, true); - else + handle_plugged_change(hdmi, true); + } else { extcon_set_state_sync(hdmi->extcon, EXTCON_DISP_HDMI, false); + handle_plugged_change(hdmi, false); + } return result; } @@ -3577,7 +3580,6 @@ static void dw_hdmi_qp_bridge_atomic_disable(struct drm_bridge *bridge, dw_hdmi_qp_hdcp_disable(hdmi, conn_state); - handle_plugged_change(hdmi, false); if (hdmi->plat_data->crtc_pre_disable) hdmi->plat_data->crtc_pre_disable(data, bridge->encoder->crtc); mutex_lock(&hdmi->mutex); @@ -3661,8 +3663,6 @@ static void dw_hdmi_qp_bridge_atomic_enable(struct drm_bridge *bridge, dw_hdmi_qp_audio_enable(hdmi); hdmi_clk_regenerator_update_pixel_clock(hdmi); - handle_plugged_change(hdmi, true); - if (hdmi->panel) drm_panel_enable(hdmi->panel);