mirror of
https://github.com/torvalds/linux.git
synced 2026-07-04 03:56:45 +02:00
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: Shashank Sharma <shashank.sharma@intel.com>
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
|
||
|---|---|---|
| .. | ||
| media | ||
| .gitignore | ||
| 80211.tmpl | ||
| alsa-driver-api.tmpl | ||
| crypto-API.tmpl | ||
| debugobjects.tmpl | ||
| device-drivers.tmpl | ||
| deviceiobook.tmpl | ||
| filesystems.tmpl | ||
| gadget.tmpl | ||
| genericirq.tmpl | ||
| gpu.tmpl | ||
| iio.tmpl | ||
| kernel-api.tmpl | ||
| kernel-hacking.tmpl | ||
| kernel-locking.tmpl | ||
| kgdb.tmpl | ||
| libata.tmpl | ||
| librs.tmpl | ||
| lsm.tmpl | ||
| Makefile | ||
| media_api.tmpl | ||
| mtdnand.tmpl | ||
| networking.tmpl | ||
| rapidio.tmpl | ||
| regulator.tmpl | ||
| s390-drivers.tmpl | ||
| scsi.tmpl | ||
| sh.tmpl | ||
| stylesheet.xsl | ||
| tracepoint.tmpl | ||
| uio-howto.tmpl | ||
| usb.tmpl | ||
| w1.tmpl | ||
| writing_musb_glue_layer.tmpl | ||
| writing_usb_driver.tmpl | ||
| writing-an-alsa-driver.tmpl | ||
| z8530book.tmpl | ||