Re: nvidia fb flicker

From: Antonino A. Daplas
Date: Mon Nov 28 2005 - 17:20:31 EST


Marc Koschewski wrote:
> * Antonino A. Daplas <adaplas@xxxxxxxxx> [2005-11-28 22:00:41 +0800]:
>
>> Marc Koschewski wrote:
>>> * Antonino A. Daplas <adaplas@xxxxxxxxx> [2005-11-28 20:31:30 +0800]:
>>>
>>>> Marc Koschewski wrote:
>>>>> * Calin A. Culianu <calin@xxxxxxxxx> [2005-11-26 00:02:46 -0500]:
>>>>>
>>>
>> Try again with CONFIG_FB_NVIDIA_I2C = n in your kernel config.
>>
>> Tony
>
> Tony,
> it works. Could you explain me, what the difference is? :/
>

The problem is nvidiafb trusts the EDID block as gospel truth :-)

You happen to have an EDID block which left the most important fields
blank -- the hsync and vsync range. So the EDID parser extrapolated
the ranges, but since the block has only a single mode entry, 1600x1200@60,
what you get is this:

Nov 28 14:02:32 stiffy kernel: Extrapolated
Nov 28 14:02:32 stiffy kernel: H: 75-75KHz V: 60-60Hz DCLK: 162MHz

Since the min and max value of the sync timings are equal, nvidiafb has
no room left to verify the timings, and will _always_ reject any timings even
if they are valid.

So, try this patch, we make nvidiafb less restrictive by ignoring the
hsync and vsync ranges if the min and max values are equal. This should
make your hardware display properly even if CONFIG_FB_NVIDIA_I2c = y.

Tony


diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index 961007d..ff28610 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -1239,7 +1239,9 @@ static int nvidiafb_check_var(struct fb_
}
}

- if (!mode_valid && info->monspecs.modedb_len)
+ if (!mode_valid && info->monspecs.modedb_len &&
+ !(info->monspecs.hfmin == info->monspecs.hfmax &&
+ info->monspecs.vfmin == info->monspecs.vfmax))
return -EINVAL;

if (par->fpWidth && par->fpHeight && (par->fpWidth < var->xres ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/