Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/colorop: Add BYPASS property

We want to be able to bypass each colorop at all times.
Introduce a new BYPASS boolean property for this.

Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
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-8-alex.hung@amd.com

authored by

Harry Wentland and committed by
Simon Ser
8c5ea174 41651f9d

+41 -1
+5 -1
drivers/gpu/drm/drm_atomic_uapi.c
··· 655 655 struct drm_property *property, 656 656 uint64_t val) 657 657 { 658 - if (property == colorop->curve_1d_type_property) { 658 + if (property == colorop->bypass_property) { 659 + state->bypass = val; 660 + } else if (property == colorop->curve_1d_type_property) { 659 661 state->curve_1d_type = val; 660 662 } else { 661 663 drm_dbg_atomic(colorop->dev, ··· 677 675 { 678 676 if (property == colorop->type_property) 679 677 *val = colorop->type; 678 + else if (property == colorop->bypass_property) 679 + *val = state->bypass; 680 680 else if (property == colorop->curve_1d_type_property) 681 681 *val = state->curve_1d_type; 682 682 else
+15
drivers/gpu/drm/drm_colorop.c
··· 78 78 colorop->type_property, 79 79 colorop->type); 80 80 81 + /* bypass */ 82 + prop = drm_property_create_bool(dev, DRM_MODE_PROP_ATOMIC, 83 + "BYPASS"); 84 + if (!prop) 85 + return -ENOMEM; 86 + 87 + colorop->bypass_property = prop; 88 + drm_object_attach_property(&colorop->base, 89 + colorop->bypass_property, 90 + 1); 91 + 81 92 return ret; 82 93 } 83 94 ··· 145 134 /* initialize 1D curve only attribute */ 146 135 prop = drm_property_create_enum(dev, DRM_MODE_PROP_ATOMIC, "CURVE_1D_TYPE", 147 136 enum_list, len); 137 + 148 138 if (!prop) 149 139 return -ENOMEM; 150 140 ··· 162 150 struct drm_colorop_state *state) 163 151 { 164 152 memcpy(state, colorop->state, sizeof(*state)); 153 + 154 + state->bypass = true; 165 155 } 166 156 167 157 struct drm_colorop_state * ··· 201 187 u64 val; 202 188 203 189 colorop_state->colorop = colorop; 190 + colorop_state->bypass = true; 204 191 205 192 if (colorop->curve_1d_type_property) { 206 193 drm_object_property_get_default_value(&colorop->base,
+21
include/drm/drm_colorop.h
··· 82 82 */ 83 83 84 84 /** 85 + * @bypass: 86 + * 87 + * When the property BYPASS exists on this colorop, this stores 88 + * the requested bypass state: true if colorop shall be bypassed, 89 + * false if colorop is enabled. 90 + */ 91 + bool bypass; 92 + 93 + /** 85 94 * @curve_1d_type: 86 95 * 87 96 * Type of 1D curve. ··· 178 169 * this color operation. The type is enum drm_colorop_type. 179 170 */ 180 171 struct drm_property *type_property; 172 + 173 + /** 174 + * @bypass_property: 175 + * 176 + * Boolean property to control enablement of the color 177 + * operation. Setting bypass to "true" shall always be supported 178 + * in order to allow compositors to quickly fall back to 179 + * alternate methods of color processing. This is important 180 + * since setting color operations can fail due to unique 181 + * HW constraints. 182 + */ 183 + struct drm_property *bypass_property; 181 184 182 185 /** 183 186 * @curve_1d_type_property: