fbset使用

fbset -h

Linux Frame Buffer Device Configuration Version 2.1 (23/06/1999)

(C) Copyright 1995-1999 by Geert Uytterhoeven

 

 

Usage: fbset [options] [mode]

 

Valid options:

General options:

-h, --help : display this usage information

--test : don't change, just test whether the mode is valid

-s, --show : display video mode settings

-i, --info : display all frame buffer information

-v, --verbose : verbose mode

-V, --version : print version information

-x, --xfree86 : XFree86 compatibility mode

-a, --all : change all virtual consoles on this device

Frame buffer special device nodes:

-fb <device> : processed frame buffer device

(default is /dev/fb0)

Video mode database:

-db <file> : video mode database file

(default is /etc/fb.modes)

Display geometry:

-xres <value> : horizontal resolution (in pixels)

-yres <value> : vertical resolution (in pixels)

-vxres <value> : virtual horizontal resolution (in pixels)

-vyres <value> : virtual vertical resolution (in pixels)

-depth <value> : display depth (in bits per pixel)

-nonstd <value> : select nonstandard video mode

-g, --geometry ... : set all geometry parameters at once

-match : set virtual vertical resolution by virtual resolution

Display timings:

-pixclock <value> : pixel clock (in picoseconds)

-left <value> : left margin (in pixels)

-right <value> : right margin (in pixels)

-upper <value> : upper margin (in pixel lines)

-lower <value> : lower margin (in pixel lines)

-hslen <value> : horizontal sync length (in pixels)

-vslen <value> : vertical sync length (in pixel lines)

-t, --timings ... : set all timing parameters at once

Display flags:

-accel <value> : hardware text acceleration enable (false or true)

-hsync <value> : horizontal sync polarity (low or high)

-vsync <value> : vertical sync polarity (low or high)

-csync <value> : composite sync polarity (low or high)

-gsync <value> : synch on green (false or true)

-extsync <value> : external sync enable (false or true)

-bcast <value> : broadcast enable (false or true)

-laced <value> : interlace enable (false or true)

-double <value> : doublescan enable (false or true)

-rgba <r,g,b,a> : recommended length of color entries

-grayscale <value> : grayscale enable (false or true)

Display positioning:

-move <direction> : move the visible part (left, right, up or down)

-step <value> : step increment (in pixels or pixel lines)

(default is 8 horizontal, 2 vertical)

1.设置geometry

fbset -g 800 600 800 600 32

画面分辨率为800 *600,桌面分辨率为800*600 32表示位深,32bpp

2.设置timing

[0] = { /* support LCD 800X600 */

.name = "QY_LCD",

.xres = 800,

.yres = 600,

.left_margin = 61,

.right_margin = 53,

.hsync_len = 120,

.lower_margin= 21,

.upper_margin = 35,

.vsync_len = 6,

// .pxl_clk = 9000000,

.pixclock = KHZ2PICOS(24),

.sync = FB_SYNC_CLK_INVERT | FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,

},

设置之前先解释下pixclock,屏的Clock Period是24ns

-pixclock <value> : pixel clock (in picoseconds) pixclock是1ps 的clock值,即24x1000

 

fbset -t 24000 61 53 21 35 120 6

设备树里面同理

display-timings {

800x600p62 {

clock-frequency = <41600000>;

hactive = <800>;

vactive = <600>;

hfront-porch = <61>;

hback-porch = <53>;

hsync-len = <120>;

vback-porch = <21>;

vfront-porch = <35>;

vsync-len = <6>;

hsync-active = <1>;

vsync-active = <1>;

};

};

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值