问题
I am trying to change the screen configuration with FBIOPUT_VSCREENINFO, but I do not have a clue how to compute:
__u32 pixclock; /* pixel clock in ps (pico seconds) */
__u32 left_margin; /* time from sync to picture */
__u32 right_margin; /* time from picture to sync */
__u32 upper_margin; /* time from sync to picture */
__u32 lower_margin;
__u32 hsync_len; /* length of horizontal sync */
__u32 vsync_len;
(see: http://lxr.free-electrons.com/source/include/linux/fb.h#L245 ) for the fb_var_screeninfo struct from a given modeline. I tried various alternatives following:
http://www.arachnoid.com/modelines/index.html
but I never get the values of
http://lkml.indiana.edu/hypermail/linux/kernel/9902.0/1388.html
I guess pixclock can be computed with KHZ2PICOS, the remaining I don't seem to get right. Trying the ioctl with my guesswork fails.
Thanks ahead.
回答1:
These two links helped to determine the numbers:
http://www.scribd.com/doc/78015736/Creat-LINUX-Games-Programming-Tutorial-1#page=333
http://casper.berkeley.edu/svn/trunk/roach/sw/linux/Documentation/fb/cyblafb/fb.modes
yet it seems the framebuffer device doesn't let me set the video mode.
来源:https://stackoverflow.com/questions/11530874/fbioput-vscreeninfo-and-modelines