Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1222343
  • 博文数量: 105
  • 博客积分: 127
  • 博客等级: 入伍新兵
  • 技术积分: 962
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-29 15:22
文章分类

全部博文(105)

文章存档

2021年(1)

2019年(3)

2018年(1)

2017年(11)

2016年(47)

2015年(32)

2014年(4)

2012年(6)

我的朋友

分类: LINUX

2016-07-19 17:10:24


  fbset 很早就有接触过,但当时只知道用来查看。如下:

root@imx6qdlsolo:~# fbset

mode "1366x768-60"
    # D: 73.078 MHz, H: 47.639 kHz, V: 59.999 Hz
    geometry 1366 768 1408 768 16
    timings 13684 104 32 18 3 32 5
    hsync high
    vsync high
    rgba 5/11,6/5,5/0,0/0
endmode

查看帮助如下:

root@imx6qdlsolo:~# fbset --help
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       : processed frame buffer device
                         (default is /dev/fb0)
  Video mode database:
    -db         : video mode database file
                         (default is /etc/fb.modes)
  Display geometry:
    -xres      : horizontal resolution (in pixels)
    -yres      : vertical resolution (in pixels)
    -vxres     : virtual horizontal resolution (in pixels)
    -vyres     : virtual vertical resolution (in pixels)
    -depth     : display depth (in bits per pixel)
    -nonstd    : select nonstandard video mode
    -g, --geometry ... : set all geometry parameters at once
    -match             : set virtual vertical resolution by virtual resolution
  Display timings:
    -pixclock  : pixel clock (in picoseconds)
    -left      : left margin (in pixels)
    -right     : right margin (in pixels)
    -upper     : upper margin (in pixel lines)
    -lower     : lower margin (in pixel lines)
    -hslen     : horizontal sync length (in pixels)
    -vslen     : vertical sync length (in pixel lines)
    -t, --timings ...  : set all timing parameters at once
  Display flags:
    -accel     : hardware text acceleration enable (false or true)
    -hsync     : horizontal sync polarity (low or high)
    -vsync     : vertical sync polarity (low or high)
    -csync     : composite sync polarity (low or high)
    -gsync     : synch on green (false or true)
    -extsync   : external sync enable (false or true)
    -bcast     : broadcast enable (false or true)
    -laced     : interlace enable (false or true)
    -double    : doublescan enable (false or true)
    -rgba    : recommended length of color entries
    -grayscale : grayscale enable (false or true)
  Display positioning:
    -move  : move the visible part (left, right, up or down)
    -step      : step increment (in pixels or pixel lines)
                         (default is 8 horizontal, 2 vertical)


一看是小有点复杂。今天只说其中的一个参数,-g, --geometry ... : set all geometry parameters at once

fbset -g 1366 768 1920 1080 16 -t 13468 104 32 18 3 32 5
牛逼的地方就在这条命令。画面分辨率为1366 *768,桌面分辨率为1920*1080 。对于
做底层驱动的苦逼,这条命令太重要了。16表示位深,16bpp 。-t 后面的,应该不陌生,就是相应的timing 。

想到了吧?可以在应用层,尝试用这个命令去点屏,这样就快得多了,就一条命令。不用编译
内核,烧写内核等步骤。

可能使用过程中会遇到屏幕不支持等。可以尝试以下操作。
fbset -g 800 600 800 600 16
dd if=/dev/zero of=/dev/fb0
dd if=/dev/zero of=/dev/fb1
fbset -g 1366 768 1366 768 16 -t 13468 104 32 18 3 32 5


cat  /sys/class/graphics/fb0/mode 可以查看当前配置的分辨率。

HDMI 接口这样操作时,有可能导致HDMI音频变调。可能是时钟的原因导致。
可以尝试在cmdline 中配置HDMI AUDIO CLK 。
hdmi_audio_clk=148500000hdmi_audio_clk=74250000




阅读(5830) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~