From bbf4f15cd9fa1e8ca38da93042603505e4cd541a Mon Sep 17 00:00:00 2001 From: Zhibin Huang Date: Mon, 6 May 2024 20:08:03 +0800 Subject: [PATCH] drm/rockchip: dsi2: add connector polling connect/disconnect flags When the bridge code does not abstract a connector, and the bridge has connection status detection, the dsi abstract connector adds "DRM_CONNECTOR_POLL_CONNECT" and "DRM_CONNECTOR_POLL_DISCONNECT" flags for interface plugging and unplugging detection. Type: Function Redmine ID: N/A Associated modifications: N/A Test: N/A Signed-off-by: Zhibin Huang Change-Id: I58dcb9ade2846c73f489b0ebc9bf65947d7b6352 --- drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c index f14c47ddcdff..eef63ae34e43 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c @@ -1479,6 +1479,10 @@ static int dw_mipi_dsi2_bind(struct device *dev, struct device *master, if (ret) goto encoder_cleanup; + if (dsi2->bridge && (dsi2->bridge->ops & DRM_BRIDGE_OP_DETECT)) + dsi2->connector.polled = DRM_CONNECTOR_POLL_CONNECT | + DRM_CONNECTOR_POLL_DISCONNECT; + connector = &dsi2->connector; }