From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-fbdev-devel@lists.sourceforge.net,
Luca Tettamanti <kronos@people.it>,
linux-kernel@vger.kernel.org,
James Simmons <jsimmons@infradead.org>,
Dave Airlie <airlied@gmail.com>
Subject: Re: [PATCH] nvidiafb: allow ignoring EDID info
Date: Thu, 22 Feb 2007 16:40:45 +0800 [thread overview]
Message-ID: <1172133646.4086.5.camel@daplas> (raw)
In-Reply-To: <cb7bb73a0702220001u6acbdd95ncdc9fad10d06b421@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]
On Thu, 2007-02-22 at 09:01 +0100, Giuseppe Bilotta wrote:
> On 2/22/07, Antonino A. Daplas <adaplas@gmail.com> wrote:
> > On Wed, 2007-02-07 at 00:08 +0100, Giuseppe Bilotta wrote:
> > >
> > > As mentioned in another post in this thread, I can't get any info out
> > > of the i2c busses, because even when I have them available (i.e. after
> > > loading nvidiafb) I get XXXX all around (on all three of them).
> > > Suggestions on how to get the information welcome.
> >
> > Is this the same monitor you posted here?
> >
> > http://marc.theaimsgroup.com/?l=linux-kernel&m=112807065616218&w=2
> >
> > If yes, we already have the manufacturer and model code. The main
> > problem is that the EDID of this display has no sync range (H: 75-75kHz
> > and V: 60-60Hz). Extending Hsync from 30-75kHz as a fix to the EDID
> > block shouldn't be too hard.
>
> Yes, that's it! Jeepers, I can't believe that even re-reading the past
> LKML posts (even those!) I couldn't find the EDID info and how we had
> gotten them. I guess I need stronger glasses.
>
> Wonder why Luca's proposed patch makes the EDID undetectable, now, and
> why can't it be retrieved at a later time via i2c. Timeouts too small?
>
> > I already have a patch for this which I forgot to send to you
> > before :-). If you can confirm that this is still the same hardware,
> > I'll send you a test patch
>
> Yes, it's the same hardware. I can try the patch, with or without Luca's.
>
>
Okay. Patch attached. You may want to #define DEBUG in
drivers/video/fbmon.c so we can appreciate what happens. Load nvidiafb
with DEBUG defined before and after applying the patch, then send your
'dmesg'.
Tony
[-- Attachment #2: fbmon_add_sharp_uxga --]
[-- Type: text/plain, Size: 6257 bytes --]
fbdev: Add Ultrasharp UXGA to broken monitor database
From: <>
This particular monitor does not have a limits block and has only one set of
monitor timings. Fix by adding a limits block to the EDID and extend the
horizontal sync frequency range to 30 kHz and 75 Khz.
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
---
drivers/video/fbmon.c | 168 +++++++++++++++++++++++++++++++++----------------
1 files changed, 112 insertions(+), 56 deletions(-)
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 6b385c3..05a9464 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -48,8 +48,9 @@ #else
#define DPRINTK(fmt, args...)
#endif
-#define FBMON_FIX_HEADER 1
-#define FBMON_FIX_INPUT 2
+#define FBMON_FIX_HEADER 1
+#define FBMON_FIX_INPUT 2
+#define FBMON_FIX_TIMINGS 3
#ifdef CONFIG_FB_MODE_HELPERS
struct broken_edid {
@@ -71,6 +72,12 @@ static const struct broken_edid brokendb
.model = 0x5a44,
.fix = FBMON_FIX_INPUT,
},
+ /* Sharp UXGA? */
+ {
+ .manufacturer = "SHP",
+ .model = 0x138e,
+ .fix = FBMON_FIX_TIMINGS,
+ },
};
static const unsigned char edid_v1_header[] = { 0x00, 0xff, 0xff, 0xff,
@@ -87,6 +94,55 @@ static void copy_string(unsigned char *c
while (i-- && (*--s == 0x20)) *s = 0;
}
+static int edid_is_serial_block(unsigned char *block)
+{
+ if ((block[0] == 0x00) && (block[1] == 0x00) &&
+ (block[2] == 0x00) && (block[3] == 0xff) &&
+ (block[4] == 0x00))
+ return 1;
+ else
+ return 0;
+}
+
+static int edid_is_ascii_block(unsigned char *block)
+{
+ if ((block[0] == 0x00) && (block[1] == 0x00) &&
+ (block[2] == 0x00) && (block[3] == 0xfe) &&
+ (block[4] == 0x00))
+ return 1;
+ else
+ return 0;
+}
+
+static int edid_is_limits_block(unsigned char *block)
+{
+ if ((block[0] == 0x00) && (block[1] == 0x00) &&
+ (block[2] == 0x00) && (block[3] == 0xfd) &&
+ (block[4] == 0x00))
+ return 1;
+ else
+ return 0;
+}
+
+static int edid_is_monitor_block(unsigned char *block)
+{
+ if ((block[0] == 0x00) && (block[1] == 0x00) &&
+ (block[2] == 0x00) && (block[3] == 0xfc) &&
+ (block[4] == 0x00))
+ return 1;
+ else
+ return 0;
+}
+
+static int edid_is_timing_block(unsigned char *block)
+{
+ if ((block[0] != 0x00) || (block[1] != 0x00) ||
+ (block[2] != 0x00) || (block[4] != 0x00))
+ return 1;
+ else
+ return 0;
+}
+
static int check_edid(unsigned char *edid)
{
unsigned char *block = edid + ID_MANUFACTURER_NAME, manufacturer[4];
@@ -104,9 +160,6 @@ static int check_edid(unsigned char *edi
for (i = 0; i < ARRAY_SIZE(brokendb); i++) {
if (!strncmp(manufacturer, brokendb[i].manufacturer, 4) &&
brokendb[i].model == model) {
- printk("fbmon: The EDID Block of "
- "Manufacturer: %s Model: 0x%x is known to "
- "be broken,\n", manufacturer, model);
fix = brokendb[i].fix;
break;
}
@@ -115,8 +168,10 @@ static int check_edid(unsigned char *edi
switch (fix) {
case FBMON_FIX_HEADER:
for (i = 0; i < 8; i++) {
- if (edid[i] != edid_v1_header[i])
+ if (edid[i] != edid_v1_header[i]) {
ret = fix;
+ break;
+ }
}
break;
case FBMON_FIX_INPUT:
@@ -126,14 +181,33 @@ static int check_edid(unsigned char *edi
if (b[4] & 0x01 && b[0] & 0x80)
ret = fix;
break;
+ case FBMON_FIX_TIMINGS:
+ b = edid + DETAILED_TIMING_DESCRIPTIONS_START;
+
+ for (i = 0; i < 4; i++) {
+ if (edid_is_limits_block(b)) {
+ ret = fix;
+ break;
+ }
+
+ b += DETAILED_TIMING_DESCRIPTION_SIZE;
+ }
+
+ break;
}
+ if (ret)
+ printk("fbmon: The EDID Block of "
+ "Manufacturer: %s Model: 0x%x is known to "
+ "be broken,\n", manufacturer, model);
+
return ret;
}
static void fix_edid(unsigned char *edid, int fix)
{
- unsigned char *b;
+ int i;
+ unsigned char *b, csum = 0;
switch (fix) {
case FBMON_FIX_HEADER:
@@ -145,6 +219,37 @@ static void fix_edid(unsigned char *edid
b = edid + EDID_STRUCT_DISPLAY;
b[0] &= ~0x80;
edid[127] += 0x80;
+ break;
+ case FBMON_FIX_TIMINGS:
+ printk("fbmon: trying to fix monitor timings\n");
+ b = edid + DETAILED_TIMING_DESCRIPTIONS_START;
+ for (i = 0; i < 4; i++) {
+ if (!(edid_is_serial_block(b) ||
+ edid_is_ascii_block(b) ||
+ edid_is_monitor_block(b) ||
+ edid_is_timing_block(b))) {
+ b[0] = 0x00;
+ b[1] = 0x00;
+ b[2] = 0x00;
+ b[3] = 0xfd;
+ b[4] = 0x00;
+ b[5] = 60; /* vfmin */
+ b[6] = 60; /* vfmax */
+ b[7] = 30; /* hfmin */
+ b[8] = 75; /* hfmax */
+ b[9] = 17; /* pixclock - 170 MHz*/
+ b[10] = 0; /* GTF */
+ break;
+ }
+
+ b += DETAILED_TIMING_DESCRIPTION_SIZE;
+ }
+
+ for (i = 0; i < EDID_LENGTH - 1; i++)
+ csum += edid[i];
+
+ edid[127] = 256 - csum;
+ break;
}
}
@@ -273,46 +378,6 @@ static void get_chroma(unsigned char *bl
DPRINTK("WhiteY: 0.%03d\n", specs->chroma.whitey);
}
-static int edid_is_serial_block(unsigned char *block)
-{
- if ((block[0] == 0x00) && (block[1] == 0x00) &&
- (block[2] == 0x00) && (block[3] == 0xff) &&
- (block[4] == 0x00))
- return 1;
- else
- return 0;
-}
-
-static int edid_is_ascii_block(unsigned char *block)
-{
- if ((block[0] == 0x00) && (block[1] == 0x00) &&
- (block[2] == 0x00) && (block[3] == 0xfe) &&
- (block[4] == 0x00))
- return 1;
- else
- return 0;
-}
-
-static int edid_is_limits_block(unsigned char *block)
-{
- if ((block[0] == 0x00) && (block[1] == 0x00) &&
- (block[2] == 0x00) && (block[3] == 0xfd) &&
- (block[4] == 0x00))
- return 1;
- else
- return 0;
-}
-
-static int edid_is_monitor_block(unsigned char *block)
-{
- if ((block[0] == 0x00) && (block[1] == 0x00) &&
- (block[2] == 0x00) && (block[3] == 0xfc) &&
- (block[4] == 0x00))
- return 1;
- else
- return 0;
-}
-
static void calc_mode_timings(int xres, int yres, int refresh,
struct fb_videomode *mode)
{
@@ -795,15 +860,6 @@ static void get_monspecs(unsigned char *
}
}
-static int edid_is_timing_block(unsigned char *block)
-{
- if ((block[0] != 0x00) || (block[1] != 0x00) ||
- (block[2] != 0x00) || (block[4] != 0x00))
- return 1;
- else
- return 0;
-}
-
int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
{
int i;
[-- Attachment #3: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 182 bytes --]
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
next prev parent reply other threads:[~2007-02-22 8:38 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ephv35$4i3$1@sea.gmane.org>
2007-01-29 0:08 ` [PATCH] nvidiafb: allow ignoring EDID info Andrew Morton
2007-01-29 0:12 ` Dave Airlie
2007-01-29 0:27 ` Andrew Morton
2007-01-29 0:29 ` Andrew Morton
2007-01-29 0:39 ` Dave Airlie
2007-01-29 14:37 ` [Linux-fbdev-devel] " Giuseppe Bilotta
2007-01-30 20:33 ` Luca Tettamanti
2007-02-04 20:17 ` [Linux-fbdev-devel] " Luca Tettamanti
2007-02-04 21:17 ` Giuseppe Bilotta
2007-02-05 20:18 ` Luca Tettamanti
2007-02-05 21:28 ` [Linux-fbdev-devel] " Giuseppe Bilotta
2007-02-06 21:22 ` James Simmons
2007-02-07 23:48 ` Luca Tettamanti
2007-02-08 0:19 ` [Linux-fbdev-devel] " Giuseppe Bilotta
2007-02-11 18:17 ` Luca Tettamanti
2007-02-13 9:25 ` [Linux-fbdev-devel] " Giuseppe Bilotta
2007-02-17 18:14 ` Luca Tettamanti
2007-02-17 18:46 ` [Linux-fbdev-devel] " Giuseppe Bilotta
2007-02-08 17:56 ` James Simmons
2007-02-07 23:57 ` Luca Tettamanti
2007-02-06 20:37 ` [Linux-fbdev-devel] " James Simmons
2007-02-06 23:08 ` Giuseppe Bilotta
2007-02-21 23:43 ` Antonino A. Daplas
2007-02-22 8:01 ` [Linux-fbdev-devel] " Giuseppe Bilotta
2007-02-22 8:40 ` Antonino A. Daplas [this message]
[not found] ` <cb7bb73a0702220548s55380f7fk995726ffd349823b@mail.gmail.com>
[not found] ` <1172153358.4306.17.camel@daplas>
2007-02-22 15:55 ` Giuseppe Bilotta
2007-02-22 16:21 ` Antonino A. Daplas
2007-02-22 19:08 ` [Linux-fbdev-devel] " Giuseppe Bilotta
2007-02-22 23:34 ` Antonino A. Daplas
2007-02-23 13:34 ` Giuseppe Bilotta
2007-02-24 7:04 ` Antonino A. Daplas
2007-02-24 9:16 ` Giuseppe Bilotta
2007-02-24 21:16 ` [Linux-fbdev-devel] " Antonino A. Daplas
2007-02-25 10:26 ` Giuseppe Bilotta
2007-02-25 11:10 ` Antonino A. Daplas
2007-02-25 13:16 ` Giuseppe Bilotta
2007-02-26 12:46 ` [Linux-fbdev-devel] " Antonino A. Daplas
2007-02-22 17:03 ` Antonino A. Daplas
2007-02-22 20:39 ` Luca Tettamanti
2007-02-22 23:34 ` Antonino A. Daplas
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=1172133646.4086.5.camel@daplas \
--to=adaplas@gmail.com \
--cc=airlied@gmail.com \
--cc=akpm@osdl.org \
--cc=giuseppe.bilotta@gmail.com \
--cc=jsimmons@infradead.org \
--cc=kronos@people.it \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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 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).