frame buffer display driver

0 views
Skip to first unread message

chinesekongfu

unread,
Jan 15, 2008, 8:38:04 PM1/15/08
to androided
现在正在调试lcd 驱动,底层的LCD驱动应该没有问题了,rgb数据也可以正常显示.

具体,
1.使用以前的2.6.10内核,启动板子,
2. cat /dev/fb0 > screen.dat 保存一幅图象
3. 使用2.6.23内核,启动板子.
4. cat screen.dat > /dev/fb0
5. 发现显示除了起始位置不对,其他的都正常
6. 使用directfb的测试程序,发现不能正常启动

说明framebuffer驱动还是有些问题.

chinesekongfu

unread,
Jan 16, 2008, 10:10:54 PM1/16/08
to androided
用户空间程序一般通过mmap访问framebuffer;一般先调用ioctl获得framebuffer的信息
case FBIOGET_VSCREENINFO:
printk("height: %d width:%d\n",info->var.height,info->var.width);
return copy_to_user(argp, &info->var,
sizeof(var)) ? -EFAULT : 0;



case FBIOGET_FSCREENINFO:

printk("fix->line_length: %d,smem_len:%d\n",info-
>fix.line_length,info->fix.smem_len);
return copy_to_user(argp, &info->fix,
sizeof(fix)) ? -EFAULT : 0;

经过跟踪发现,我使用的驱动info->fix.line_length没有初试化,所以在s3c2410_probe中添加了
fbinfo->fix.visual = FB_VISUAL_TRUECOLOR;
fbinfo->fix.line_length = (240*16)/8;


现在显示正常,用directfb的测试程序./df_dok进行测试,发现一个问题: 2.6.10效率反而高一些.

using 2.6.23

Anti-aliased Text 3.000 secs ( 3350.400
KChars/sec)
Anti-aliased Text (blend) 3.000 secs ( 3092.400
KChars/sec)
Fill Rectangle 3.033 secs ( 108.713
MPixel/sec)
Fill Rectangle (blend) 5.278 secs ( 2.231
MPixel/sec)
Fill Rectangles [10] 3.216 secs ( 109.850
MPixel/sec)
Fill Rectangles [10] (blend) 26.209 secs ( 2.246
MPixel/sec)
Fill Triangles 3.010 secs ( 69.443
MPixel/sec)
Fill Triangles (blend) 4.028 secs ( 2.192
MPixel/sec)
Draw Rectangle 3.007 secs ( 8.779
KRects/sec)
Draw Rectangle (blend) 3.062 secs ( 1.077
KRects/sec)
Draw Lines [10] 3.034 secs ( 26.367
KLines/sec)
Draw Lines [10] (blend) 3.105 secs ( 4.830
KLines/sec)
(!) [ 803: 0.000] --> Caught signal 8 (sent by pfb_ioctl cmd is
0x4601


using 2.6.10
Anti-aliased Text 3.000 secs ( 3487.200
KChars/sec)
Anti-aliased Text (blend) 3.000 secs ( 3224.400
KChars/sec)
Fill Rectangle 3.010 secs ( 109.544
MPixel/sec)
Fill Rectangle (blend) 5.240 secs ( 2.247
MPixel/sec)
Fill Rectangles [10] 3.195 secs ( 110.572
MPixel/sec)
Fill Rectangles [10] (blend) 26.210 secs ( 2.246
MPixel/sec)
Fill Triangles 3.025 secs ( 71.045
MPixel/sec)
Fill Triangles (blend) 3.970 secs ( 2.224
MPixel/sec)
Draw Rectangle 3.000 secs ( 8.966
KRects/sec)
Draw Rectangle (blend) 3.035 secs ( 1.120
KRects/sec)
Draw Lines [10] 3.035 secs ( 27.018
KLines/sec)
Draw Lines [10] (blend) 3.175 secs ( 5.039
KLines/sec)
(!) [ 45: 0.000] --> Caught signal 8 (sent by pid 45, uid 0) <--
Reply all
Reply to author
Forward
0 new messages