From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] nvidiafb: allow ignoring EDID info
Date: Sun, 28 Jan 2007 11:48:59 +0100 [thread overview]
Message-ID: <ephv35$4i3$1@sea.gmane.org> (raw)
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Some nVidia video cards have broken EDID information. Using nvidiafb
with CONFIG_FB_NVIDIA_I2C enabled on these systems causes the console
framebuffer to use wrong timing information, causing the display to be
extremely 'snowy'. Since most distribution kernels are compiled with
CONFIG_FB_NVIDIA_I2C enabled, this prevents usage of the nvidia
framebuffer on said broken system without recompiling the kernel
(or at least the nvidiafb module).
Solve the issue by introducing a new boolean module parameter (useedid)
which can be set to 0 to prevent the driver from using the EDID
information.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
If this patch is accepted, we can probably get rid of CONFIG_FB_NVIDIA_I2C
altogether.
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c
index 8454adf..6387f2b 100644
--- a/drivers/video/nvidia/nv_i2c.c
+++ b/drivers/video/nvidia/nv_i2c.c
@@ -25,6 +25,8 @@
#include "../edid.h"
+extern int useedid;
+
static void nvidia_gpio_setscl(void *data, int state)
{
struct nvidia_i2c_chan *chan = data;
@@ -128,6 +130,9 @@ static int nvidia_setup_i2c_bus(struct nvidia_i2c_chan *chan, const char *name)
void nvidia_create_i2c_busses(struct nvidia_par *par)
{
+ if (!useedid)
+ return;
+
par->bus = 3;
par->chan[0].par = par;
@@ -146,6 +151,9 @@ void nvidia_create_i2c_busses(struct nvidia_par *par)
void nvidia_delete_i2c_busses(struct nvidia_par *par)
{
+ if (!useedid)
+ return;
+
if (par->chan[0].par)
i2c_del_adapter(&par->chan[0].adapter);
par->chan[0].par = NULL;
@@ -195,6 +203,9 @@ static u8 *nvidia_do_probe_i2c_edid(struct nvidia_i2c_chan *chan)
int nvidia_probe_i2c_connector(struct fb_info *info, int conn, u8 **out_edid)
{
+ if (!useedid)
+ return -1;
+
struct nvidia_par *par = info->par;
u8 *edid = NULL;
int i;
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index 538e947..179fd67 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -83,6 +83,9 @@ static int bpp __devinitdata = 8;
#ifdef CONFIG_MTRR
static int nomtrr __devinitdata = 0;
#endif
+#ifdef CONFIG_FB_NVIDIA_I2C
+int useedid __devinitdata = 1;
+#endif
static char *mode_option __devinitdata = NULL;
@@ -1506,6 +1509,11 @@ module_param(nomtrr, bool, 0);
MODULE_PARM_DESC(nomtrr, "Disables MTRR support (0 or 1=disabled) "
"(default=0)");
#endif
+#ifdef CONFIG_FB_NVIDIA_I2C
+module_param(useedid, bool, 0);
+MODULE_PARM_DESC(useedid, "Use EDID to detect video modes (0 or 1) "
+ "(default=1, use EDID)");
+#endif
MODULE_AUTHOR("Antonino Daplas");
MODULE_DESCRIPTION("Framebuffer driver for nVidia graphics chipset");
--
Giuseppe "Oblomov" Bilotta
next reply other threads:[~2007-01-28 10:55 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-28 10:48 Giuseppe Bilotta [this message]
2007-01-28 11:05 ` [PATCH] nvidiafb: allow ignoring EDID info Prakash Punnoor
2007-01-29 0:08 ` Andrew Morton
2007-01-29 0:12 ` [Linux-fbdev-devel] " 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 ` Giuseppe Bilotta
2007-01-30 20:33 ` Luca Tettamanti
2007-02-04 20:17 ` Luca Tettamanti
2007-02-04 21:17 ` Giuseppe Bilotta
2007-02-05 20:18 ` Luca Tettamanti
2007-02-05 21:28 ` Giuseppe Bilotta
2007-02-06 21:22 ` James Simmons
2007-02-07 23:48 ` Luca Tettamanti
2007-02-08 0:19 ` Giuseppe Bilotta
2007-02-11 18:17 ` Luca Tettamanti
2007-02-13 9:25 ` Giuseppe Bilotta
2007-02-17 18:14 ` Luca Tettamanti
2007-02-17 18:46 ` Giuseppe Bilotta
2007-02-08 17:56 ` James Simmons
2007-02-07 23:57 ` Luca Tettamanti
2007-02-06 20:37 ` James Simmons
2007-02-06 23:08 ` Giuseppe Bilotta
2007-02-21 23:43 ` Antonino A. Daplas
2007-02-22 8:01 ` 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 ` Giuseppe Bilotta
2007-02-22 16:21 ` Antonino A. Daplas
2007-02-22 19:08 ` 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 ` 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 ` 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='ephv35$4i3$1@sea.gmane.org' \
--to=giuseppe.bilotta@gmail.com \
--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