[v2 05/25] drm: Add Color ops capability property
Uma Shankar
uma.shankar at intel.com
Tue Nov 26 13:27:10 UTC 2024
Add capability property which a colorop can expose it's
hardware's abilities. It's a blob property that can be
filled with respective data structures depending on the
colorop. The user space is expected to read this property
and program the colorop accordingly.
Signed-off-by: Uma Shankar <uma.shankar at intel.com>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
---
drivers/gpu/drm/drm_atomic_uapi.c | 3 +++
include/drm/drm_colorop.h | 12 ++++++++++++
2 files changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index ba68358c0ffe..46cc7b0df6e8 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -780,6 +780,9 @@ drm_atomic_colorop_get_property(struct drm_colorop *colorop,
*val = state->size;
} else if (property == colorop->data_property) {
*val = (state->data) ? state->data->base.id : 0;
+ } else if (property == colorop->hw_caps_property) {
+ *val = state->hw_caps ?
+ state->hw_caps->base.id : 0;
} else {
return -EINVAL;
}
diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
index 56b51fafebdf..58e5b87c6d56 100644
--- a/include/drm/drm_colorop.h
+++ b/include/drm/drm_colorop.h
@@ -146,6 +146,11 @@ struct drm_colorop_state {
* Number of entries of the custom LUT. This should be read-only.
*/
uint32_t size;
+ /**
+ * @hw_caps:
+ *
+ */
+ struct drm_property_blob *hw_caps;
/**
* @lut_3d_modes:
@@ -297,6 +302,13 @@ struct drm_colorop {
*/
struct drm_property *curve_1d_type_property;
+ /**
+ * @hwlut_caps_property:
+ *
+ * Property to expose hardware lut capbilities.
+ */
+ struct drm_property *hw_caps_property;
+
/**
* @multiplier_property:
*
--
2.42.0
More information about the dri-devel
mailing list