From: Daniel THOMPSON <daniel.thompson@st.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: adaplas@pol.net
Subject: [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs
Date: Tue, 09 May 2006 14:37:30 +0100 [thread overview]
Message-ID: <44609B1A.1010603@st.com> (raw)
[-- 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,
next reply other threads:[~2006-05-09 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-09 13:37 Daniel THOMPSON [this message]
2006-05-09 14:16 ` [PATCH 2.6.17-rc3] fbdev: tag interlaced mode in sysfs Geert Uytterhoeven
2006-05-09 14:40 ` Daniel THOMPSON
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=44609B1A.1010603@st.com \
--to=daniel.thompson@st.com \
--cc=adaplas@pol.net \
--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.