summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2025-11-14 17:02:09 -0700
committerSimon Ser <contact@emersion.fr>2025-11-26 23:09:17 +0100
commit2468963482d844f0657a52f791f15ceb953e5880 (patch)
tree14ab2eac3a5fe4fedd7d70574c1d695e1bab277f /include
parent7fa3ee8c0a79b7a8b5fae422ca29da2fde6821ba (diff)
drm/colorop: allow non-bypass colorops
Not all HW will be able to do bypass on all color operations. Introduce an 32 bits 'flags' for all colorop init functions and DRM_COLOROP_FLAG_ALLOW_BYPASS for creating the BYPASS property when it's true. 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: Simon Ser <contact@emersion.fr> 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-45-alex.hung@amd.com
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_colorop.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
index 0e1a5e9d26f3..828888861ad9 100644
--- a/include/drm/drm_colorop.h
+++ b/include/drm/drm_colorop.h
@@ -31,6 +31,9 @@
#include <drm/drm_mode.h>
#include <drm/drm_property.h>
+/* DRM colorop flags */
+#define DRM_COLOROP_FLAG_ALLOW_BYPASS (1<<0) /* Allow bypass on the drm_colorop */
+
/**
* enum drm_colorop_curve_1d_type - type of 1D curve
*
@@ -256,11 +259,12 @@ struct drm_colorop {
* @bypass_property:
*
* Boolean property to control enablement of the color
- * operation. Setting bypass to "true" shall always be supported
- * in order to allow compositors to quickly fall back to
- * alternate methods of color processing. This is important
- * since setting color operations can fail due to unique
- * HW constraints.
+ * operation. Only present if DRM_COLOROP_FLAG_ALLOW_BYPASS
+ * flag is set. When present, setting bypass to "true" shall
+ * always be supported to allow compositors to quickly fall
+ * back to alternate methods of color processing. This is
+ * important since setting color operations can fail due to
+ * unique HW constraints.
*/
struct drm_property *bypass_property;
@@ -353,14 +357,15 @@ void drm_colorop_pipeline_destroy(struct drm_device *dev);
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);
+ struct drm_plane *plane, u64 supported_tfs, uint32_t flags);
int drm_plane_colorop_curve_1d_lut_init(struct drm_device *dev, struct drm_colorop *colorop,
struct drm_plane *plane, uint32_t lut_size,
- enum drm_colorop_lut1d_interpolation_type interpolation);
+ enum drm_colorop_lut1d_interpolation_type interpolation,
+ uint32_t flags);
int drm_plane_colorop_ctm_3x4_init(struct drm_device *dev, struct drm_colorop *colorop,
- struct drm_plane *plane);
+ struct drm_plane *plane, uint32_t flags);
int drm_plane_colorop_mult_init(struct drm_device *dev, struct drm_colorop *colorop,
- struct drm_plane *plane);
+ struct drm_plane *plane, uint32_t flags);
struct drm_colorop_state *
drm_atomic_helper_colorop_duplicate_state(struct drm_colorop *colorop);