Skip to contentSkip to conversation

s3c2410_fb: Fix line length calculation

PATCH New Stefan Schmidt 1 participant 1 message Jan 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 changes with s3c2410_fb don't work at all.

Spotted by john cass <[email protected]>

drivers/video/s3c2410fb.c +1 -1
Index: linux-2.6/drivers/video/s3c2410fb.c
===================================================================
@@ -488,7 +488,7 @@
 		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 */
 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace