linux/drivers
Uma Shankar 6f72e5e9ea BACKPORT: drm: Add HDMI colorspace property
Create a new connector property to program colorspace to sink
devices. Modern sink devices support more than 1 type of
colorspace like 601, 709, BT2020 etc. This helps to switch
based on content type which is to be displayed. The decision
lies with compositors as to in which scenarios, a particular
colorspace will be picked.

This will be helpful mostly to switch to higher gamut colorspaces
like BT2020 when the media content is encoded as BT2020. Thereby
giving a good visual experience to users.

The expectation from userspace is that it should parse the EDID
and get supported colorspaces. Use this property and switch to the
one supported. Sink supported colorspaces should be retrieved by
userspace from EDID and driver will not explicitly expose them.

Basically the expectation from userspace is:
 - Set up CRTC DEGAMMA/CTM/GAMMA to convert to some sink
   colorspace
 - Set this new property to let the sink know what it
   converted the CRTC output to.

v2: Addressed Maarten and Ville's review comments. Enhanced
the colorspace enum to incorporate both HDMI and DP supported
colorspaces. Also, added a default option for colorspace.

v3: Removed Adobe references from enum definitions as per
Ville, Hans Verkuil and Jonas Karlman suggestions. Changed
Default to an unset state where driver will assign the colorspace
is not chosen by user, suggested by Ville and Maarten. Addressed
other misc review comments from Maarten. Split the changes to
have separate colorspace property for DP and HDMI.

v4: Addressed Chris and Ville's review comments, and created a
common colorspace property for DP and HDMI, filtered the list
based on the colorspaces supported by the respective protocol
standard.

v5: Made the property creation helper accept enum list based on
platform capabilties as suggested by Shashank. Consolidated HDMI
and DP property creation in the common helper.

v6: Addressed Shashank's review comments.

v7: Added defines instead of enum in uapi as per Brian Starkey's
suggestion in order to go with string matching at userspace. Updated
the commit message to add more details as well kernel docs.

v8: Addressed Maarten's review comments.

v9: Removed macro defines from uapi as per Brian Starkey and Daniel
Stone's comments and moved to drm include file. Moved back to older
design with exposing all HDMI colorspaces to userspace since infoframe
capability is there even on legacy platforms, as per Ville's review
comments.

v10: Fixed sparse warnings, updated the RB from Maarten and Jani's ack.

v11: Addressed Ville's review comments. Updated the Macro naming and
added DCI-P3 colorspace as well, defined in CTA 861.G spec.

v12: Appended BT709 and SMPTE 170M with YCC information as per Ville's
review comment to be clear and not to be confused with RGB.

v13: Reorder the colorspace macros.

