set lcd0_enable 1
//set lcd0_params 1280x720-32@60
set lcd0_params 1280x720-16@60
改成16位色就可以,具体原因不明
测试时候读用cat命令,写用cp
在硬盘上用 cat xxx.mpg > /dev/null 读硬盘数据,闪烁严重
cp /usb/test /mnt/test1 闪烁较少,但是也有
usb上读写都没闪烁
还有一个奇怪现象就是,读写东西之后,内存free减少了,umount之后又回来了。
/ # cp /usb/test1 /mnt/test2
/ # free
total used free shared buffers
Mem: 510548 466244 44304 0 736
-/+ buffers: 465508 45040
Swap: 0 0 0
/ #
------------------------------------------------------------------
32bit和16bit下fbset的输出:
/mnt # fbset
mode "1280x720-60"
# D: 74.250 MHz, H: 45.000 kHz, V: 60.000 Hz
geometry 1280 720 1280 720 16
timings 13468 220 110 20 5 40 5
accel false
rgba 5/11,6/5,5/0,0/0
endmode
/ # fbset
mode "1280x720-60"
# D: 74.250 MHz, H: 45.000 kHz, V: 60.000 Hz
geometry 1280 720 1280 720 32
timings 13468 220 110 20 5 40 5
accel false
rgba 8/16,8/8,8/0,8/24
endmode
/*
* Default mode database.
*/
static struct fb_videomode video_modes[] = {
…
[13] = { /* 1280x720@60 */
.pixclock = 0,
.refresh = 60,
.xres = 1280, /* 1328 */
.yres = 720, /* 816 */
.hsync_len = 40,
.left_margin = 220,
.right_margin = 110,
.vsync_len = 5,
.upper_margin = 20,
.lower_margin = 5,
.sync = 0,
}
clcd_platform_init函数中计算pixclock:
for (i = 0; i < ARRAY_SIZE(video_modes); i++) {
total_x = video_modes[i].xres + video_modes[i].hsync_len +
video_modes[i].left_margin +
video_modes[i].right_margin;
total_y = video_modes[i].yres + video_modes[i].vsync_len +
video_modes[i].upper_margin +
video_modes[i].lower_margin;
div_result = 1000000000000ll;
do_div(div_result,
(total_x * total_y * video_modes[i].refresh));
video_modes[i].pixclock = div_result;
}
启动时候关于lcd的调试信息:
Dove FB driver:
Initialize /proc/mv_dump_lcd0
use cat /proc/mv_dump_lcd0 to see reg settings
dovefb_parse_options begin.--------------------------------
o Kernel parameter: 1280x720-16@60.
dovefb_parse_options end.--------------------------------
dovefb_config_vga_calibration.--------------------------------
dovefb_set_defaults begin
reg_base--------------0xc09a0000
dovefb_set_defaults end
dovefb_set_mode
set_dumb_panel_control
------------<GFX Layer 0 video mode database>-----------
mode 0: <1920x1200@60> pico=5177
fb timings 336 128 38 1 208 3
xorg timings 1920 2048 2256 2592 1200 1201 1204 1242
mode 1: <1920x1080@60> pico=6734
fb timings 148 88 36 4 44 5
xorg timings 1920 2008 2052 2200 1080 1084 1089 1125
mode 2: <1650x1050@60> pico=6888
fb timings 288 104 33 1 184 3
xorg timings 1650 1754 1938 2226 1050 1051 1054 1087
mode 3: <1366x 768@60> pico=11659
fb timings 216 72 23 1 144 3
xorg timings 1366 1438 1582 1798 768 769 772 795
mode 4: <1280x1024@60> pico=9262
fb timings 248 48 38 1 112 3
xorg timings 1280 1328 1440 1688 1024 1025 1028 1066
mode 5: <1280x 720@60> pico=13468
fb timings 220 110 20 5 40 5
xorg timings 1280 1390 1430 1650 720 725 730 750
mode 6: <1024x 768@85> pico=10581
fb timings 208 48 36 1 96 3
xorg timings 1024 1072 1168 1376 768 769 772 808
mode 7: <1024x 768@70> pico=13346
fb timings 144 24 29 3 136 6
xorg timings 1024 1048 1184 1328 768 771 777 806
mode 8: <1024x 768@60> pico=15385
fb timings 160 24 29 3 136 6
xorg timings 1024 1048 1184 1344 768 771 777 806
mode 9: <1024x 600@60> pico=22401
fb timings 38 38 8 8 100 4
xorg timings 1024 1062 1162 1200 600 608 612 620
mode 10: < 800x 600@85> pico=17790
fb timings 152 32 27 1 64 3
xorg timings 800 832 896 1048 600 601 604 631
mode 11: < 800x 600@75> pico=20234
fb timings 160 16 21 1 80 2
xorg timings 800 816 896 1056 600 601 603 624
mode 12: < 800x 600@72> pico=20052
fb timings 64 56 23 37 120 6
xorg timings 800 856 976 1040 600 637 643 666
mode 13: < 800x 600@60> pico=25131
fb timings 88 40 23 1 128 4
xorg timings 800 840 968 1056 600 601 605 628
mode 14: < 800x 600@56> pico=26515
fb timings 128 32 14 1 128 4
xorg timings 800 832 960 1088 600 601 605 619
mode 15: < 640x 480@85> pico=27780
fb timings 112 32 25 1 48 3
xorg timings 640 672 720 832 480 481 484 509
mode 16: < 640x 480@75> pico=31746
fb timings 48 16 32 11 96 2
xorg timings 640 656 752 800 480 491 493 525
mode 17: < 640x 480@72> pico=32102
fb timings 128 24 28 9 40 3
xorg timings 640 664 704 832 480 489 492 520
mode 18: < 640x 480@60> pico=39758
fb timings 48 16 31 11 96 2
xorg timings 640 656 752 800 480 491 493 524
found <1280x720@60>, pixclock=13468
dovefb_init_mode
needed_pixclk = 74250074.
N = 49, M = 1, K = 1, full_div = 16, half = 1, pll_vco = 6.
dovefb_gfx_set_par
dovefb_gfx_init.--------------------------------
dovefb_ovly_init.--------------------------------
sda1
sd 1:0:2:0: [sda] Sector size 0 reported, assuming 512.
needed_pixclk = 74250074.
N = 49, M = 1, K = 1, full_div = 16, half = 1, pll_vco = 6.
sd 1:0:2:0: [sda] Attached SCSI disk
toto:比较16位不同,查datasheet
------------------------------------------------------------------