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
This commit is contained in:
Harry Wentland
2025-11-14 17:02:09 -07:00
committed by Simon Ser
parent 7fa3ee8c0a
commit 2468963482
5 changed files with 62 additions and 39 deletions

View File

@@ -787,7 +787,8 @@ static void drm_atomic_colorop_print_state(struct drm_printer *p,
drm_printf(p, "colorop[%u]:\n", colorop->base.id);
drm_printf(p, "\ttype=%s\n", drm_get_colorop_type_name(colorop->type));
drm_printf(p, "\tbypass=%u\n", state->bypass);
if (colorop->bypass_property)
drm_printf(p, "\tbypass=%u\n", state->bypass);
switch (colorop->type) {
case DRM_COLOROP_1D_CURVE: