linux/include
Sean Paul 29eec2954c BACKPORT: drm: Add Content Protection property
This patch adds a new optional connector property to allow userspace to enable
protection over the content it is displaying. This will typically be implemented
by the driver using HDCP.

The property is a tri-state with the following values:
- OFF: Self explanatory, no content protection
- DESIRED: Userspace requests that the driver enable protection
- ENABLED: Once the driver has authenticated the link, it sets this value

The driver is responsible for downgrading ENABLED to DESIRED if the link becomes
unprotected. The driver should also maintain the desiredness of protection
across hotplug/dpms/suspend.

If this looks familiar, I posted [1] this 3 years ago. We have been using this
in ChromeOS across exynos, mediatek, and rockchip over that time.

Changes in v2:
 - Pimp kerneldoc for content_protection_property (Daniel)
 - Drop sysfs attribute
Changes in v3:
 - None
Changes in v4:
- Changed kerneldoc to recommend userspace polling (Daniel)
- Changed kerneldoc to briefly describe how to attach the property (Daniel)
Changes in v5:
- checkpatch whitespace noise
- Change DRM_MODE_CONTENT_PROTECTION_OFF to DRM_MODE_CONTENT_PROTECTION_UNDESIRED
Changes in v6:
- None

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>

[1] https://lists.freedesktop.org/archives/dri-devel/2014-December/073336.html
Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-4-seanpaul@chromium.org

(cherry picked from commit 24557865c8)
Signed-off-by: Sean Paul <seanpaul@chromium.org>

[downstream changes]
 - Fixed some conflicts in comments
- Remove duplicate definition for drm_get_content_protection_name

Change-Id: I825b4863bea715434cb8f76f99fdf6e3fca74a60
Reviewed-on: https://chromium-review.googlesource.com/849079
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Sean Paul <seanpaul@google.com>
Reviewed-by: Sean Paul <seanpaul@google.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-15 17:28:40 +08:00
..
acpi
asm-generic LSK 18.06 v4.4-android 2018-07-06 20:12:54 +08:00
clocksource
crypto UPSTREAM: crypto: hash - add zero length message hash for shax and md5 2018-05-24 11:44:00 +08:00
drm BACKPORT: drm: Add Content Protection property 2018-08-15 17:28:40 +08:00
dt-bindings clk: rockchip: rk3399: fix up some regs description error 2018-08-10 11:35:18 +08:00
keys
kvm
linux regulator: rk816: support rk816 ES2 chip 2018-08-08 18:21:46 +08:00
math-emu
media camera: rockchip: merge modification of rv1108 isp11 2018-07-25 14:52:52 +08:00
memory
misc
net LSK 18.07 v4.4-android 2018-08-03 10:09:13 +08:00
pcmcia
ras
rdma RDMA/ucma: Introduce safer rdma_addr_size() variants 2018-04-08 11:51:59 +02:00
rxrpc
scsi scsi: sg: disable SET_FORCE_LOW_DMA 2018-01-23 19:50:14 +01:00
soc soc: rockchip: opp_select: Limit minimum voltage when low temperature 2018-07-13 16:25:59 +08:00
sound ASoC: rockchip: vad: optimize vad process 2018-06-08 14:38:07 +08:00
target target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:35:31 +01:00
trace LSK 18.06 v4.4-android 2018-07-06 20:12:54 +08:00
uapi BACKPORT: drm: Add Content Protection property 2018-08-15 17:28:40 +08:00
video
xen
Kbuild