The drm_colorop_find function had a comment saying that uses outside
of DRM properties are deprecated. Such uses seem to have all been
removed and this function is only ever used once inside the property
assignment code. So make it a static helper local to the file.

Likewise drm_atomic_set_colorop_for_plane is never used outside of the
property set code. So make it a local static helper as well.

Signed-off-by: John Harrison <[email protected]>
---
 drivers/gpu/drm/drm_atomic_uapi.c | 23 ++++++++++++++++-------
 include/drm/drm_colorop.h         | 20 --------------------
 2 files changed, 16 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c 
b/drivers/gpu/drm/drm_atomic_uapi.c
index 6441b55cc274..530576850239 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -259,16 +259,16 @@ drm_atomic_set_fb_for_plane(struct drm_plane_state 
*plane_state,
 EXPORT_SYMBOL(drm_atomic_set_fb_for_plane);
 
 /**
- * drm_atomic_set_colorop_for_plane - set colorop for plane
+ * set_colorop_for_plane - set colorop for plane
  * @plane_state: atomic state object for the plane
  * @colorop: colorop to use for the plane
  *
  * Helper function to select the color pipeline on a plane by setting
  * it to the first drm_colorop element of the pipeline.
  */
-void
-drm_atomic_set_colorop_for_plane(struct drm_plane_state *plane_state,
-                                struct drm_colorop *colorop)
+static void
+set_colorop_for_plane(struct drm_plane_state *plane_state,
+                     struct drm_colorop *colorop)
 {
        struct drm_plane *plane = plane_state->plane;
 
@@ -284,7 +284,16 @@ drm_atomic_set_colorop_for_plane(struct drm_plane_state 
*plane_state,
 
        plane_state->color_pipeline = colorop;
 }
-EXPORT_SYMBOL(drm_atomic_set_colorop_for_plane);
+
+static struct drm_colorop *colorop_find(struct drm_device *dev,
+                                       struct drm_file *file_priv,
+                                       uint32_t id)
+{
+       struct drm_mode_object *mo;
+
+       mo = drm_mode_object_find(dev, file_priv, id, DRM_MODE_OBJECT_COLOROP);
+       return mo ? obj_to_colorop(mo) : NULL;
+}
 
 /**
  * drm_atomic_set_crtc_for_connector - set CRTC for connector
@@ -599,12 +608,12 @@ static int drm_atomic_plane_set_property(struct drm_plane 
*plane,
                /* find DRM colorop object */
                struct drm_colorop *colorop = NULL;
 
-               colorop = drm_colorop_find(dev, file_priv, val);
+               colorop = colorop_find(dev, file_priv, val);
 
                if (val && !colorop)
                        return -EACCES;
 
-               drm_atomic_set_colorop_for_plane(state, colorop);
+               set_colorop_for_plane(state, colorop);
        } else if (property == config->prop_fb_damage_clips) {
                ret = drm_property_replace_blob_from_id(dev,
                                        &state->fb_damage_clips,
diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
index b4b9e4f558ab..7f0bd58fb625 100644
--- a/include/drm/drm_colorop.h
+++ b/include/drm/drm_colorop.h
@@ -381,26 +381,6 @@ struct drm_colorop {
 
 #define obj_to_colorop(x) container_of(x, struct drm_colorop, base)
 
-/**
- * drm_colorop_find - look up a Colorop object from its ID
- * @dev: DRM device
- * @file_priv: drm file to check for lease against.
- * @id: &drm_mode_object ID
- *
- * This can be used to look up a Colorop from its userspace ID. Only used by
- * drivers for legacy IOCTLs and interface, nowadays extensions to the KMS
- * userspace interface should be done using &drm_property.
- */
-static inline struct drm_colorop *drm_colorop_find(struct drm_device *dev,
-                                                  struct drm_file *file_priv,
-                                                  uint32_t id)
-{
-       struct drm_mode_object *mo;
-
-       mo = drm_mode_object_find(dev, file_priv, id, DRM_MODE_OBJECT_COLOROP);
-       return mo ? obj_to_colorop(mo) : NULL;
-}
-
 void drm_colorop_pipeline_destroy(struct drm_device *dev);
 void drm_colorop_cleanup(struct drm_colorop *colorop);
 
-- 
2.43.0

Reply via email to