|
发表于 2008-7-29 22:08:30
|
显示全部楼层
回复 #8 duzhig 的帖子
state 是 lcd_dev->state,来源于 mach->state。
我想当初 william 设计设备框架的时候是准备去除全局变量的,
因为不同架构的 state 数据结构不同。
此值应在每个 mach 中具体赋值,有如下:
/* mach_set_intr, mach_pending_intr, mach_update_intr, state : for devices, such as NET,LCD etc. */
this_mach->mach_set_intr = MACH_IO_SET_INTR_FUNC(s3c44b0x_set_interrupt);
this_mach->mach_pending_intr = MACH_IO_PENDING_INTR_FUNC(s3c44b0x_pending_intr);
this_mach->mach_update_intr = MACH_IO_UPDATE_INTR_FUNC(s3c44b0x_update_intr);
this_mach->state = (void*)state;
lcd_dev->lcd_addr_begin指向的是skyeye里跑的linux的fb内存的物理起始地址。
此函数通过这个地址取得相对应的在 skyeye 里分配的内存起始地址。
这里得到的 dma 是为实际内存内容,
也即 little/big endian 两种字节序的模式其字节序对应也不同,
为加快图形缓冲区的转换,利用此内存直接进行色彩变换,
而非调用通用的 real_read_byte/half_word/word() 函数。
[ 本帖最后由 AnthonyLee 于 2008-7-29 22:10 编辑 ] |
|