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
@@ -10,6 +10,7 @@
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm_encoder.h>
|
||||
#include <drm/drm_gem_cma_helper.h>
|
||||
#include <drm/drm_atomic.h>
|
||||
|
||||
#include "uapi/drm/vc4_drm.h"
|
||||
|
||||
@@ -193,6 +194,9 @@ struct vc4_dev {
|
||||
} hangcheck;
|
||||
|
||||
struct semaphore async_modeset;
|
||||
|
||||
struct drm_modeset_lock ctm_state_lock;
|
||||
struct drm_private_obj ctm_manager;
|
||||
};
|
||||
|
||||
static inline struct vc4_dev *
|
||||
|
Reference in New Issue
Block a user