星期四, 4月 21, 2005

frame buffer : DirectFB

從DirectFB 的readme 看到。
一般的display card都會支援VESA Mode.
所以可以使用framebuffer的vesa driver.
首先要確認kernel有buildin(或有module) vesafb driver
(在menuconfig的console--framebuffer--vesa 選 * 或是M)
在boot argument中加入:
(以grub為例)
video=vesa:ywrap,mtrr vga=791

從vesa framebuffer的code : driver/video/vesafb.c中可以看到vesa mode支援的option.
   'ywrap' enables panning with wraparound.
'mtrr' enables setting caching type for the frame buffer to write-combining.
vga=791是設定顯示模式
This sets the mode on startup. 791 means 1024x768@16, 788 means 800x600@16.

All VESA Video Modes:

Bits 640x480 800x600 1024x768 1280x1024 1600x1200
8 769 771 773 775 796
16 785 788 791 794 798
32 786 789 792 795 799
所以以上boot argument會啟動vesa framebuffer,並且設定解析度是1024x768 16bit.
framebuffer啟動後,螢幕會變大(廢話),/proc/fb是 framebuffer資訊,
對/dev/fb0寫入資料會影響到螢幕。



沒有留言:

網誌存檔