diff options
| author | Harry Wentland <harry.wentland@amd.com> | 2025-11-14 17:01:31 -0700 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2025-11-26 23:03:32 +0100 |
| commit | 41651f9d42eb24186a38a11be0a75dbc148d2991 (patch) | |
| tree | 9d7c05dc75c2429dc93d37b68b9fd979ab768ff0 /drivers/gpu/drm/drm_atomic_uapi.c | |
| parent | 84423e561208054f872b3ca66e3e99a10d06c0ac (diff) | |
drm/colorop: Add 1D Curve subtype
Add a new drm_colorop with DRM_COLOROP_1D_CURVE with two subtypes:
DRM_COLOROP_1D_CURVE_SRGB_EOTF and DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF.
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Co-developed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Hung <alex.hung@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-7-alex.hung@amd.com
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_uapi.c')
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_uapi.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 55b3046c5f1c..e01eaab9b2f7 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -655,10 +655,17 @@ static int drm_atomic_colorop_set_property(struct drm_colorop *colorop, struct drm_property *property, uint64_t val) { - drm_dbg_atomic(colorop->dev, - "[COLOROP:%d] unknown property [PROP:%d:%s]]\n", - colorop->base.id, property->base.id, property->name); - return -EINVAL; + if (property == colorop->curve_1d_type_property) { + state->curve_1d_type = val; + } else { + drm_dbg_atomic(colorop->dev, + "[COLOROP:%d:%d] unknown property [PROP:%d:%s]\n", + colorop->base.id, colorop->type, + property->base.id, property->name); + return -EINVAL; + } + + return 0; } static int @@ -668,6 +675,8 @@ drm_atomic_colorop_get_property(struct drm_colorop *colorop, { if (property == colorop->type_property) *val = colorop->type; + else if (property == colorop->curve_1d_type_property) + *val = state->curve_1d_type; else return -EINVAL; |