Linux LCD驱动中的LCD参数

kernel版本:linux-2.6.34
开发板:PW2440
CPU:S3C3440
LCD:3.5 寸TFT(320×240),Model Name LQ035NC111
LCD的参数设定是需要根据LCD的手册来设定arch/arm/mach-s3c2440/mach-smdk2440.c里面的s3c2410fb_display smdk2440_lcd_cfg结构体 例如从LQ035NC111的手册可以得到如下一个表

Linux LCD驱动中的LCD参数


该表描述了该款并行LCD的所有时钟需求,在这里我参照的全是典型值“Typ”栏 一个很具有参考价值的文档文件是Documentation/fb/framebuffer.txt文件,里面给我们描述了一个架构
  +----------+---------------------------------------------+----------+-------+
  |          |                ↑                            |          |       |
  |          |                |upper_margin                |          |       |
  |          |                ↓                            |          |       |
  +----------###############################################----------+-------+
  |          #                ↑                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |   left   #                |                            #  right   | hsync |
  |  margin  #                |       xres                 #  margin  |  len  |
  |<-------->#<---------------+--------------------------->#<-------->|<----->|
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |yres                        #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                |                            #          |       |
  |          #                ↓                            #          |       |
  +----------###############################################----------+-------+
  |          |                ↑                            |          |       |
  |          |                |lower_margin                |          |       |
  |          |                ↓                            |          |       |
  +----------+---------------------------------------------+----------+-------+
  |          |                ↑                            |          |       |
  |          |                |vsync_len                   |          |       |
  |          |                ↓                            |          |       |
  +----------+---------------------------------------------+----------+-------+

还有一个很有用的公式

Pixelclock:

xfree: in MHz

fb: in picoseconds (ps)

pixclock = 1000000 / DCF

 
再结合结构体

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwsggw.html