mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +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: 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
|
||
|---|---|---|
| .. | ||
| ABI | ||
| accounting | ||
| acpi | ||
| aoe | ||
| arm | ||
| arm64 | ||
| auxdisplay | ||
| backlight | ||
| blackfin | ||
| block | ||
| blockdev | ||
| bus-devices | ||
| cdrom | ||
| cgroup-legacy | ||
| cma | ||
| connector | ||
| console | ||
| cpu-freq | ||
| cpuidle | ||
| cris | ||
| crypto | ||
| development-process | ||
| device-mapper | ||
| devicetree | ||
| dmaengine | ||
| DocBook | ||
| driver-model | ||
| dvb | ||
| early-userspace | ||
| EDID | ||
| extcon | ||
| fault-injection | ||
| fb | ||
| features | ||
| filesystems | ||
| firmware_class | ||
| fmc | ||
| fpga | ||
| frv | ||
| gpio | ||
| hid | ||
| hwmon | ||
| i2c | ||
| ia64 | ||
| ide | ||
| infiniband | ||
| input | ||
| ioctl | ||
| isdn | ||
| ja_JP | ||
| kbuild | ||
| kdump | ||
| ko_KR | ||
| laptops | ||
| leds | ||
| locking | ||
| m68k | ||
| memory-devices | ||
| metag | ||
| mic | ||
| mips | ||
| misc-devices | ||
| mmc | ||
| mn10300 | ||
| mtd | ||
| namespaces | ||
| netlabel | ||
| networking | ||
| nfc | ||
| nios2 | ||
| nvdimm | ||
| nvmem | ||
| parisc | ||
| PCI | ||
| pcmcia | ||
| phy | ||
| platform | ||
| power | ||
| powerpc | ||
| pps | ||
| prctl | ||
| pti | ||
| ptp | ||
| rapidio | ||
| RCU | ||
| s390 | ||
| scheduler | ||
| scsi | ||
| security | ||
| serial | ||
| sh | ||
| sound | ||
| spi | ||
| sysctl | ||
| target | ||
| thermal | ||
| timers | ||
| tpm | ||
| trace | ||
| usb | ||
| vDSO | ||
| video4linux | ||
| virtual | ||
| vm | ||
| w1 | ||
| watchdog | ||
| wimax | ||
| x86 | ||
| xtensa | ||
| zh_CN | ||
| 00-INDEX | ||
| adding-syscalls.txt | ||
| android.txt | ||
| applying-patches.txt | ||
| assoc_array.txt | ||
| atomic_ops.txt | ||
| bad_memory.txt | ||
| basic_profiling.txt | ||
| bcache.txt | ||
| binfmt_misc.txt | ||
| braille-console.txt | ||
| bt8xxgpio.txt | ||
| btmrvl.txt | ||
| BUG-HUNTING | ||
| bus-virt-phys-mapping.txt | ||
| cachetlb.txt | ||
| cgroup.txt | ||
| Changes | ||
| circular-buffers.txt | ||
| clk.txt | ||
| coccinelle.txt | ||
| CodeOfConflict | ||
| CodingStyle | ||
| cpu-hotplug.txt | ||
| cpu-load.txt | ||
| cputopology.txt | ||
| crc32.txt | ||
| dcdbas.txt | ||
| debugging-modules.txt | ||
| debugging-via-ohci1394.txt | ||
| dell_rbu.txt | ||
| devices.txt | ||
| digsig.txt | ||
| DMA-API-HOWTO.txt | ||
| DMA-API.txt | ||
| DMA-attributes.txt | ||
| dma-buf-sharing.txt | ||
| DMA-ISA-LPC.txt | ||
| dontdiff | ||
| dynamic-debug-howto.txt | ||
| edac.txt | ||
| efi-stub.txt | ||
| eisa.txt | ||
| email-clients.txt | ||
| flexible-arrays.txt | ||
| futex-requeue-pi.txt | ||
| gcov.txt | ||
| gdb-kernel-debugging.txt | ||
| highuid.txt | ||
| HOWTO | ||
| hsi.txt | ||
| hw_random.txt | ||
| hwspinlock.txt | ||
| init.txt | ||
| initrd.txt | ||
| intel_txt.txt | ||
| Intel-IOMMU.txt | ||
| io_ordering.txt | ||
| io-mapping.txt | ||
| iostats.txt | ||
| IPMI.txt | ||
| IRQ-affinity.txt | ||
| IRQ-domain.txt | ||
| IRQ.txt | ||
| irqflags-tracing.txt | ||
| isapnp.txt | ||
| java.txt | ||
| kasan.txt | ||
| kernel-doc-nano-HOWTO.txt | ||
| kernel-docs.txt | ||
| kernel-parameters.txt | ||
| kernel-per-CPU-kthreads.txt | ||
| kmemcheck.txt | ||
| kmemleak.txt | ||
| kobject.txt | ||
| kprobes.txt | ||
| kref.txt | ||
| kselftest.txt | ||
| ldm.txt | ||
| local_ops.txt | ||
| lockup-watchdogs.txt | ||
| logo.gif | ||
| logo.txt | ||
| lzo.txt | ||
| magic-number.txt | ||
| mailbox.txt | ||
| Makefile | ||
| ManagementStyle | ||
| md-cluster.txt | ||
| md.txt | ||
| media-framework.txt | ||
| memory-barriers.txt | ||
| memory-hotplug.txt | ||
| men-chameleon-bus.txt | ||
| module-signing.txt | ||
| mono.txt | ||
| nommu-mmap.txt | ||
| ntb.txt | ||
| numastat.txt | ||
| oops-tracing.txt | ||
| padata.txt | ||
| parport-lowlevel.txt | ||
| parport.txt | ||
| percpu-rw-semaphore.txt | ||
| phy.txt | ||
| pi-futex.txt | ||
| pie.txt | ||
| pinctrl.txt | ||
| pnp.txt | ||
| preempt-locking.txt | ||
| printk-formats.txt | ||
| pwm.txt | ||
| ramoops.txt | ||
| rbtree.txt | ||
| remoteproc.txt | ||
| rfkill.txt | ||
| robust-futex-ABI.txt | ||
| robust-futexes.txt | ||
| rpmsg.txt | ||
| rtc.txt | ||
| SAK.txt | ||
| SecurityBugs | ||
| serial-console.txt | ||
| sgi-ioc4.txt | ||
| SM501.txt | ||
| smsc_ece1099.txt | ||
| sparse.txt | ||
| stable_api_nonsense.txt | ||
| stable_kernel_rules.txt | ||
| static-keys.txt | ||
| SubmitChecklist | ||
| SubmittingDrivers | ||
| SubmittingPatches | ||
| svga.txt | ||
| sync.txt | ||
| sysfs-rules.txt | ||
| sysrq.txt | ||
| this_cpu_ops.txt | ||
| unaligned-memory-access.txt | ||
| unicode.txt | ||
| unshare.txt | ||
| vfio.txt | ||
| VGA-softcursor.txt | ||
| vgaarbiter.txt | ||
| video-output.txt | ||
| vme_api.txt | ||
| volatile-considered-harmful.txt | ||
| workqueue.txt | ||
| xillybus.txt | ||
| xz.txt | ||
| zorro.txt | ||