struct drm_property *property,
uint64_t val)
{
- if (property == colorop->curve_1d_type_property) {
+ if (property == colorop->bypass_property) {
+ state->bypass = val;
+ } else if (property == colorop->curve_1d_type_property) {
state->curve_1d_type = val;
} else {
drm_dbg_atomic(colorop->dev,
{
if (property == colorop->type_property)
*val = colorop->type;
+ else if (property == colorop->bypass_property)
+ *val = state->bypass;
else if (property == colorop->curve_1d_type_property)
*val = state->curve_1d_type;
else
colorop->type_property,
colorop->type);
+ /* bypass */
+ prop = drm_property_create_bool(dev, DRM_MODE_PROP_ATOMIC,
+ "BYPASS");
+ if (!prop)
+ return -ENOMEM;
+
+ colorop->bypass_property = prop;
+ drm_object_attach_property(&colorop->base,
+ colorop->bypass_property,
+ 1);
+
return ret;
}
/* initialize 1D curve only attribute */
prop = drm_property_create_enum(dev, DRM_MODE_PROP_ATOMIC, "CURVE_1D_TYPE",
enum_list, len);
+
if (!prop)
return -ENOMEM;
struct drm_colorop_state *state)
{
memcpy(state, colorop->state, sizeof(*state));
+
+ state->bypass = true;
}
struct drm_colorop_state *
u64 val;
colorop_state->colorop = colorop;
+ colorop_state->bypass = true;
if (colorop->curve_1d_type_property) {
drm_object_property_get_default_value(&colorop->base,
* information.
*/
+ /**
+ * @bypass:
+ *
+ * When the property BYPASS exists on this colorop, this stores
+ * the requested bypass state: true if colorop shall be bypassed,
+ * false if colorop is enabled.
+ */
+ bool bypass;
+
/**
* @curve_1d_type:
*
*/
struct drm_property *type_property;
+ /**
+ * @bypass_property:
+ *
+ * Boolean property to control enablement of the color
+ * operation. Setting bypass to "true" shall always be supported
+ * in order to allow compositors to quickly fall back to
+ * alternate methods of color processing. This is important
+ * since setting color operations can fail due to unique
+ * HW constraints.
+ */
+ struct drm_property *bypass_property;
+
/**
* @curve_1d_type_property:
*