s3c2410_fb: fix line length calculation

Fix line length calculation. var->width is the size of the display in mm. We
like to use the pixel size.

Without this fix, dynamic (fbset) based resolution and depths changes with
s3c2410_fb don't work at all.

Spotted by john cass <[email protected]>

Signed-off-by: Stefan Schmidt <[email protected]>
Signed-off-by: Harald Welte <[email protected]>
Acked-by: Ben Dooks <[email protected]>
Acked-by: Arnaud Patard <[email protected]>
Acked-by: Krzysztof Helt <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <torvalds@[email protected]>
This commit is contained in:
Stefan Schmidt 2008-01-21 17:18:27 -08:00 • committed by Linus Torvalds
commit a10336043b

View file

@ -488,7 +488,7 @@ static int s3c2410fb_set_par(struct fb_info *info)
break;
}
info->fix.line_length = (var->width * var->bits_per_pixel) / 8;
info->fix.line_length = (var->xres_virtual * var->bits_per_pixel) / 8;
/* activate this new configuration */