* basic FB development questions
@ 2008-04-22 22:50 Christian Schoenebeck
2008-04-23 9:01 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Christian Schoenebeck @ 2008-04-22 22:50 UTC (permalink / raw)
To: linux-fbdev-devel
Hi!
I'm currently writing a Linux FB driver for an USB LCD. I've written Linux
drivers before, but not a FB driver yet, so I hope you can help me with some
basic FB development questions.
First of all, AFAIK most FB drivers are based upon memory mapped IO, right?
But in my case the graphics are forwarded via calls of Linux's USB subsystem.
Which FB approach would suggest in this case? Something like the virtual
framebuffer driver with some kind of static allocated buffer? If yes, what
kind of function would I have to implement to trigger the screen sync between
that modified buffer and the hardware (that is sending the buffer's data via
USB to the device)? Or should I implement mmap? I mean: I know everything
about the USB side to recognize the device and sending data etc., I just
don't know how to establish a FB callback or something to "flush" the
suggested graphics buffer.
In the "fb_var_screeninfo" struct there are the following members which I'm
not sure about their precise purpose:
* "pixclock": is that the average speed (in ps) with which one pixel of the
screen is changed?
* "left_margin", "right_margin", "upper_margin", "lower_margin":
I'm confused about these members, I first thought that would be some kind
of reference margin (in pixels), but the header file says those are timing
values?
* "hsync_len", "vsync_len":
what's that exactly and is it a timing or pixel value?
If there are basic docs about FB terms etc, please let me know!
Thanks for any help!
CU
Christian
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: basic FB development questions
2008-04-22 22:50 basic FB development questions Christian Schoenebeck
@ 2008-04-23 9:01 ` Geert Uytterhoeven
2008-04-23 11:41 ` Christian Schoenebeck
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2008-04-23 9:01 UTC (permalink / raw)
To: Christian Schoenebeck; +Cc: linux-fbdev-devel
On Wed, 23 Apr 2008, Christian Schoenebeck wrote:
> First of all, AFAIK most FB drivers are based upon memory mapped IO, right?
> But in my case the graphics are forwarded via calls of Linux's USB subsystem.
> Which FB approach would suggest in this case? Something like the virtual
> framebuffer driver with some kind of static allocated buffer? If yes, what
> kind of function would I have to implement to trigger the screen sync between
> that modified buffer and the hardware (that is sending the buffer's data via
> USB to the device)? Or should I implement mmap? I mean: I know everything
> about the USB side to recognize the device and sending data etc., I just
> don't know how to establish a FB callback or something to "flush" the
> suggested graphics buffer.
Documentation/fb/deferred_io.txt
> In the "fb_var_screeninfo" struct there are the following members which I'm
> not sure about their precise purpose:
>
> * "pixclock": is that the average speed (in ps) with which one pixel of the
> screen is changed?
It's the inverse of the dot clock (in Hz).
> * "left_margin", "right_margin", "upper_margin", "lower_margin":
> I'm confused about these members, I first thought that would be some kind
> of reference margin (in pixels), but the header file says those are timing
> values?
>
> * "hsync_len", "vsync_len":
> what's that exactly and is it a timing or pixel value?
>
> If there are basic docs about FB terms etc, please let me know!
Documentation/fb/framebuffer.txt, section 5. Video Mode Timings.
But if your screen is 100% digital, they may not matter at all, and
zeroes are OK for the margins and sync lengths.
IIRC, fbset doesn't like pixclock being zero, so you should fill in
something.
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
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: basic FB development questions
2008-04-23 9:01 ` Geert Uytterhoeven
@ 2008-04-23 11:41 ` Christian Schoenebeck
0 siblings, 0 replies; 3+ messages in thread
From: Christian Schoenebeck @ 2008-04-23 11:41 UTC (permalink / raw)
To: linux-fbdev-devel
Es geschah am Wednesday, 23. April 2008 11:01 als Geert Uytterhoeven schrieb:
> On Wed, 23 Apr 2008, Christian Schoenebeck wrote:
> > First of all, AFAIK most FB drivers are based upon memory mapped IO,
> > right? But in my case the graphics are forwarded via calls of Linux's USB
> > subsystem. Which FB approach would suggest in this case? Something like
> > the virtual framebuffer driver with some kind of static allocated buffer?
> > If yes, what kind of function would I have to implement to trigger the
> > screen sync between that modified buffer and the hardware (that is
> > sending the buffer's data via USB to the device)? Or should I implement
> > mmap? I mean: I know everything about the USB side to recognize the
> > device and sending data etc., I just don't know how to establish a FB
> > callback or something to "flush" the suggested graphics buffer.
>
> Documentation/fb/deferred_io.txt
Ah, that's a good one!
Seems the "hecubafb" driver is a very good candidate for stealing code for
that USB LCD FB driver.
Thanks a lot Geert!
CU
Christian
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-23 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-22 22:50 basic FB development questions Christian Schoenebeck
2008-04-23 9:01 ` Geert Uytterhoeven
2008-04-23 11:41 ` Christian Schoenebeck
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).