summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_drv.c
diff options
context:
space:
mode:
authorStefan Schake <stschake@gmail.com>2018-04-20 15:25:44 +0300
committerEric Anholt <eric@anholt.net>2018-04-23 21:32:55 +0300
commit766cc6b1f7fc9e10f096a84d147e48dead18ba59 (patch)
tree29491c5460283f6b4652f6e78deb51774b61d97b /drivers/gpu/drm/vc4/vc4_drv.c
parent22445f0316a253406472ddcda98c3341b1eebaf4 (diff)
downloadlinux-766cc6b1f7fc9e10f096a84d147e48dead18ba59.tar.xz
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/
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index af9515ae0e0a..40ddeaafd65f 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -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);
}