From: Daniel THOMPSON <daniel.thompson@st.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs
Date: Tue, 09 May 2006 15:40:53 +0100 [thread overview]
Message-ID: <4460A9F5.4020502@st.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0605091616190.20573@pademelon.sonytel.be>
[-- 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,
prev parent reply other threads:[~2006-05-09 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4460A9F5.4020502@st.com \
--to=daniel.thompson@st.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.