]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: Add CTM support
authorStefan Schake <stschake@gmail.com>
Fri, 20 Apr 2018 12:25:44 +0000 (05:25 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 23 Apr 2018 18:32:55 +0000 (11:32 -0700)
commit31a0aef32da495a90353e24671cb3470716b5cd5
tree29491c5460283f6b4652f6e78deb51774b61d97b
parent4e861ea62e4dfebbee34431a4745909ab44768ef
drm/vc4: Add CTM support

The hardware has a single block for applying a CTM prior to gamma lut.
It can be fed with pixels from one of our CRTC at a time and uses a
matrix with S0.9 scalars. Use private atomic state to reject attempts
from userland to apply CTM for more than one CRTC at a time and reject
matrices with scalars that we can't approximate without integer bits.

Signed-off-by: Stefan Schake <stschake@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/218067/
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_kms.c