[PATCH 10/28] drm: Define helper to create color ops capability property
Uma Shankar
uma.shankar at intel.com
Tue Feb 13 06:48:17 UTC 2024
Add a helper to create capability property for a colorop
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_colorop.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
index 4d57eaef04aa..cfdc8e751012 100644
--- a/drivers/gpu/drm/drm_colorop.c
+++ b/drivers/gpu/drm/drm_colorop.c
@@ -43,6 +43,27 @@ static const struct drm_prop_enum_list drm_colorop_curve_1d_type_enum_list[] = {
};
/* Init Helpers */
+__maybe_unused
+static int drm_create_colorop_capability_prop(struct drm_device *dev,
+ struct drm_colorop *colorop,
+ struct drm_property_blob *blob)
+{
+ struct drm_property *prop = NULL;
+
+ prop = drm_property_create(dev, DRM_MODE_PROP_BLOB |
+ DRM_MODE_PROP_ATOMIC |
+ DRM_MODE_PROP_IMMUTABLE,
+ "HW_CAPS", 1);
+ if (!prop)
+ return -ENOMEM;
+
+ colorop->hw_caps_property = prop;
+ drm_object_attach_property(&colorop->base,
+ colorop->hw_caps_property,
+ blob->base.id);
+
+ return 0;
+}
int drm_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,
struct drm_plane *plane, enum drm_colorop_type type)
--
2.42.0
More information about the Intel-gfx
mailing list