DRM database property: Content Protection

Back to index

Details

Name
Content Protection
Flags
<none>
Type
enum
Attached to
connector
Specification
{"Undesired", "Desired", "Enabled"}

Documentation

This property is used by userspace to request the kernel protect future
content communicated over the link. When requested, kernel will apply
the appropriate means of protection (most often HDCP), and use the
property to tell userspace the protection is active.

Drivers can set this up by calling
drm_connector_attach_content_protection_property() on initialization.

The value of this property can be one of the following:

DRM_MODE_CONTENT_PROTECTION_UNDESIRED = 0
	The link is not protected, content is transmitted in the clear.
DRM_MODE_CONTENT_PROTECTION_DESIRED = 1
	Userspace has requested content protection, but the link is not
	currently protected. When in this state, kernel should enable
	Content Protection as soon as possible.
DRM_MODE_CONTENT_PROTECTION_ENABLED = 2
	Userspace has requested content protection, and the link is
	protected. Only the driver can set the property to this value.
	If userspace attempts to set to ENABLED, kernel will return
	-EINVAL.

A few guidelines:

- DESIRED state should be preserved until userspace de-asserts it by
  setting the property to UNDESIRED. This means ENABLED should only
  transition to UNDESIRED when the user explicitly requests it.
- If the state is DESIRED, kernel should attempt to re-authenticate the
  link whenever possible. This includes across disable/enable, dpms,
  hotplug, downstream device changes, link status failures, etc..
- Kernel sends uevent with the connector id and property id through
  @drm_hdcp_update_content_protection, upon below kernel triggered
  scenarios:

	- DESIRED -> ENABLED (authentication success)
	- ENABLED -> DESIRED (termination of authentication)
- Please note no uevents for userspace triggered property state changes,
  which can't fail such as

	- DESIRED/ENABLED -> UNDESIRED
	- UNDESIRED -> DESIRED
- Userspace is responsible for polling the property or listen to uevents
  to determine when the value transitions from ENABLED to DESIRED.
  This signifies the link is no longer protected and userspace should
  take appropriate action (whatever that might be).

Driver support

adp
amdgpu
apple
ast
bochs-drm
drm-rp1-dsi
evdi
exynos
gma500
i915
imx-dcss
imx-drm
imx-lcdif
kirin
mediatek
meson
msm
mxsfb-drm
nouveau
nvidia-drm
omapdrm
panel-mipi-dbi
pvr
qxl
radeon
rcar-du
rockchip
simpledrm
starfive
sun4i-drm
tegra
tilcdc
vboxvideo
vc4
virtio_gpu
vkms
vmwgfx
xe
xlnx