From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=47.88.81.166 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796039601; b=TT0Fi0AEJJzoKrS3W/ZAnUWZk93jr0C79Vl/xNY64UR3TBtNjked0RHMpaVMepzC5Za3 GztyLeYCIA3yoRRhMwSIeSj6fhSogcRA6kfMQV/a0cTWDSDaaLw32odJSsHyIqOsWTKH1 StHF7Np+jemQjpzQ/IxswMWq+BcgOzJjMcTvD+zNzyPl89BCEyq6rlk+s/Nw+1AraECRi HI3neSCbzeEzW4tE8B2qkAcSCqiLkrXp0Y06L3UjBavNhnQCSfJAWPURglPuE8lxksq2r FReWMtwch4rEIyYx0tctCftS0lBf9zesr2eEg8KIzT9gNjvZGgdVLDxIfmEiannJYsw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796039601; h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: X-HM-Tid:X-HM-MType:X-HM-Spam-Status:DKIM-Signature; bh=/xdTf3GUmj9u+M5UA7reAQxdJHpPAGu5DLcUdALEYXc=; b=vlQTu8H/FEQ4hULHucxZ7vQoV+9O5m67JvfrFNsCqZi2utHU5r1IFmwpl2aPps3UbwNK Qmf3GsnDXyBDnlRC2urSvjsfk2fR5aE8rxVT4CyLh81xT7Db0LChMBhWcqaW1UVIh+czo vvfEXAUF83ycw2HRHphvOA8jy2xXzo+GtH7qX1hexEARfoampIbYNl066oq2Zk8mebckd X9sGqgbhEa3/uRSwxSZTiVgdu6rtOUZjadfX/XcL+LU4Z7rv4nnKg5oqchDXjQQ5LXsCn XLIUugQq4/8P/hVVjq2eUxKnogED/AL67wQE121m0uWiY+yFxUdvN4xIuHzJTDSPqvQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=rock-chips.com; spf=pass smtp.mailfrom=rock-chips.com; dkim=pass header.d=rock-chips.com header.i=@rock-chips.com header.a=rsa-sha256 header.s=default header.b=gqWw9CEs; arc=none smtp.remote-ip=47.88.81.166 Received: from mail-m81166.netease.com (mail-m81166.netease.com [47.88.81.166]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35CC360A6F75; Mon, 30 Nov 2026 11:53:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 35CC360A6F75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.a=rsa-sha256 header.s=default header.b=gqWw9CEs Received: from zyb-HP-ProDesk-680-G2-MT.. (unknown [61.154.14.86]) by smtp.qiye.163.com (Hmail) with ESMTP id 568433e6a; Mon, 30 Nov 2026 19:53:05 +0800 (GMT+08:00) From: Damon Ding To: Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jingoo Han , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Peter Griffin , Alim Akhtar , Heiko Stuebner , Sandy Huang , Andy Yan Cc: Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Dmitry Baryshkov , Marek Szyprowski , Chaoyi Chen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, Damon Ding Subject: [PATCH v8 18/20] drm/bridge: analogix_dp: Declare DRM_BRIDGE_OP_HPD for hotplug reporting Date: Mon, 30 Nov 2026 19:51:50 +0800 Message-Id: <20261130115152.1797928-19-damon.ding@rock-chips.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261130115152.1797928-1-damon.ding@rock-chips.com> References: <20261130115152.1797928-1-damon.ding@rock-chips.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Tid: 0aa22c4d30c403a8kunm7cbe3259a518ad X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlDSxhJVkJIThpMGksdSUoeTFYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlNSlVKTk9VSk9VQ01ZV1kWGg8SFR0UWUFZT0tIVUpLSE pKQk1VSktLVUpCWQY+ DKIM-Signature: a=rsa-sha256; b=gqWw9CEsTgGhRr7HgwC3H0Bj/ALEZSXroRqHftE2ngUXFS/G//0tNaA9Y9/66iNcn7DZALyeVUlm01XeKjt4wZeEe5Ka8oSfBT8kXE0K7zqxVnHhNfh/Jq1GXofkRyM95nMe4DPUmF5fyIg+ctaC3LkjxYi8BKeWTQHejxDyOGk=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=/xdTf3GUmj9u+M5UA7reAQxdJHpPAGu5DLcUdALEYXc=; h=date:mime-version:subject:message-id:from; This commit declares DRM_BRIDGE_OP_HPD for the analogix_dp bridge, adds the hpd_enable/hpd_disable bridge callbacks and reports the hotplug events through drm_bridge_hpd_notify() with the status read from the HPD GPIO pin or the controller registers. The DRM_BRIDGE_OP_HPD capability is declared only for the platforms which support hotplug detection (the GPIO HPD mode, or the native HPD mode on RK3576 and RK3588), since the drm core stops polling the connector once DRM_BRIDGE_OP_HPD is declared. Signed-off-by: Damon Ding --- Changes in v6: - Declare DRM_BRIDGE_OP_HPD only for the platforms which support hotplug detection, since the drm core stops polling the connector once DRM_BRIDGE_OP_HPD is declared. (Sashiko) - Add Tested-by tag. Changes in v7: - Set the bridge ops after the chain is attached, as the DRM_BRIDGE_OP_HPD declaration previously preceded the force_connected_mode initialization, leaving the hotplug detection broken on fixed panels with a wired HPD GPIO. (Sashiko) - Drop the Tested-by tags, as the design of this patch changed significantly in this version. --- .../drm/bridge/analogix/analogix_dp_core.c | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index a48f8f3726da..dcec2ac7508a 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -31,7 +31,6 @@ #include #include #include -#include #include