mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-04-18 06:34:27 -04:00
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
This commit is contained in:
committed by
Simon Ser
parent
84423e5612
commit
41651f9d42
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user