Re: i810fb: fix wrong pixclock for discrete mode selection
From: Andrew Morton <akpm@linux-foundation.org>
Date: 2009-11-19 22:17:31
On Thu, 19 Nov 2009 18:58:01 +0100 Krzysztof Helt [off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Krzysztof Helt <redacted> If the i810fb driver is configured for use only predefined discrete video modes the wrong pixclock value is used. The par->regs.pixclock value is a value from the previous mode when a video mode is switched. It results in unreadable screen if the old video mode has higher resolution and the new mode with the old (high) pixclock is outside attached monitor's specs. Signed-off-by: Krzysztof Helt <redacted> --- I have noticed this testing the patch named "i810fb: Fix stack exploding". This patch requires my patch send to Alan Cox and Andrew Morton named "i810fb: Fix stack exploding".--- drivers/video/i810/i810_dvt.c~ 2009-11-17 19:38:11.002864450 +0100 +++ drivers/video/i810/i810_dvt.c 2009-11-19 18:48:52.518846238 +0100
Please use `patch -p1' form. That would be:
--- a/drivers/video/i810/i810_dvt.c
+++ a/drivers/video/i810/i810_dvt.c
quoted hunk ↗ jump to hunk
@@ -233,7 +233,7 @@ static int i810fb_find_best_mode(u32 xre void i810fb_encode_registers(const struct fb_var_screeninfo *var, struct i810fb_par *par, u32 xres, u32 yres) { - u32 i_best = i810fb_find_best_mode(xres, yres, par->regs.pixclock); + u32 i_best = i810fb_find_best_mode(xres, yres, var->pixclock); par->regs = std_modes[i_best];
Confused. My drivers/video/i810/i810_dvt.c is quiet different from yours:
void i810fb_encode_registers(const struct fb_var_screeninfo *var,
struct i810fb_par *par, u32 xres, u32 yres)
{
u32 diff = 0, diff_best = 0xFFFFFFFF, i = 0, i_best = 0;
u8 hfl;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july