* Re: Question abouf FB actual size
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
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2015-04-19 19:29 UTC (permalink / raw)
To: linux-fbdev
On Sun, Apr 19, 2015 at 7:39 PM, Paolo Niccolò Giubelli
<paoloniccolo.giubelli@gmail.com> wrote:
> 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.
1366 * 4 is not a multiple of 64. 5504 is.
I guess your hardware requires each line to start at an address which is a
multiple of 64.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Question abouf FB actual size
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
3 siblings, 0 replies; 5+ messages in thread
From: Paolo Niccolò Giubelli @ 2015-04-19 20:01 UTC (permalink / raw)
To: linux-fbdev
Thank you Geert! So I guess there's some kind of padding after the end
of the line, where I can write anything that has no effect. Do you
know if there's something to check into fb.h so to guess the alignment
requirements?
Greetings,
Paolo Niccolò
On Sun, Apr 19, 2015 at 9:29 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Sun, Apr 19, 2015 at 7:39 PM, Paolo Niccolò Giubelli
> <paoloniccolo.giubelli@gmail.com> wrote:
>> 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.
>
> 1366 * 4 is not a multiple of 64. 5504 is.
> I guess your hardware requires each line to start at an address which is a
> multiple of 64.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Question abouf FB actual size
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
3 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2015-04-19 20:15 UTC (permalink / raw)
To: linux-fbdev
On Sun, Apr 19, 2015 at 10:01 PM, Paolo Niccolò Giubelli
<paoloniccolo.giubelli@gmail.com> wrote:
> On Sun, Apr 19, 2015 at 9:29 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> On Sun, Apr 19, 2015 at 7:39 PM, Paolo Niccolò Giubelli
>> <paoloniccolo.giubelli@gmail.com> wrote:
>>> 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.
>>
>> 1366 * 4 is not a multiple of 64. 5504 is.
>> I guess your hardware requires each line to start at an address which is a
>> multiple of 64.
>
> Thank you Geert! So I guess there's some kind of padding after the end
> of the line, where I can write anything that has no effect. Do you
> know if there's something to check into fb.h so to guess the alignment
> requirements?
The only way to find out is to look at fb_fix_screeninfo.line_length.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Question abouf FB actual size
2015-04-19 17:39 Question abouf FB actual size Paolo Niccolò Giubelli
` (2 preceding siblings ...)
2015-04-19 20:15 ` Geert Uytterhoeven
@ 2015-04-19 20:20 ` Paolo Niccolò Giubelli
3 siblings, 0 replies; 5+ messages in thread
From: Paolo Niccolò Giubelli @ 2015-04-19 20:20 UTC (permalink / raw)
To: linux-fbdev
Perfect! Thank you so much, you've been very precious! :-D
Greetings,
Paolo
On Sun, Apr 19, 2015 at 10:15 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Sun, Apr 19, 2015 at 10:01 PM, Paolo Niccolò Giubelli
> <paoloniccolo.giubelli@gmail.com> wrote:
>> On Sun, Apr 19, 2015 at 9:29 PM, Geert Uytterhoeven
>> <geert@linux-m68k.org> wrote:
>>> On Sun, Apr 19, 2015 at 7:39 PM, Paolo Niccolò Giubelli
>>> <paoloniccolo.giubelli@gmail.com> wrote:
>>>> 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.
>>>
>>> 1366 * 4 is not a multiple of 64. 5504 is.
>>> I guess your hardware requires each line to start at an address which is a
>>> multiple of 64.
>>
>> Thank you Geert! So I guess there's some kind of padding after the end
>> of the line, where I can write anything that has no effect. Do you
>> know if there's something to check into fb.h so to guess the alignment
>> requirements?
>
> The only way to find out is to look at fb_fix_screeninfo.line_length.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread