Skip to content

Commit

Permalink
s3c2410_fb: fix line length calculation
Browse files Browse the repository at this point in the history
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 <johnpcass@yahoo.com>

Signed-off-by: Stefan Schmidt <stefan@openmoko.org>
Signed-off-by: Harald Welte <laforge@openmoko.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
  • Loading branch information
Stefan Schmidt authored and Linus Torvalds committed Jan 22, 2008
1 parent a56d00b commit a103360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/s3c2410fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit a103360

Please sign in to comment.