Skip to content

Commit dabeeba

Browse files
Harry Wentlandemersion
authored andcommitted
drm/colorop: pass plane_color_pipeline client cap to atomic check
Drivers will need to know whether an atomic check/commit originated from a client with DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE so they can ignore deprecated properties, like COLOR_ENCODING and COLOR_RANGE. Pass the plane_color_pipeline bit to drm_atomic_state. Reviewed-by: Simon Ser <contact@emersion.fr> 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-24-alex.hung@amd.com
1 parent f03bf05 commit dabeeba

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

drivers/gpu/drm/drm_atomic_uapi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,6 +1584,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
15841584
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
15851585
state->acquire_ctx = &ctx;
15861586
state->allow_modeset = !!(arg->flags & DRM_MODE_ATOMIC_ALLOW_MODESET);
1587+
state->plane_color_pipeline = file_priv->plane_color_pipeline;
15871588

15881589
retry:
15891590
copied_objs = 0;

include/drm/drm_atomic.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,24 @@ struct drm_atomic_state {
537537
*/
538538
bool checked : 1;
539539

540+
/**
541+
* @plane_color_pipeline:
542+
*
543+
* Indicates whether this atomic state originated with a client that
544+
* set the DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE.
545+
*
546+
* Drivers and helper functions should use this to ignore legacy
547+
* properties that are incompatible with the drm_plane COLOR_PIPELINE
548+
* behavior, such as:
549+
*
550+
* - COLOR_RANGE
551+
* - COLOR_ENCODING
552+
*
553+
* or any other driver-specific properties that might affect pixel
554+
* values.
555+
*/
556+
bool plane_color_pipeline : 1;
557+
540558
/**
541559
* @colorops:
542560
*

0 commit comments

Comments
 (0)