linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question abouf FB actual size
@ 2015-04-19 17:39 Paolo Niccolò Giubelli
  2015-04-19 19:29 ` Geert Uytterhoeven
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Paolo Niccolò Giubelli @ 2015-04-19 17:39 UTC (permalink / raw)
  To: linux-fbdev

Hello world!
I'm developing a simple city simulator in C, and I'd like to draw the
city map on the framebuffer (it's just for debugging purposes).

There's something wrong with the math, because i have a 1366x768x32
FB, but my finfo.line_length (finfo is obtained via
FBIOGET_FSCREENINFO) is 5504 bytes. Well, 5504/4 (4 is 4 bytes per
pixel) is 1376 that is 10 pixels more than 1366.

Actually if I draw a full line using 5504 bytes everything is ok, if I
use 1366*4 I don't reach the edge of the monitor.

I'm using memset on a memory mapped /dev/fb0 file.

Is there something wrong or am I missing something?

Thank you in advance.

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

end of thread, other threads:[~2015-04-19 20:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-19 17:39 Question abouf FB actual size Paolo Niccolò Giubelli
2015-04-19 19:29 ` Geert Uytterhoeven
2015-04-19 20:01 ` Paolo Niccolò Giubelli
2015-04-19 20:15 ` Geert Uytterhoeven
2015-04-19 20:20 ` Paolo Niccolò Giubelli

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