* [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs
@ 2006-05-09 13:37 Daniel THOMPSON
2006-05-09 14:16 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Daniel THOMPSON @ 2006-05-09 13:37 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: adaplas
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
A patch to tag interlaced modes with 'i' whenever they appear in
.../mode and .../modelist.
--
Daniel Thompson (STMicroelectronics) <daniel.thompson@st.com>
1000 Aztec West, Almondsbury, Bristol, BS32 4SQ. 01454 462659
If a car is a horseless carriage then is a motorcycle a horseless horse?
[-- Attachment #2: linux-2.6.17-rc3-fbdev_tag_interlaced_modes_in_sysfs.patch --]
[-- Type: text/x-patch, Size: 1245 bytes --]
Modify the sysfs description of a video mode such that interlaced modes are
indicated by suffixing the number of visible lines with an i (e.g. U:1920x1080i-50).
This is useful to disambiguate some of the CEA-861 video format timings
(especially those for EDTV).
Signed-off-by: Daniel R Thompson <daniel.thompson@st.com>
Index: linux-2.6.17-rc3/drivers/video/fbsysfs.c
===================================================================
--- linux-2.6.17-rc3.orig/drivers/video/fbsysfs.c 2006-05-03 15:14:16.000000000 +0100
+++ linux-2.6.17-rc3/drivers/video/fbsysfs.c 2006-05-09 14:08:38.000000000 +0100
@@ -95,13 +95,20 @@
const struct fb_videomode *mode)
{
char m = 'U';
+ char *v = "";
+
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";
+
+ return snprintf(&buf[offset], PAGE_SIZE - offset, "%c:%dx%d%s-%d\n",
+ m, mode->xres, mode->yres, v, mode->refresh);
}
static ssize_t store_mode(struct class_device *class_device, const char * buf,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs
2006-05-09 13:37 [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs Daniel THOMPSON
@ 2006-05-09 14:16 ` Geert Uytterhoeven
2006-05-09 14:40 ` Daniel THOMPSON
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2006-05-09 14:16 UTC (permalink / raw)
To: Linux Frame Buffer Device Development; +Cc: adaplas
On Tue, 9 May 2006, Daniel THOMPSON wrote:
> A patch to tag interlaced modes with 'i' whenever they appear in .../mode and
> .../modelist.
And while we're at it, while not tag doublescanned modes with `d'?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs
2006-05-09 14:16 ` Geert Uytterhoeven
@ 2006-05-09 14:40 ` Daniel THOMPSON
0 siblings, 0 replies; 3+ messages in thread
From: Daniel THOMPSON @ 2006-05-09 14:40 UTC (permalink / raw)
To: linux-fbdev-devel
[-- Attachment #1: Type: text/plain, Size: 704 bytes --]
Geert Uytterhoeven wrote:
> On Tue, 9 May 2006, Daniel THOMPSON wrote:
>> A patch to tag interlaced modes with 'i' whenever they appear in .../mode and
>> .../modelist.
>
> And while we're at it, while not tag doublescanned modes with `d'?
[Taken maintainer off CC: while we discuss things].
On reflection I would suggest we go a little further and tag all the
scan types with [p/i/d] since it is typically (very slightly) easier to
parse strings without optional fields.
Revised patch follows.
--
Daniel Thompson (STMicroelectronics) <daniel.thompson@st.com>
1000 Aztec West, Almondsbury, Bristol, BS32 4SQ. 01454 462659
If a car is a horseless carriage then is a motorcycle a horseless horse?
[-- Attachment #2: linux-2.6.17-rc3-fbdev_tag_by_scantype_in_sysfs.patch --]
[-- Type: text/x-patch, Size: 1300 bytes --]
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 CEA-861 video
format timings (especially those for EDTV).
Signed-off-by: Daniel R Thompson <daniel.thompson@st.com>
Index: linux-2.6.17-rc3/drivers/video/fbsysfs.c
===================================================================
--- linux-2.6.17-rc3.orig/drivers/video/fbsysfs.c 2006-05-09 14:29:49.000000000 +0100
+++ linux-2.6.17-rc3/drivers/video/fbsysfs.c 2006-05-09 15:28:21.000000000 +0100
@@ -95,13 +95,22 @@
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-09 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-09 13:37 [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs Daniel THOMPSON
2006-05-09 14:16 ` Geert Uytterhoeven
2006-05-09 14:40 ` Daniel THOMPSON
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).