From: Luca Tettamanti <kronos@people.it>
To: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>,
James Simmons <jsimmons@infradead.org>,
linux-fbdev-devel@lists.sourceforge.net,
Andrew Morton <akpm@osdl.org>, Dave Airlie <airlied@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvidiafb: allow ignoring EDID info
Date: Sun, 11 Feb 2007 19:17:43 +0100 [thread overview]
Message-ID: <20070211181743.GA15801@dreamland.darkstar.lan> (raw)
In-Reply-To: <cb7bb73a0702071619p5984c39fs16e3d05c11d45585@mail.gmail.com>
Sorry for the delay.
Il Thu, Feb 08, 2007 at 01:19:08AM +0100, Giuseppe Bilotta ha scritto:
> On 2/8/07, Luca Tettamanti <kronos@people.it> wrote:
> >Il Tue, Feb 06, 2007 at 09:22:00PM +0000, James Simmons ha scritto:
> >> There is no stand alone nvidia card i2c driver. Its the issue of sharing
> >> device interfaces with the same hardware problem again!!!
> >
> >Nah, nvidiafb registers the I2C busses, you can drive them with whatever
> >you want through the devices exported by I2C core.
> >The fact the none of them work makes me think that the EDID is coming
> >from the BIOS, we do VBE calls in real mode during early kernel setup.
>
> So what am I supposed to do to dump it, since neither i2cdump neither
> get-edid seem to work?
Good question :)
The following patch fixes a real bug in SCL control and add a few debug
info. Can you try it?
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c
index 8454adf..ca8bd7e 100644
--- a/drivers/video/nvidia/nv_i2c.c
+++ b/drivers/video/nvidia/nv_i2c.c
@@ -25,6 +25,12 @@
#include "../edid.h"
+#define DDC_SDA_READ_MASK (1 << 3)
+#define DDC_SCL_READ_MASK (1 << 2)
+#define DDC_SDA_WRITE_MASK (1 << 4)
+#define DDC_SCL_WRITE_MASK (1 << 5)
+
+
static void nvidia_gpio_setscl(void *data, int state)
{
struct nvidia_i2c_chan *chan = data;
@@ -35,9 +41,9 @@ static void nvidia_gpio_setscl(void *data, int state)
val = VGA_RD08(par->PCIO, 0x3d5) & 0xf0;
if (state)
- val |= 0x20;
+ val |= DDC_SDA_WRITE_MASK;
else
- val &= ~0x20;
+ val &= ~DDC_SDA_WRITE_MASK;
VGA_WR08(par->PCIO, 0x3d4, chan->ddc_base + 1);
VGA_WR08(par->PCIO, 0x3d5, val | 0x1);
@@ -53,9 +59,9 @@ static void nvidia_gpio_setsda(void *data, int state)
val = VGA_RD08(par->PCIO, 0x3d5) & 0xf0;
if (state)
- val |= 0x10;
+ val |= DDC_SDA_WRITE_MASK;
else
- val &= ~0x10;
+ val &= ~DDC_SDA_WRITE_MASK;
VGA_WR08(par->PCIO, 0x3d4, chan->ddc_base + 1);
VGA_WR08(par->PCIO, 0x3d5, val | 0x1);
@@ -68,11 +74,9 @@ static int nvidia_gpio_getscl(void *data)
u32 val = 0;
VGA_WR08(par->PCIO, 0x3d4, chan->ddc_base);
- if (VGA_RD08(par->PCIO, 0x3d5) & 0x04)
+ if (VGA_RD08(par->PCIO, 0x3d5) & DDC_SCL_READ_MASK)
val = 1;
- val = VGA_RD08(par->PCIO, 0x3d5);
-
return val;
}
@@ -83,7 +87,7 @@ static int nvidia_gpio_getsda(void *data)
u32 val = 0;
VGA_WR08(par->PCIO, 0x3d4, chan->ddc_base);
- if (VGA_RD08(par->PCIO, 0x3d5) & 0x08)
+ if (VGA_RD08(par->PCIO, 0x3d5) & DDC_SDA_READ_MASK)
val = 1;
return val;
@@ -188,7 +192,7 @@ static u8 *nvidia_do_probe_i2c_edid(struct nvidia_i2c_chan *chan)
if (i2c_transfer(&chan->adapter, msgs, 2) == 2)
return buf;
- dev_dbg(&chan->par->pci_dev->dev, "Unable to read EDID block.\n");
+ dev_warn(&chan->par->pci_dev->dev, "Unable to read EDID block.\n");
kfree(buf);
return NULL;
}
@@ -208,7 +212,10 @@ int nvidia_probe_i2c_connector(struct fb_info *info, int conn, u8 **out_edid)
if (!edid && conn == 1) {
/* try to get from firmware */
- const u8 *e = fb_firmware_edid(info->device);
+ const u8 *e;
+ printk("I2C probe failed for connector %d, falling back to firmware\n", conn);
+
+ e = fb_firmware_edid(info->device);
if (e != NULL)
edid = kmemdup(e, EDID_LENGTH, GFP_KERNEL);
Luca
--
"La teoria e` quando sappiamo come funzionano le cose ma non funzionano.
La pratica e` quando le cose funzionano ma non sappiamo perche`.
Abbiamo unito la teoria e la pratica: le cose non funzionano piu` e non
sappiamo il perche`." -- A. Einstein
-------------------------------------------------------------------------
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
next prev parent reply other threads:[~2007-02-11 18:18 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 [this message]
2007-02-13 9:25 ` 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
[not found] ` <cb7bb73a0702220548s55380f7fk995726ffd349823b@mail.gmail.com>
[not found] ` <1172153358.4306.17.camel@daplas>
2007-02-22 15:55 ` [Linux-fbdev-devel] " 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=20070211181743.GA15801@dreamland.darkstar.lan \
--to=kronos@people.it \
--cc=airlied@gmail.com \
--cc=akpm@osdl.org \
--cc=giuseppe.bilotta@gmail.com \
--cc=jsimmons@infradead.org \
--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).