diff options
author | Daniel R Thompson <daniel.thompson@st.com> | 2006-06-26 03:27:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:32 -0400 |
commit | 9dac73a4ec2c0a791bbfc6630dc4629ce11e68b9 (patch) | |
tree | c09c03d8d02f351d49fc1f60cd3bb74e13acd735 /drivers/video/fbsysfs.c | |
parent | 90b4f9aca4d124d114e02bbb3d1d4f3d1d47138f (diff) |
[PATCH] fbdev: tag by scantype in sysfs
Modify the sysfs description of a video mode such that modes are tagged with
their scan type, (p)rogessive, (i)nterlaced, (d)ouble scan. For example,
U:1920x1080i-50. This is useful to disambiguate some of the 'consumer' video
timings found in CEA-861 (especially those for EDTV).
Signed-off-by: Daniel R Thompson <daniel.thompson@st.com>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/fbsysfs.c')
-rw-r--r-- | drivers/video/fbsysfs.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index 3ceb8c1b392..6de02189abb 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
@@ -100,13 +100,22 @@ static int mode_string(char *buf, unsigned int offset, | |||
100 | const struct fb_videomode *mode) | 100 | const struct fb_videomode *mode) |
101 | { | 101 | { |
102 | char m = 'U'; | 102 | char m = 'U'; |
103 | char v = 'p'; | ||
104 | |||
103 | if (mode->flag & FB_MODE_IS_DETAILED) | 105 | if (mode->flag & FB_MODE_IS_DETAILED) |
104 | m = 'D'; | 106 | m = 'D'; |
105 | if (mode->flag & FB_MODE_IS_VESA) | 107 | if (mode->flag & FB_MODE_IS_VESA) |
106 | m = 'V'; | 108 | m = 'V'; |
107 | if (mode->flag & FB_MODE_IS_STANDARD) | 109 | if (mode->flag & FB_MODE_IS_STANDARD) |
108 | m = 'S'; | 110 | m = 'S'; |
109 | return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d-%d\n", m, mode->xres, mode->yres, mode->refresh); | 111 | |
112 | if (mode->vmode & FB_VMODE_INTERLACED) | ||
113 | v = 'i'; | ||
114 | if (mode->vmode & FB_VMODE_DOUBLE) | ||
115 | v = 'd'; | ||
116 | |||
117 | return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d%c-%d\n", | ||
118 | m, mode->xres, mode->yres, v, mode->refresh); | ||
110 | } | 119 | } |
111 | 120 | ||
112 | static ssize_t store_mode(struct class_device *class_device, const char * buf, | 121 | static ssize_t store_mode(struct class_device *class_device, const char * buf, |