v14: Removed DP as of now, will be added later once full support is
enabled, as per Ville's suggestion. Added Ville's RB.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1550596381-993-2-git-send-email-uma.shankar@intel.com
(cherry picked from commit d2c6a40584)
[adelva: drm_atomic_uapi.c -> drm_atomic.c as part of 4.19 backport]
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I3f0ed13c513efc5d77f458d98f820d071a8a3a09
2020-04-16 00:19:31 +00:00
..
accessibility
acpi This is the 4.19.113 stable release 2020-03-25 09:50:38 +01:00
amba
android UPSTREAM: binder: prevent UAF for binderfs devices II 2020-03-09 19:48:21 +00:00
ata ahci: Add Intel Comet Lake H RAID PCI ID 2020-04-02 15:28:21 +02:00
atm fore200e: Fix incorrect checks of NULL pointer dereference 2020-02-24 08:34:42 +01:00
auxdisplay
base ANDROID: GKI: export symbols from abi_gki_aarch64_qcom_whitelist 2020-04-13 21:36:41 +00:00
bcma bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA 2020-01-27 14:51:09 +01:00
block UPSTREAM: loop: Only freeze block queue when needed. 2020-04-04 16:33:15 +00:00
bluetooth Bluetooth: btusb: fix PM leak in error case of setup 2020-01-09 10:19:04 +01:00
bus bus: ti-sysc: Fix sysc_unprepare() when no clocks have been allocated 2020-01-27 14:50:36 +01:00
cdrom cdrom: respect device capabilities during opening action 2020-01-04 19:13:12 +01:00
char This is the 4.19.115 stable release 2020-04-13 13:09:17 +02:00
clk This is the 4.19.115 stable release 2020-04-13 13:09:17 +02:00
clocksource ANDROID: GKI: export symbols from abi_gki_aarch64_qcom_whitelist 2020-04-13 21:36:41 +00:00
connector
cpufreq This is the 4.19.99 stable release 2020-01-27 15:55:44 +01:00
cpuidle ANDROID: GKI: export symbols from abi_gki_aarch64_qcom_whitelist 2020-04-13 21:36:41 +00:00
crypto ANDROID: Removed default m for virtual sw crypto device 2020-03-03 14:26:54 -08:00
dax
dca
devfreq ANDROID: GKI: PM/devfreq: Do not switch governors from sysfs when device is suspended 2020-04-08 00:21:28 -07:00
dio
dma dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() 2020-03-11 14:15:12 +01:00
dma-buf ANDROID: GKI: add dma-buf includes 2020-04-14 10:23:15 -07:00
edac ANDROID: GKI: edac: Fix ABI diffs in edac_device_ctl_info struct 2020-04-02 23:21:22 +00:00
eisa
energy_model
extcon This is the 4.19.115 stable release 2020-04-13 13:09:17 +02:00
firewire net: add annotations on hh->hh_len lockless accesses 2020-01-09 10:19:09 +01:00
firmware This is the 4.19.112 stable release 2020-03-21 08:37:27 +01:00
fmc
fpga
fsi fsi: sbefifo: Don't fail operations when in SBE IPL state 2020-01-27 14:51:00 +01:00
gnss ANDROID: gnss: Add command line test driver 2019-12-19 22:51:54 +00:00
gpio This is the 4.19.114 stable release 2020-04-03 08:17:23 +02:00
gpu BACKPORT: drm: Add HDMI colorspace property 2020-04-16 00:19:31 +00:00
hid This is the 4.19.112 stable release 2020-03-21 08:37:27 +01:00
hsi
hv hv_balloon: Balloon up according to request page number 2020-02-11 04:34:01 -08:00
hwmon ANDROID: GKI: pwm: core: Add option to config PWM duty/period with u64 data length 2020-04-03 15:23:59 -07:00
hwspinlock
hwtracing UPSTREAM: coresight: Potential uninitialized variable in probe() 2020-03-27 02:11:00 +00:00
i2c This is the 4.19.114 stable release 2020-04-03 08:17:23 +02:00
ide ide: serverworks: potential overflow in svwks_set_pio_mode() 2020-02-24 08:34:49 +01:00
idle
iio This is the 4.19.113 stable release 2020-03-25 09:50:38 +01:00
infiniband This is the 4.19.115 stable release 2020-04-13 13:09:17 +02:00
input This is the 4.19.114 stable release 2020-04-03 08:17:23 +02:00
iommu ANDROID: GKI: add missing exports for CONFIG_ARM_SMMU=m 2020-04-09 17:03:10 +00:00
ipack
irqchip ANDROID: power: wakeup_reason: wake reason enhancements 2020-04-09 15:27:37 +00:00
isdn staging: gigaset: add endpoint-type sanity check 2019-12-17 20:34:33 +01:00
leds leds: pca963x: Fix open-drain initialization 2020-02-24 08:34:35 +01:00
lightnvm lightnvm: pblk: fix lock order in pblk_rb_tear_down_check 2020-01-27 14:50:45 +01:00
macintosh macintosh: windfarm: fix MODINFO regression 2020-03-18 07:14:21 +01:00
mailbox mailbox: qcom-apcs: fix max_register value 2020-01-27 14:51:14 +01:00
mcb
md ANDROID: block: require drivers to declare supported crypto key type(s) 2020-04-07 17:57:33 +00:00
media This is the 4.19.115 stable release 2020-04-13 13:09:17 +02:00
memory memory: tegra: Don't invoke Tegra30+ specific memory timing setup on Tegra20 2020-01-27 14:50:13 +01:00
memstick
message scsi: mptfusion: Fix double fetch bug in ioctl 2020-01-23 08:21:28 +01:00
mfd mfd: rn5t618: Mark ADC control register volatile 2020-02-11 04:34:14 -08:00
misc This is the 4.19.115 stable release 2020-04-13 13:09:17 +02:00
mmc This is the 4.19.114 stable release 2020-04-03 08:17:23 +02:00
mtd mtd: sharpslpart: Fix unsigned comparison to zero 2020-02-14 16:33:27 -05:00
mux
net This is the 4.19.115 stable release 2020-04-13 13:09:17 +02:00
nfc NFC: fdp: Fix a signedness bug in fdp_nci_send_patch() 2020-04-02 15:28:12 +02:00
ntb ntb_hw_switchtec: potential shift wrapping bug in switchtec_ntb_init_sndev() 2020-01-27 14:50:55 +01:00
nubus
nvdimm UPSTREAM: virtio-pmem: Add virtio pmem driver 2020-01-26 19:04:57 +00:00
nvme nvme-rdma: Avoid double freeing of async event data 2020-04-13 10:44:58 +02:00
nvmem BACKPORT: nvmem: core: fix regression in of_nvmem_cell_get() 2020-02-24 11:38:01 -08:00
of ANDROID: GKI: fdt: export symbols required by modules 2020-04-13 23:33:52 +00:00
opp This is the 4.19.99 stable release 2020-01-27 15:55:44 +01:00
oprofile
parisc
parport parport: load lowlevel driver if ports not found 2019-12-31 16:36:01 +01:00
pci ANDROID: GKI: add missing exports for CONFIG_ARM_SMMU=m 2020-04-09 17:03:10 +00:00
pcmcia
perf drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer 2020-03-25 08:06:07 +01:00
phy phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval 2020-03-11 14:15:10 +01:00
pinctrl pinctrl: core: Remove extra kref_get which blocks hogs being freed 2020-03-18 07:14:23 +01:00
platform This is the 4.19.114 stable release 2020-04-03 08:17:23 +02:00
pnp
power ANDROID: GKI: power_supply: Add PROP_MOISTURE_DETECTION_ENABLED 2020-04-15 19:12:25 +00:00
powercap
pps
ps3
ptp ptp: free ptp device pin descriptors properly 2020-01-23 08:21:35 +01:00
pwm ANDROID: GKI: pwm: core: Add option to config PWM duty/period with u64 data length 2020-04-03 15:23:59 -07:00
rapidio drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen() 2020-01-27 14:50:31 +01:00
ras
regulator ANDROID: GKI: regulator: core: Add support for regulator providers with sync state 2020-04-02 16:27:12 -07:00
remoteproc remoteproc: Initialize rproc_class before use 2020-02-24 08:34:50 +01:00
reset reset: uniphier: Add SCSSI reset control for each channel 2020-02-24 08:34:44 +01:00
rpmsg rpmsg: glink: Remove chunk size word align warning 2020-04-13 10:45:16 +02:00
rtc This is the 4.19.113 stable release 2020-03-25 09:50:38 +01:00
s390 s390/qeth: handle error when backing RX buffer 2020-04-02 15:28:15 +02:00
sbus
scsi ANDROID: block: require drivers to declare supported crypto key type(s) 2020-04-07 17:57:33 +00:00
sfi
sh
siox
slimbus slimbus: ngd: Fix build error on x86 2019-12-13 08:51:54 +01:00
sn
soc This is the 4.19.108 stable release 2020-03-05 17:40:55 +01:00
soundwire soundwire: intel: fix PDI/stream mapping for Bulk 2019-12-31 16:35:55 +01:00
spi This is the 4.19.113 stable release 2020-03-25 09:50:38 +01:00
spmi
ssb
staging This is the 4.19.114 stable release 2020-04-03 08:17:23 +02:00
target scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" 2020-02-28 16:38:58 +01:00
tc
tee This is the 4.19.102 stable release 2020-02-05 19:20:26 +00:00
thermal UPSTREAM: GKI: thermal: make device_register's type argument const 2020-04-13 17:46:47 -07:00
thunderbolt thunderbolt: Prevent crash if non-active NVMem file is read 2020-02-28 16:38:44 +01:00
tty This is the 4.19.114 stable release 2020-04-03 08:17:23 +02:00
uio uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol() 2020-02-24 08:34:37 +01:00
usb ANDROID: GKI: USB: Fix ABI diff for struct usb_bus 2020-04-13 22:13:50 +00:00
uwb
vfio This is the 4.19.99 stable release 2020-01-27 15:55:44 +01:00
vhost This is the 4.19.108 stable release 2020-03-05 17:40:55 +01:00
video fbcon: fix null-ptr-deref in fbcon_switch 2020-04-13 10:45:14 +02:00
virt
virtio ANDROID: Re-add default y for VIRTIO_PCI_LEGACY 2020-03-03 23:28:01 +00:00
visorbus visorbus: fix uninitialized variable access 2020-02-24 08:34:47 +01:00
vlynq
vme vme: bridges: reduce stack usage 2020-02-24 08:34:47 +01:00
w1
watchdog watchdog: da9062: do not ping the hw during stop() 2020-03-11 14:14:53 +01:00
xen xenbus: req->err should be updated before req->state 2020-03-25 08:06:08 +01:00
zorro
Kconfig
Makefile