aboutsummaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2025-11-14 17:01:30 -0700
committerSimon Ser <contact@emersion.fr>2025-11-26 23:03:31 +0100
commit84423e561208054f872b3ca66e3e99a10d06c0ac (patch)
tree59de4f7ad5cfa03d3295cc36f2acafa9893572d6 /include/drm
parentcfc27680ee208cdf7a61cda817b4158c4142595f (diff)
drm/colorop: Add TYPE property
Add a read-only TYPE property. The TYPE specifies the colorop type, such as enumerated curve, 1D LUT, CTM, 3D LUT, PWL LUT, etc. For now we're only introducing an enumerated 1D LUT type to illustrate the concept. 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-6-alex.hung@amd.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_colorop.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
index 28bb7091ef1f..0bda70f4e82a 100644
--- a/include/drm/drm_colorop.h
+++ b/include/drm/drm_colorop.h
@@ -112,6 +112,21 @@ struct drm_colorop {
/** @properties: property tracking for this colorop */
struct drm_object_properties properties;
+ /**
+ * @type:
+ *
+ * Read-only
+ * Type of color operation
+ */
+ enum drm_colorop_type type;
+
+ /**
+ * @type_property:
+ *
+ * Read-only "TYPE" property for specifying the type of
+ * this color operation. The type is enum drm_colorop_type.
+ */
+ struct drm_property *type_property;
};
#define obj_to_colorop(x) container_of(x, struct drm_colorop, base)
@@ -166,4 +181,13 @@ static inline unsigned int drm_colorop_index(const struct drm_colorop *colorop)
#define drm_for_each_colorop(colorop, dev) \
list_for_each_entry(colorop, &(dev)->mode_config.colorop_list, head)
+/**
+ * drm_get_colorop_type_name - return a string for colorop type
+ * @type: colorop type to compute name of
+ *
+ * In contrast to the other drm_get_*_name functions this one here returns a
+ * const pointer and hence is threadsafe.
+ */
+const char *drm_get_colorop_type_name(enum drm_colorop_type type);
+
#endif /* __DRM_COLOROP_H__ */