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/
This commit is contained in:

committed by
Eric Anholt

parent
22445f0316
commit
766cc6b1f7
@@ -319,6 +319,7 @@ dev_unref:
|
||||
static void vc4_drm_unbind(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm = dev_get_drvdata(dev);
|
||||
struct vc4_dev *vc4 = to_vc4_dev(drm);
|
||||
|
||||
drm_dev_unregister(drm);
|
||||
|
||||
@@ -326,6 +327,8 @@ static void vc4_drm_unbind(struct device *dev)
|
||||
|
||||
drm_mode_config_cleanup(drm);
|
||||
|
||||
drm_atomic_private_obj_fini(&vc4->ctm_manager);
|
||||
|
||||
drm_dev_unref(drm);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user