HDMI 之 HPD .

HPD(Hot Plug Detection),在HDMI的一对联接中,为热插拔的实现而设计的。简单地说,当发送端接入接受端时,接受端会回应HPD信号给发送端,进而发送端会启动DDC通道,而读取接受端EDID的信息,然后进行HDCP的交互,如果双方认证成功,则视频、音频正常工作,否则联接失败,不同系统会有不同的处理。

    例如,如果EDID信息不支持HDMI,则发送端只发送视频信息,而没有音频信息,这时候的HDMI就只相当于DVI了;如果HDCP认证不成功,有的系统会出现雪花屏幕和噪音,有的系统会由高分辨率(1080I、720P)降低为低分辨率(480I、480P)而输出,这样一来,HDTV就不再是HD了,而变成了普通的SD。

    An Important element to proper interpretation of EDID is "Hot Plugging". The following presents a recommendation for achieving consistent results during a Hot Plugging event.

    DVI 1.0 define a HPD signal function that indicates to the host whether a  monitor is connected. HPD is designed to be powered by the DDC +5V coming from the host, and to be independaent of whether the monitor is powered or not. In this way, a host device can detect the monitor and read its characteristics from EDID without the monitor being powered. On a PC, this feature allows the system to load the correct display configuration without delaying the boot process.

    In short, in this context, HPD serves as an indication that the EDID is available to be read, however HPD may also have alternative uses. It does no imply any other state of readiness. The relevant definitions from the DVI 1.0 specification are:

    a. HPD - Signal is driven by monitor to enable the system to identify the presence of a monitor;

    b. The monitor is required to provide a voltage of greater than +2.4V on the HPD pin of the connector only when the EDID data structure is available to be read by the host.

    Implementation Notes: As an example for hot plug support, a simple monitor implementation of HPD support could be a pull up resistor to the EDID power supply. After HPD goes active, the host is only expected to read EDID and determine that a valid display mode is available and supported.

    Note --- Whenever the EDID information in a device changes for any reason(e.g. if the EDID was updated, or is capable of dynamically changing its information content), the receiving device pulses HPD low for at least 100ms. This recommendation follows from the HDCP repeater implementation requirement that HDCP repeater pulse HPD low for at least 100ms to indicate the connection of new device or disconnection of an existing one.

    这里只是概要的谈谈,后续将会对其联系EDID和HDCP详述

 

 

原文连接:http://blog.youkuaiyun.com/yanzheng1113/article/details/7174513

### RK3588 HDMI HPD 自定义配置方法 在 RK3588 芯片上实现 HDMI 的热插拔检测 (Hot Plug Detect, HPD) 功能,通常需要通过设备树 (Device Tree) 进行相应的 GPIO 配置以及驱动程序的支持。以下是具体的配置方式: #### 1. 设备树中的 HPD 配置 在设备树中,HDMI 接口的相关节点可以通过 `hpd-gpios` 属性来指定用于热插拔检测的 GPIO 引脚。以下是一个典型的设备树片段示例[^2]: ```dts &hdmi { pinctrl-names = "default"; pinctrl-0 = <&hdmi_hpd_pins>; // 定义 HPD 引脚的 pin 控制 hpd-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; // 假设 GPIO0_12 是分配给 HPD 的引脚 status = "okay"; ports { port@0 { reg = <0>; hdmi_out: endpoint { remote-endpoint = <&display_in>; }; }; }; }; ``` 在此配置中: - **`pinctrl-0`**: 指定 HPD 引脚的 Pin 控制组。 - **`hpd-gpios`**: 明确指定了哪个 GPIO 引脚被用来作为 HPD 输入信号。 #### 2. Pin 控制配置 Pin 控制的具体设置可以在 `.dtsi` 文件中完成。例如,在 Rockchip 提供的标准文件 `rockchip-pinconf.dtsi` 中可以找到类似的定义[^4]: ```dts hdmi_hpd_pins: hdmi-hpd-pins { pins = "GPIO0_12"; // 对应于上面使用的 GPIO0_12 function = "hdmi_hpd"; // 设置该引脚的功能为 HDMI HPD bias-disable; drive-strength = <4>; // 设置驱动强度为 4mA }; ``` 此部分确保了硬件层面的正确初始化,并使能了特定的 GPIO 引脚作为 HPD 使用。 #### 3. 驱动支持 除了设备树外,还需要确认内核驱动是否能够正常处理 HPD 事件。对于 RK3588 来说,其 DRM/DW-HDMI 驱动已经集成了基本的 HPD 处理逻辑[^3]。核心函数如下: - **`dw_hdmi_rockchip_probe()`**: 初始化过程中会调用 `pm_runtime_enable()` 和 `component_add()` 函数以注册组件并启用电源管理。 - **`dw_hdmi_rockchip_bind()`**: 绑定时进一步绑定 DRM 输出接口与 HDMI PHY。 如果默认行为不满足需求,则可能需要修改驱动源码以适配特殊场景下的 HPD 行为。 --- ### 总结 为了在 RK3588 上自定义 HDMIHPD 功能,主要涉及以下几个方面的工作: 1. 在设备树中明确指定 HPD 所需的 GPIO 引脚及其属性; 2. 利用 Pin 控制机制调整对应的电气特性; 3. 确认底层驱动已具备完善的 HPD 支持能力。 以上操作完成后即可实现对连接状态变化的有效监测。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值