framebuffer howto2
来源:互联网 发布:年轻人网络用语2016 编辑:程序博客网 时间:2024/06/05 19:53
18. How do I convert XFree86 mode-lines into framebuffer device tim- ings?
If you have XFree86 (X11) installed on your machine, and you can use itsuccessfully, it is a simple matter to convert the mode-lines in yourXF86Config to the required timings needed by the framebuffer
devices.
The framebuffer device requires the following fields
o pixclock - pixel clock in pico seconds
o left_margin - time fron sync to picture
o right_margin - time from picture to sync
o upper_margin - time from sync to picture
o lower_margin - time from picture to sync
o hsync_len - length of horizontal sync
o vsync_len - length of vertical sync
An XFree86 mode line has the following fields
Modeline "1280x1024" DCF HR SH1 SH2 HFL VR SV1 SV2 VFL
It is necessary to do some simple calculations to translate the XF86mode-lines into a set of framebuffer device timings. As an example, weshall examine how to convert a mode-line taken from my XF86Config
file.
Modeline "1280x1024" 110.00 1280 1328 1512 1712 1024 1025 1028 1054
First, calculate the required pixclock rate. XFree86 uses megahertzwhilst framebuffer devices uses picoseconds (Why, I don't know). Divideone million by DCF. For example, 1,000,000 / 110.0 = 9090.9091
Now we need to calculate the horizontal timings.
o left_margin = HFL - SH2
o right_margin = SH1 - HR
o hsync_len = SH2 - SH1
In our example, this would be:
o left_margin = 1712 - 1512 = 200
o right_margin = 1328 - 1280 = 48
o hsync_len = 1512 - 1328 = 184
And now we need to calculate the vertical timings.
o upper_margin = VFL - SV2
o lower_margin = SV1 - VR
o vsync_len = SV2 - SV1
For our example, this would be:
o upper_margin = 1054 - 1028 = 26
o lower_margin = 1025 - 1024 = 1
o vsync_len = 1028 - 1025 = 3
Now we can use this information to set up the framebuffer for thedesired mode. For example, for the matroxfb framebuffer, it requires:video=matrox:xres:<>,yres:<>,depth:<>,left:<>,right:<>,hslen:<>,upper:<>,lower:<>,vslen:<>
I put in my /etc/lilo.conf the following line:
append = "video=matrox:xres:1280,yres:1024,depth:32,left:200,right:48,hslen:184,upper:26,lower:0,vslen:3"
Note that in this case the pixclock isn't used. It's only necessaryif you don't like the default pixclock rates. You can supply this as aparameter as well. Setting the pixclock is documented in other parts ofthis HOWTO.
19. Looking for further information?
For those of you interested in working with the framebuffer drivers, point your browser at
http://www.csoft.net/~systems/jim/fb.html
French speakers, there is a translation at
http://www.freenix.org/unix/linux/HOWTO/mini/Vesafb.html
If you have XFree86 (X11) installed on your machine, and you can use itsuccessfully, it is a simple matter to convert the mode-lines in yourXF86Config to the required timings needed by the framebuffer
devices.
The framebuffer device requires the following fields
o pixclock - pixel clock in pico seconds
o left_margin - time fron sync to picture
o right_margin - time from picture to sync
o upper_margin - time from sync to picture
o lower_margin - time from picture to sync
o hsync_len - length of horizontal sync
o vsync_len - length of vertical sync
An XFree86 mode line has the following fields
Modeline "1280x1024" DCF HR SH1 SH2 HFL VR SV1 SV2 VFL
It is necessary to do some simple calculations to translate the XF86mode-lines into a set of framebuffer device timings. As an example, weshall examine how to convert a mode-line taken from my XF86Config
file.
Modeline "1280x1024" 110.00 1280 1328 1512 1712 1024 1025 1028 1054
First, calculate the required pixclock rate. XFree86 uses megahertzwhilst framebuffer devices uses picoseconds (Why, I don't know). Divideone million by DCF. For example, 1,000,000 / 110.0 = 9090.9091
Now we need to calculate the horizontal timings.
o left_margin = HFL - SH2
o right_margin = SH1 - HR
o hsync_len = SH2 - SH1
In our example, this would be:
o left_margin = 1712 - 1512 = 200
o right_margin = 1328 - 1280 = 48
o hsync_len = 1512 - 1328 = 184
And now we need to calculate the vertical timings.
o upper_margin = VFL - SV2
o lower_margin = SV1 - VR
o vsync_len = SV2 - SV1
For our example, this would be:
o upper_margin = 1054 - 1028 = 26
o lower_margin = 1025 - 1024 = 1
o vsync_len = 1028 - 1025 = 3
Now we can use this information to set up the framebuffer for thedesired mode. For example, for the matroxfb framebuffer, it requires:video=matrox:xres:<>,yres:<>,depth:<>,left:<>,right:<>,hslen:<>,upper:<>,lower:<>,vslen:<>
I put in my /etc/lilo.conf the following line:
append = "video=matrox:xres:1280,yres:1024,depth:32,left:200,right:48,hslen:184,upper:26,lower:0,vslen:3"
Note that in this case the pixclock isn't used. It's only necessaryif you don't like the default pixclock rates. You can supply this as aparameter as well. Setting the pixclock is documented in other parts ofthis HOWTO.
19. Looking for further information?
For those of you interested in working with the framebuffer drivers, point your browser at
http://www.csoft.net/~systems/jim/fb.html
French speakers, there is a translation at
http://www.freenix.org/unix/linux/HOWTO/mini/Vesafb.html
- framebuffer howto2
- FrameBuffer
- FrameBuffer
- FrameBuffer
- Framebuffer
- framebuffer
- FrameBuffer
- Framebuffer
- FrameBuffer
- FrameBuffer
- framebuffer
- framebuffer
- FrameBuffer
- framebuffer
- framebuffer
- framebuffer
- FrameBuffer
- framebuffer
- 一个中国企业家必须具备十大意识
- javvascript 对HTML常用操作
- 回调函数
- framebuffer howto1
- 分布式部署 ArcSDE 和 Oracle 服务
- framebuffer howto2
- timesten中autorefresh的state值的设定
- struts 多图片上传与删除
- Oracle分页
- 使用rowversion防止更新丢失
- 考察数据结构——第三部分:二叉树和BSTs[译]
- Linux下FrameBuffer直接写屏
- Asp.net 2.0 文件下载[支持多线程, 断点续传功能](示例代码下载)
- 将文本中的内容复制到剪贴板中