linux-uconsole/include/uapi/drm
Lionel Landwerlin 9aeb1194e3 UPSTREAM: drm: introduce pipe color correction properties
Patch based on a previous series by Shashank Sharma.

This introduces optional properties to enable color correction at the
pipe level. It relies on 3 transformations applied to every pixels
displayed. First a lookup into a degamma table, then a multiplication
of the rgb components by a 3x3 matrix and finally another lookup into
a gamma table.

The following properties can be added to a pipe :
  - DEGAMMA_LUT : blob containing degamma LUT
  - DEGAMMA_LUT_SIZE : number of elements in DEGAMMA_LUT
  - CTM : transformation matrix applied after the degamma LUT
  - GAMMA_LUT : blob containing gamma LUT
  - GAMMA_LUT_SIZE : number of elements in GAMMA_LUT

DEGAMMA_LUT_SIZE and GAMMA_LUT_SIZE are read only properties, set by
the driver to tell userspace applications what sizes should be the
lookup tables in DEGAMMA_LUT and GAMMA_LUT.

A helper is also provided so legacy gamma correction is redirected
through these new properties.

v2: Register LUT size properties as range

v3: Fix round in drm_color_lut_get_value() helper
    More docs on how degamma/gamma properties are used

v4: Update contributors

v5: Rename CTM_MATRIX property to CTM (Doh!)
    Add legacy gamma_set atomic helper
    Describe CTM/LUT acronyms in the kernel doc

v6: Fix missing blob unref in drm_atomic_helper_crtc_reset

Signed-off-by: Kumar, Kiran S <kiran.s.kumar@intel.com>
Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Acked-by: Rob Bradford <robert.bradford@intel.com>
[danvet: CrOS maintainers are also happy with the userspacde side:
https://codereview.chromium.org/1182063002/ ]
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1456506302-640-4-git-send-email-lionel.g.landwerlin@intel.com
(cherry picked from commit 5488dc16fd)

Change-Id: I8952fa72998b669cf6d8a7e120a72ffb225b1ba1
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-07 19:09:13 +08:00
..
amdgpu_drm.h drm/amdgpu: update the core VI support for Stoney 2015-10-21 12:21:31 -04:00
armada_drm.h DRM: Armada: Add Armada DRM driver 2013-10-12 10:13:40 +01:00
drm.h FROMLIST: drm: Pass CRTC ID in userspace vblank events 2017-05-11 15:38:50 +08:00
drm_fourcc.h drm: add 10bit support for yuv format 2016-11-24 12:59:29 +08:00
drm_mode.h UPSTREAM: drm: introduce pipe color correction properties 2017-07-07 19:09:13 +08:00
drm_sarea.h
exynos_drm.h drm/exynos: use drm generic mmap interface 2014-09-20 01:00:13 +09:00
i810_drm.h drm/i810_drm.h: include drm/drm.h 2015-10-16 15:51:00 +02:00
i915_drm.h drm/i915: Wa32bitGeneralStateOffset & Wa32bitInstructionBaseOffset 2015-10-01 18:12:17 +02:00
Kbuild virtio-gpu: add 3d/virgl support 2015-10-16 10:44:02 +02:00
mga_drm.h
msm_drm.h drm/msm: use __s32, __s64, __u32 and __u64 from linux/types.h for uabi 2015-06-11 13:11:05 -04:00
nouveau_drm.h drm/nouveau: remove unnecessary usage of object handles 2015-11-03 15:02:18 +10:00
omap_drm.h drm/omap: move out of staging 2013-02-16 17:38:06 -05:00
qxl_drm.h drm: add new QXL driver. (v1.4) 2013-04-12 13:51:07 +10:00
r128_drm.h r128_drm.h: include drm/drm.h 2015-10-16 15:50:59 +02:00
radeon_drm.h rk: revert to v3.10 2015-11-11 15:57:28 +08:00
rockchip_drm.h drm/rockchip: rga: add buf flush flag 2017-04-19 08:42:21 +08:00
savage_drm.h savage_drm.h: include <drm/drm.h> 2015-10-16 15:50:59 +02:00
sis_drm.h include/uapi/drm/sis_drm.h: move sis_file_private to drivers/gpu/drm/sis/sis_drv.h 2015-10-16 11:27:46 +10:00
tegra_drm.h rk: revert to v3.10 2015-11-11 15:57:28 +08:00
via_drm.h via_drm.h: move struct via_file_private definition to drivers/gpu/drm/via/via_drv.h 2015-10-16 11:27:49 +10:00
virtgpu_drm.h virtio-gpu: add 3d/virgl support 2015-10-16 10:44:02 +02:00
vmwgfx_drm.h drm/vmwgfx: Fix copyright headers 2015-08-12 10:06:56 -07:00