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: b84c5d0c81 ("drm/bridge: synopsys: dw-hdmi-qp: Only set extcon status when hdmi plug/unplug")

Change-Id: I7e7f3da2849ae4bb70d838281001a4ead2b7c03a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
This commit is contained in:
Algea Cao
2025-03-14 11:24:58 +08:00
committed by XiaoTan Luo
parent da87a99cf2
commit 48498c68b5

View File

@@ -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);