[PATCH v5 00/18] Add HPD support for Rockchip Analogix DP
Damon Ding
damon.ding at rock-chips.com
Thu Oct 29 03:18:11 PDT 2026
Hi Marek,
On 10/29/2026 4:29 PM, Marek Szyprowski wrote:
> On 27.10.2026 14:27, Damon Ding wrote:
>> This series improves the HPD (Hotplug Detect) interrupt handling in
>> the Analogix DP driver to enable reliable native HPD pin detection on
>> Rockchip platforms, and introduces platform-specific HPD detection
>> schemes with fine-grained interrupt control.
>>
>> On Rockchip platforms, the Analogix DP native HPD pin IRQ requires the
>> DP controller to remain powered, clocked and initialized to generate
>> plug/unplug interrupts. The previous driver enabled/disabled IRQ during
>> bridge enable/disable, which left no HPD detection when the display
>> pipeline was inactive. Additionally, the interrupt mute/unmute/clear
>> routines operated on all HPD interrupt bits unconditionally, lacking
>> the granularity needed for per-event control.
>>
>> The series reorganizes IRQ and pm_runtime management into bind/unbind,
>> adds IRQF_ONESHOT to eliminate read-modify-write races on interrupt
>> mask registers between hardirq and threaded handlers, converts the
>> interrupt type detection to a bitmask-based scheme for fine-grained
>> mute/unmute/clear operations, and configures Rockchip platforms to use
>> the HOTPLUG_CHG interrupt with a 2ms HPD deglitch setting for better
>> stability.
>>
>> Furthermore, the next bridge is now resolved into bridge->next_bridge
>> instead of the platform data field, the forced connected-status logic
>> is restricted to panel endpoints based on the bridge chain, and HPD
>> events from downstream bridges (e.g. display-connector with hpd-gpios)
>> are handled through the .hpd_notify callback.
>>
>> Tested on RK3576 with both native HPD pin and GPIO HPD configurations.
>>
>> Native HPD pin mode:
>>
>> &edp {
>> status = "okay";
>> pinctrl-names = "default";
>> pinctrl-0 = <&edp_txm0_pins>;
>> };
>>
>> GPIO HPD mode:
>>
>> &edp {
>> status = "okay";
>> pinctrl-names = "default";
>> pinctrl-0 = <&edp0_hpd>;
>> hpd-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>;
>> };
>>
>> &pinctrl {
>> edp {
>> edp0_hpd: edp0-hpd {
>> rockchip,pins = <4 RK_PC1 0 &pcfg_pull_none>;
>> };
>> };
>> };
>>
>> Display-connector mode (DP connector without HPD GPIO):
>>
>> &edp_out_conn {
>> remote-endpoint = <&dp_con_in>;
>> };
>>
>> dp-con {
>> compatible = "dp-connector";
>> label = "DP OUT";
>> type = "full-size";
>>
>> port {
>> dp_con_in: endpoint {
>> remote-endpoint = <&edp_out_conn>;
>> };
>> };
>> };
>>
>> Display-connector mode (DP connector with HPD GPIO):
>>
>> dp-con {
>> compatible = "dp-connector";
>> label = "DP OUT";
>> type = "full-size";
>> pinctrl-0 = <&edp0_hpd>;
>> pinctrl-names = "default";
>> hpd-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>;
>>
>> port {
>> dp_con_in: endpoint {
>> remote-endpoint = <&edp_out_conn>;
>> };
>> };
>> };
>>
>> All four configurations detect cable plug/unplug events correctly.
>
> Tested-by: Marek Szyprowski <m.szyprowski at samsung.com>
>
> Snow, Peach-Pit and Peach-Pi Chromebooks still work fine with this patchset.
>
Thanks for your testing and confirmation.
Best regards,
Damon
More information about the linux-arm-kernel
mailing list