summaryrefslogtreecommitdiff
path: root/linux-core/drm_modes.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-20 16:32:58 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-20 16:32:58 -0700
commit9ca4932054a5bde5dda500ea346ad101bb5c80a0 (patch)
tree3c7084953e0c5b20b5136196da6872af7e23f84d /linux-core/drm_modes.c
parent2d1de1fc6b9ab3524a1247f56ddeea7238c04ea3 (diff)
Add a mode name generation wrapper to make name format changes easier.
Diffstat (limited to 'linux-core/drm_modes.c')
-rw-r--r--linux-core/drm_modes.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-core/drm_modes.c b/linux-core/drm_modes.c
index 7d976d9f..44498c5e 100644
--- a/linux-core/drm_modes.c
+++ b/linux-core/drm_modes.c
@@ -45,6 +45,13 @@ void drm_mode_debug_printmodeline(struct drm_device *dev,
}
EXPORT_SYMBOL(drm_mode_debug_printmodeline);
+void drm_mode_set_name(struct drm_display_mode *mode)
+{
+ snprintf(mode->name, DRM_DISPLAY_MODE_LEN, "%dx%d", mode->hdisplay,
+ mode->vdisplay);
+}
+EXPORT_SYMBOL(drm_mode_set_name);
+
void drm_mode_list_concat(struct list_head *head, struct list_head *new)
{