* How to Enable HDMI HDCP 1.4 Module


1. Driver Compile
Ensure below configures have been selected:

CONFIG_ROCKCHIP_DW_HDMI=y

Bellow drivers have been compiled:

drivers/gpu/drm/bridge/dw-hdmi.c
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c

2. DRM Property Setting
HDMI driver has created one DRM connector property "content_protection" for HDCP function. You could read the property by bellow command:

cat /sys/class/drm/card0-HDMI-A-1/content_protection
Undesired

That property has three kinds of values:
- "Undesired" means HDMI HDCP 1.4 function is disabled.
- "Desired" means HDMI driver is trying to enable the HDCP 1.4 function.
- "Enabled" means HDMI HDCP 1.4 function is enabled.

But you can't change the property value through that debugfs node, you need to write an userspace code to do that. Libdrm has implemented a series of helper function, but you just need to take card of the drmModeObjectSetProperty interfaces for now. The Libdrm source code has pretty much example code for this, I would suggest you have a good look at the modetest source code.

NOTE: Maybe I should paste a workable userspace example for that, just planning…

3. HDCP Key
HDMI driver has created a device attribute for receiving the encrypted HDCP key, you could access it at:

ls /sys/devices/platform/ff980000.hdmi/hdcp_key

I guess you're confused by the "encrypted HDCP key". Let me explain more, our HDMI controller could support hardware decrypt the HDCP key. That's to say, the user just needs to pass the encrypted HDCP key to the controller, so it would have a great help for reducing the risk of losing the original HDCP key. I would like to share the reference HDCP key encrypted flow at here.

But said to say, we can't release the encrypted binary at here. If you have to enable the HDCP function for HDMI, and already have the original HDCP 1.4 key. Please contact us directly.