video: adf: expose adf_modeinfo_set_{name,vrefresh} to drivers
authorGreg Hackmann <ghackmann@google.com>
Thu, 17 Oct 2013 20:18:53 +0000 (13:18 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:53:14 +0000 (13:53 -0800)
Change-Id: Id9f8b2184927a77b244ce0b33d619d6e44a0f17a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
drivers/video/adf/adf.c
drivers/video/adf/adf.h
include/video/adf.h

index 0ae51ac9182ba1f1d3bc4b52e6524e420899b2d1..fd5bcde87850f5bf13172edcb5fab75c31d633c3 100644 (file)
@@ -1092,6 +1092,15 @@ int adf_format_validate_yuv(struct adf_device *dev, struct adf_buffer *buf,
 }
 EXPORT_SYMBOL(adf_format_validate_yuv);
 
+/**
+ * adf_modeinfo_set_name - sets the name of a mode from its display resolution
+ *
+ * @mode: mode
+ *
+ * adf_modeinfo_set_name() fills in @mode->name in the format
+ * "[hdisplay]x[vdisplay](i)".  It is intended to help drivers create
+ * ADF/DRM-style modelists from other mode formats.
+ */
 void adf_modeinfo_set_name(struct drm_mode_modeinfo *mode)
 {
        bool interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE;
@@ -1100,7 +1109,18 @@ void adf_modeinfo_set_name(struct drm_mode_modeinfo *mode)
                 mode->hdisplay, mode->vdisplay,
                 interlaced ? "i" : "");
 }
+EXPORT_SYMBOL(adf_modeinfo_set_name);
 
+/**
+ * adf_modeinfo_set_vrefresh - sets the vrefresh of a mode from its other
+ * timing data
+ *
+ * @mode: mode
+ *
+ * adf_modeinfo_set_vrefresh() calculates @mode->vrefresh from
+ * @mode->{h,v}display and @mode->flags.  It is intended to help drivers
+ * create ADF/DRM-style modelists from other mode formats.
+ */
 void adf_modeinfo_set_vrefresh(struct drm_mode_modeinfo *mode)
 {
        int refresh = 0;
@@ -1126,6 +1146,7 @@ void adf_modeinfo_set_vrefresh(struct drm_mode_modeinfo *mode)
 
        mode->vrefresh = refresh;
 }
+EXPORT_SYMBOL(adf_modeinfo_set_vrefresh);
 
 static int __init adf_init(void)
 {
index 402e9c2862d250a2f13678c367f0302a269c54f8..3bcf1fabc23c648eb8723152d5f21a8b7eeb6aee 100644 (file)
@@ -40,9 +40,6 @@ void adf_attachment_free(struct adf_attachment_list *attachment);
 struct adf_event_refcount *adf_obj_find_event_refcount(struct adf_obj *obj,
                enum adf_event_type type);
 
-void adf_modeinfo_set_name(struct drm_mode_modeinfo *mode);
-void adf_modeinfo_set_vrefresh(struct drm_mode_modeinfo *mode);
-
 static inline int adf_obj_check_supports_event(struct adf_obj *obj,
                enum adf_event_type type)
 {
index 1681354e1e87206bc2621911f054879d5b16bb82..2b742ab463ddc37013fabbea37fbd0c26a84e18a 100644 (file)
@@ -478,4 +478,7 @@ int adf_hotplug_notify_connected(struct adf_interface *intf,
                struct drm_mode_modeinfo *modelist, size_t n_modes);
 void adf_hotplug_notify_disconnected(struct adf_interface *intf);
 
+void adf_modeinfo_set_name(struct drm_mode_modeinfo *mode);
+void adf_modeinfo_set_vrefresh(struct drm_mode_modeinfo *mode);
+
 #endif /* _VIDEO_ADF_H */