- 论坛徽章:
- 0
|
Kconfig:
config FB_S3C2410
tristate "S3C2410 LCD framebuffer support"
depends on FB && ARCH_S3C2410
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
select FB_SOFT_CURSOR
---help---
Frame buffer driver for the built-in LCD controller in the Samsung
S3C2410 processor.
This driver is also available as a module ( = code which can be
inserted and removed from the running kernel whenever you want). The
module will be called s3c2410fb. If you want to compile it as a module,
say M here and read .
If unsure, say N.
choice
prompt "LCD select"
depends on FB_S3C2410
help
S3C24x0 LCD size select
config FB_S3C2410_S320240
boolean "3.5 inch 320x240 Samsung LCD"
depends on FB_S3C2410
help
3.5 inch 320x240 Samsung LCD
config FB_S3C2410_N240320
boolean "3.5 inch 240X320 NEC LCD"
depends on FB_S3C2410
help
3.5 inch 240x320 NEC LCD
config FB_S3C2410_TFT480272
boolean "4.3inch(480x272) TFT LCD"
depends on FB_S3C2410
help
480x272 TFT LCD
config FB_S3C2410_TFT480290
boolean "480x290 TFT LCD"
depends on FB_S3C2410
help
480x234 TFT LCD
config FB_S3C2410_TFT640480
boolean "8.4 inch 640x480 TFT LCD"
depends on FB_S3C2410
help
8.4 inch 640x480 TFT LCD
config FB_S3C2410_TFT800480
boolean "7 inch 800x480 TFT LCD"
depends on FB_S3C2410
help
7 inch 800x480 TFT LCD
config FB_S3C2410_TFT800600
boolean "12 inch 800x680 TFT LCD"
depends on FB_S3C2410
help
12 inch 800x600 TFT LCD
config FB_S3C2410_TFT1024768
boolean "1024x768 TFT LCD"
depends on FB_S3C2410
help
1024x768 TFT LCD
config FB_S3C2410_VGA640480
boolean "VGA 640x480"
depends on FB_S3C2410
help
VGA 640x480
config FB_S3C2410_VGA800600
boolean "VGA 800x600"
depends on FB_S3C2410
help
VGA 800x600
config FB_S3C2410_VGA1024768
boolean "VGA 1024x768"
depends on FB_S3C2410
help
VGA 1024x768
endchoice
Makefile:
obj-$(CONFIG_VT) += console/
obj-$(CONFIG_LOGO) += logo/
obj-$(CONFIG_SYSFS) += backlight/
obj-$(CONFIG_FB) += fb.o
fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o modedb.o
fb-objs := $(fb-y)
obj-$(CONFIG_FB_S3C2410) += s3c2410fb.o
Framebuffer本身不具备任何运算数据的能力,就只好比是一个暂时存放水的水池.CPU将运算后的结果放到这个水池,水池再将结果流到显示器.中间不会对数据做处理. 应用程序也可以直接读写这个水池的内容.在这种机制下,尽管Framebuffer需要真正的显卡驱动的支持,但所有显示任务都有CPU完成,因此CPU负担很重.
在应用程序中,一般通过将 FrameBuffer 设备映射到进程地址空间的方式使用,比如下面的程序就打开 /dev/fb0 设备,并通过 mmap 系统调用进行地址映射,随后用 memset 将屏幕清空(这里假设显示模式是 1024x768-8 位色模式,线性内存模式):
int fb;
unsigned char* fb_mem;
fb = open ("/dev/fb0", O_RDWR);
fb_mem = mmap (NULL, 1024*768, PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
memset (fb_mem, 0, 1024*768);
(未完)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/92266/showart_1882167.html |
|