linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s3c2410_fb: Fix line length calculation
@ 2008-01-14 14:40 Stefan Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Schmidt @ 2008-01-14 14:40 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Harald Welte, Arnaud Patard, Ben Dooks

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 <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>

Index: linux-2.6/drivers/video/s3c2410fb.c
===================================================================
--- linux-2.6.orig/drivers/video/s3c2410fb.c
+++ 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] s3c2410_fb: Fix line length calculation
@ 2008-01-18 12:46 krzysztof.h1
  0 siblings, 0 replies; 2+ messages in thread
From: krzysztof.h1 @ 2008-01-18 12:46 UTC (permalink / raw)
  To: linux-fbdev-devel

[-- Attachment #1: Type: TEXT/HTML, Size: 1555 bytes --]

   > Fix line length calculation. var-&gt;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 &lt;johnpcass@yahoo.com&gt;  >   > Signed-off-by: Stefan Schmidt &lt;stefan@openmoko.org&gt;  > Signed-off-by: Harald Welte &lt;laforge@openmoko.org&gt;  > Acked-by: Ben Dooks &lt;ben-linux@fluff.org&gt;  > Acked-by: Arnaud Patard &lt;arnaud.patard@rtp-net.org&gt;  >   > Index: linux-2.6/drivers/video/s3c2410fb.c  > ===================================================================  > --- linux-2.6.orig/drivers/video/s3c2410fb.c  > +++ linux-2.6/drivers/video/s3c2410fb.c  > @@ -488,7 +488,7 @@  >    break;  >   }  >    > - info-&gt;fix.li
 ne_length = (var-&gt;width * var-&gt;bits_per_pixel) / 8;  > + info-&gt;fix.line_length = (var-&gt;xres_virtual * var-&gt;bits_per_pixel) / 8;  >    >   /* activate this new configuration */
   >    >    Please send this patch to Andrew Morton.   Your patch also helps with depth switching.  Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>  Regards, Krzysztof

<TABLE cellPadding="3" bgColor="#ffffff"><TBODY><TR><TD style="font: 12px Courier New, Courier, monotype.com; padding: 3px; background: #ffffff; color: #000000">
<BR>
----------------------------------------------------------------------
<BR>
Nadchodzi galaktyczna wojna!
<BR>
Sprawdz &gt;&gt; <A href="http://link.interia.pl/f1ce0">http://link.interia.pl/f1ce0</a></TD></TR></TBODY></TABLE>



[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #3: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-18 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-14 14:40 [PATCH] s3c2410_fb: Fix line length calculation Stefan Schmidt
  -- strict thread matches above, loose matches on Subject: below --
2008-01-18 12:46 krzysztof.h1

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).