@@ -104,7 +104,6 @@ static int drm_create_colorop_capability_prop(struct drm_device *dev,
return 0;
}
-__maybe_unused
static int drm_colorop_lutcaps_init(struct drm_colorop *colorop,
struct drm_plane *plane,
const struct drm_color_lut_range *ranges,
@@ -338,6 +337,32 @@ int drm_colorop_curve_1d_lut_init(struct drm_device *dev, struct drm_colorop *co
}
EXPORT_SYMBOL(drm_colorop_curve_1d_lut_init);
+int drm_colorop_curve_1d_lut_multseg_init(struct drm_device *dev, struct drm_colorop *colorop,
+ struct drm_plane *plane,
+ const struct drm_color_lut_range *ranges,
+ size_t length, bool allow_bypass)
+{
+ int ret;
+
+ ret = drm_colorop_init(dev, colorop, plane, DRM_COLOROP_1D_LUT_MULTSEG, allow_bypass);
+ if (ret)
+ return ret;
+
+ ret = drm_colorop_lutcaps_init(colorop, plane, ranges, length);
+ if (ret)
+ return ret;
+
+ /* data */
+ ret = drm_colorop_create_data_prop(dev, colorop);
+ if (ret)
+ return ret;
+
+ drm_colorop_reset(colorop);
+
+ return 0;
+}
+EXPORT_SYMBOL(drm_colorop_curve_1d_lut_multseg_init);
+
int drm_colorop_ctm_3x4_init(struct drm_device *dev, struct drm_colorop *colorop,
struct drm_plane *plane, bool allow_bypass)
{
@@ -391,6 +391,10 @@ int drm_colorop_curve_1d_lut_init(struct drm_device *dev, struct drm_colorop *co
bool allow_bypass);
int drm_colorop_ctm_3x3_init(struct drm_device *dev, struct drm_colorop *colorop,
struct drm_plane *plane, bool allow_bypass);
+int drm_colorop_curve_1d_lut_multseg_init(struct drm_device *dev, struct drm_colorop *colorop,
+ struct drm_plane *plane,
+ const struct drm_color_lut_range *ranges,
+ size_t length, bool allow_bypass);
int drm_colorop_ctm_3x4_init(struct drm_device *dev, struct drm_colorop *colorop,
struct drm_plane *plane, bool allow_bypass);
int drm_colorop_mult_init(struct drm_device *dev, struct drm_colorop *colorop,