Skip to contentSkip to conversation

fbdev timings

DISCUSSION Otto Solares 3 participants 4 messages Sep 15, 2003 – Sep 16, 2003 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

hi!

finally i am coding the video part of a "desktop engine", but i want something that works profesionally, i'm using fbdev and embedded mesa for it, i am trying to get the video modes as automagically as posible, in that regard my plan is to hack get-edid (cause we don't have a proper mechanism from userspace, yea modedb is marked _init and the new edid just works in radeons and only usable too from kernelspace -end of critic :) into my software and fallback to a text database like hwdata to obtain monitor specs if edid doesn't work, but i have a problem, how i am supposed to construct fbdev timings with just this info:

- resolution (width x height, 800x600).
- hsync range (31-49 Khz)
- vsync range (48-80 hz)

i do know that is possible to contruct such timings because the monitor specs in windows xp are stored in /windows/inf/monitor.inf and contains only that variables. Please any detailed response in how can they construct their timings with just this variables and how can i use it with fbdevs from userspace in 2.6?

thanks in advance,

-solca

PS. i know 2 questions is a bad habit :) but here goes the other: how can i access fbdev features like acceleration from userspace? or i'm supposed to map the MMIO registers and do my own voodoo?

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#1 lore raw
Quoted 4 lines · Otto Solares

PS. i know 2 questions is a bad habit :) but here goes the other: how can i access fbdev features like acceleration from userspace? or i'm supposed to map the MMIO registers and do my own voodoo?

Clear the FB_ACCELF_TEXT bit in fb_var_screeninfo.accel_flags, mmap the MMIO registers and do your own voodoo.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#3 lore raw
In reply to Otto Solares

Il Mon, Sep 15, 2003 at 01:30:29AM -0600, Otto Solares ha scritto:

Quoted 8 lines

finally i am coding the video part of a "desktop engine", but i want something that works profesionally, i'm using fbdev and embedded mesa for it, i am trying to get the video modes as automagically as posible, in that regard my plan is to hack get-edid (cause we don't have a proper mechanism from userspace, yea modedb is marked _init and the new edid just works in radeons and only usable too from kernelspace -end of critic :)

Userspace can access edid block via sysfs and can do its own parsing.

Quoted 9 lines

into my software
and fallback to a text database like hwdata to obtain monitor specs if edid doesn't work, but i have a problem, how i am supposed to construct fbdev timings with just this info:

- resolution (width x height, 800x600).
- hsync range (31-49 Khz)
- vsync range (48-80 hz)

You can use vesa_modes (in modedb.c) or you can use fb_get_mode (see fbmon.c).

Quoted 6 lines

i do know that is possible to contruct such timings because the monitor specs in windows xp are stored in /windows/inf/monitor.inf and contains only that variables. Please any detailed response in how can they construct their timings with just this variables and how can i use it with fbdevs from userspace in 2.6?

You can get the whole var usign ioctls. Also, once the class_dev stuff is in place (I'll send patches in few minutes) every driver can export its own stuff via sysfs.

Luca

Signature · 10 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Non capisco tutta questa eccitazione per il Multitasking: 
io sono anni che leggo in bagno.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#2 lore raw
In reply to Geert Uytterhoeven
Quoted 8 lines · Geert Uytterhoeven
Quoted 4 lines · Otto Solares

PS. i know 2 questions is a bad habit :) but here goes the other: how can i access fbdev features like acceleration from userspace? or i'm supposed to map the MMIO registers and do my own voodoo?

Clear the FB_ACCELF_TEXT bit in fb_var_screeninfo.accel_flags, mmap the MMIO registers and do your own voodoo.

Ok, thank you.

-solca

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf