diff options
| author | Harry Wentland <harry.wentland@amd.com> | 2025-11-14 17:01:43 -0700 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2025-11-26 23:03:33 +0100 |
| commit | e5719e7f19009d4fbedf685fc22eec9cd8de154f (patch) | |
| tree | eda04076957185548b342cecb39a99c69473637f /include/drm | |
| parent | cb500b4c2459a10cec21e0eda841c46bf1fd7a8a (diff) | |
drm/colorop: Add 3x4 CTM type
This type is used to support a 3x4 matrix in colorops. A 3x4
matrix uses the last column as a "bias" column. Some HW exposes
support for 3x4. The calculation looks like:
out matrix in
|R| |0 1 2 3 | | R |
|G| = |4 5 6 7 | x | G |
|B| |8 9 10 11| | B |
|1.0|
This is also the first colorop where we need a blob property to
program the property. For that we'll introduce a new DATA
property that can be used by all colorop TYPEs requiring a
blob. The way a DATA blob is read depends on the TYPE of
the colorop.
We only create the DATA property for property types that
need it.
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Link: https://patch.msgid.link/20251115000237.3561250-19-alex.hung@amd.com
Diffstat (limited to 'include/drm')
| -rw-r--r-- | include/drm/drm_colorop.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h index ba03b35454da..8b5f8aaac2f4 100644 --- a/include/drm/drm_colorop.h +++ b/include/drm/drm_colorop.h @@ -97,6 +97,17 @@ struct drm_colorop_state { */ enum drm_colorop_curve_1d_type curve_1d_type; + /** + * @data: + * + * Data blob for any TYPE that requires such a blob. The + * interpretation of the blob is TYPE-specific. + * + * See the &drm_colorop_type documentation for how blob is laid + * out. + */ + struct drm_property_blob *data; + /** @state: backpointer to global drm_atomic_state */ struct drm_atomic_state *state; }; @@ -207,6 +218,17 @@ struct drm_colorop { struct drm_property *curve_1d_type_property; /** + * @data_property: + * + * blob property for any TYPE that requires a blob of data, + * such as 1DLUT, CTM, 3DLUT, etc. + * + * The way this blob is interpreted depends on the TYPE of + * this + */ + struct drm_property *data_property; + + /** * @next_property: * * Read-only property to next colorop in the pipeline @@ -242,6 +264,8 @@ void drm_colorop_cleanup(struct drm_colorop *colorop); int drm_plane_colorop_curve_1d_init(struct drm_device *dev, struct drm_colorop *colorop, struct drm_plane *plane, u64 supported_tfs); +int drm_plane_colorop_ctm_3x4_init(struct drm_device *dev, struct drm_colorop *colorop, + struct drm_plane *plane); struct drm_colorop_state * drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop); |