linux/include/drm
Uma Shankar d2c6a40584 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
2019-02-19 18:50:55 +01:00
..
bridge drm/bridge: dw-hdmi: Add SCDC and TMDS Scrambling support 2019-02-01 13:15:07 +01:00
i2c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tinydrm drm/tinydrm: Use damage helper for dirtyfb 2019-01-17 10:57:15 +01:00
ttm Merge drm/drm-next into drm-misc-next 2019-02-11 10:35:35 +01:00
amd_asic_type.h drm/amdgpu: simplify Raven, Raven2, and Picasso handling 2018-09-14 09:38:03 -05:00
ati_pcigart.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_agpsupport.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_atomic_helper.h drm: Fix up drm_atomic_state_helper.[hc] extraction 2018-11-30 16:37:52 +01:00
drm_atomic_state_helper.h drm: Fix up drm_atomic_state_helper.[hc] extraction 2018-11-30 16:37:52 +01:00
drm_atomic_uapi.h drm: extract drm_atomic_uapi.c 2018-09-09 14:19:18 +02:00
drm_atomic.h drm/atomic: Add drm_atomic_state->duplicated 2019-02-05 18:19:00 -05:00
drm_audio_component.h ALSA: hda: Make audio component support more generic 2018-07-17 22:25:48 +02:00
drm_auth.h
drm_blend.h drm: Add per-plane pixel blend mode property 2018-08-24 17:31:37 +01:00
drm_bridge.h drm: bridge: Constify mode arguments to bridge .mode_set() operation 2019-01-14 03:51:14 +02:00
drm_cache.h drm: disable uncached DMA optimization for ARM and arm64 2019-02-06 19:32:30 +01:00
drm_client.h drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_color_mgmt.h drm: Constify drm_color_lut_check() 2019-01-29 23:26:12 +02:00
drm_connector.h drm: Add HDMI colorspace property 2019-02-19 18:50:55 +01:00
drm_crtc_helper.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_crtc.h drm: Move the legacy kms disable_all helper to crtc helpers 2019-01-11 22:54:29 +01:00
drm_damage_helper.h drm/damage-helper: Add drm_atomic_helper_damage_merged() 2019-01-17 10:56:54 +01:00
drm_debugfs_crc.h drm/crc: Only report a single overflow when a CRC fd is opened 2018-07-06 14:57:03 +02:00
drm_debugfs.h
drm_device.h drm/vblank: Allow dynamic per-crtc max_vblank_count 2019-01-14 21:23:55 +02:00
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm/dsc: Add kernel documentation for DRM DP DSC helpers 2019-02-08 13:38:51 -08:00
drm_dp_mst_helper.h Linux 5.0-rc7 2019-02-18 13:27:15 +10:00
drm_drv.h drm/irq: Ditch DRIVER_IRQ_SHARED 2019-01-29 15:45:21 +01:00
drm_dsc.h drm/dsc: Add kernel documentation for DRM DP DSC helpers 2019-02-08 13:38:51 -08:00
drm_edid.h drm/edid: Add display_info.rgb_quant_range_selectable 2019-01-10 19:01:06 +02:00
drm_encoder_slave.h drm: remove include of drmP.h from drm_encoder_slave.h 2019-01-09 22:35:35 +01:00
drm_encoder.h drm: Add drm/drm_util.h header file 2018-09-09 14:18:11 +02:00
drm_fb_cma_helper.h drm/cma-helper: Remove unused fbdev code 2019-01-17 10:56:38 +01:00
drm_fb_helper.h drm/fb-helper: document remove*_conflicting_framebuffers() 2018-09-07 22:07:49 +02:00
drm_file.h drm: include idr.h from drm_file.h 2019-01-02 11:37:56 +02:00
drm_fixed.h
drm_flip_work.h
drm_fourcc.h drm/fourcc: Add format info helpers for checking YUV sub-sampling 2019-01-18 19:00:18 +01:00
drm_framebuffer.h drm: make drm_framebuffer.h self contained 2019-01-09 22:11:28 +01:00
drm_gem_cma_helper.h drm: remove drmP.h from drm_gem_cma_helper.h 2019-01-09 22:54:08 +01:00
drm_gem_framebuffer_helper.h drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty() 2019-01-17 10:56:45 +01:00
drm_gem.h drm: Add reservation_object to drm_gem_object 2019-02-19 11:08:40 +01:00
drm_hashtab.h
drm_hdcp.h drm: include types.h from drm_hdcp.h 2019-01-02 11:38:01 +02:00
drm_ioctl.h drm: remove all control node code 2018-05-03 21:26:32 +02:00
drm_irq.h
drm_lease.h
drm_legacy.h drm: un-inline drm_legacy_findmap() 2019-01-02 11:37:11 +02:00
drm_mipi_dsi.h drm: dsi: Add lane clock rate fields to DSI device 2018-10-24 16:26:35 +02:00
drm_mm.h drm/mm: Add a search-by-address variant to only inspect a single hole 2018-05-24 15:04:30 +01:00
drm_mode_config.h drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_mode_object.h drm: remove drm_mode_object_{un/reference} aliases 2018-03-19 09:09:46 -04:00
drm_modes.h drm: Complete remove drm_mode_object dependency 2019-01-15 13:22:23 +01:00
drm_modeset_helper_vtables.h drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_modeset_helper.h drm: remove drmP.h from drm_modeset_helper.h 2019-02-07 21:48:34 +01:00
drm_modeset_lock.h drm: Trivial comment grammar cleanups 2019-02-04 10:21:17 +01:00
drm_of.h drm: of: Export and rename drm_crtc_port_mask() 2018-06-27 21:44:04 +02:00
drm_os_linux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_panel.h This is the 4.19-rc6 release 2018-10-04 11:03:34 +10:00
drm_pci.h drm: drop drm_pcie_get_speed_cap_mask and drm_pcie_get_max_link_width 2018-07-05 16:40:00 -05:00
drm_pciids.h drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
drm_plane_helper.h drm: Unexport drm_plane_helper_check_update 2018-10-05 22:45:19 +02:00
drm_plane.h drm: Add helper iterator functions for plane fb_damage_clips blob 2018-12-05 10:00:36 +01:00
drm_prime.h drm/prime: Add drm_gem_prime_mmap() 2018-11-20 14:54:53 +01:00
drm_print.h Merge drm/drm-next into drm-misc-next 2018-08-27 10:00:03 -04:00
drm_probe_helper.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_property.h drm: Fix kernel doc for DRM_MODE_PROP_IMMUTABLE 2018-10-03 13:05:12 -07:00
drm_rect.h drm: Nuke drm_calc_{h,v}scale_relaxed() 2019-02-07 13:14:06 +02:00
drm_scdc_helper.h
drm_simple_kms_helper.h drm: Move simple_display_pipe prepare_fb helper into gem fb helpers 2018-04-24 13:57:22 +02:00
drm_syncobj.h Merge drm/drm-next into drm-intel-next-queued 2019-01-08 10:50:22 +02:00
drm_sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_util.h drm: fix drm_can_sleep() comment 2019-01-21 10:30:12 +01:00
drm_utils.h drm: Add panel orientation quirks, v6. 2017-12-04 23:03:21 +01:00
drm_vblank.h drm/vblank: Allow dynamic per-crtc max_vblank_count 2019-01-14 21:23:55 +02:00
drm_vma_manager.h drm/i915: Prevent writing into a read-only object via a GGTT mmap 2018-07-13 16:14:04 +01:00
drm_writeback.h drm/atomic: Avoid connector to writeback_connector casts 2018-07-07 07:51:19 +02:00
drmP.h drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h 2019-01-14 10:58:37 +01:00
gma_drm.h
gpu_scheduler.h drm/sched: Rework HW fence processing. 2019-01-25 16:15:36 -05:00
i915_component.h i915/snd_hdac: I915 subcomponent for the snd_hdac 2019-02-08 16:58:59 +01:00
i915_drm.h x86/gpu: reserve ICL's graphics stolen memory 2018-07-10 16:28:47 -07:00
i915_pciids.h drm/i915/cfl: Adding another PCI Device ID. 2019-01-31 08:53:59 -08:00
intel_lpe_audio.h
intel-gtt.h drm: include kernel.h and agp_backend.h from intel-gtt.h 2019-01-02 11:37:47 +02:00
spsc_queue.h drm: move amd_gpu_scheduler into common location 2017-12-07 11:51:56 -05:00