Skip to content

Commit

Permalink
[PATCH] fbdev: tag by scantype in sysfs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel R Thompson authored and Linus Torvalds committed Jun 26, 2006
1 parent 90b4f9a commit 9dac73a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/video/fbsysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,22 @@ static int mode_string(char *buf, unsigned int offset,
const struct fb_videomode *mode)
{
char m = 'U';
char v = 'p';

if (mode->flag & FB_MODE_IS_DETAILED)
m = 'D';
if (mode->flag & FB_MODE_IS_VESA)
m = 'V';
if (mode->flag & FB_MODE_IS_STANDARD)
m = 'S';
return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d-%d\n", m, mode->xres, mode->yres, mode->refresh);

if (mode->vmode & FB_VMODE_INTERLACED)
v = 'i';
if (mode->vmode & FB_VMODE_DOUBLE)
v = 'd';

return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d%c-%d\n",
m, mode->xres, mode->yres, v, mode->refresh);
}

static ssize_t store_mode(struct class_device *class_device, const char * buf,
Expand Down

0 comments on commit 9dac73a

Please sign in to comment.