aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/adf/adf.c
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-10-17 13:18:53 -0700
committerGreg Hackmann <ghackmann@google.com>2013-10-24 10:05:56 -0700
commitac4ddb027996b6bd023b1659c96961c708f73c02 (patch)
tree1127fb29f6aaf52763ec872a7cb2707c97ca8076 /drivers/video/adf/adf.c
parent96e3384bf3a9703cb6db1131d89eea3f92ffbce6 (diff)
downloadlinaro-lsk-ac4ddb027996b6bd023b1659c96961c708f73c02.tar.gz
video: adf: expose adf_modeinfo_set_{name,vrefresh} to drivers
Change-Id: Id9f8b2184927a77b244ce0b33d619d6e44a0f17a Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'drivers/video/adf/adf.c')
-rw-r--r--drivers/video/adf/adf.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/video/adf/adf.c b/drivers/video/adf/adf.c
index 0ae51ac9182..fd5bcde8785 100644
--- a/drivers/video/adf/adf.c
+++ b/drivers/video/adf/adf.c
@@ -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)
{