当前位置:网站首页>LVDS drive adapter

LVDS drive adapter

2022-06-12 07:02:00 Handsome without friends~

One : Corresponding parameters

        Screen parameter structure :

struct fb_videomode 
{
    const char *name; // Displays the device name , The kernel passes through  u-boot  Parameters in  video  Field and this  name  As a match identifier 
    u32 refresh; // The refresh rate 
    u32 xres; // Number of row pixels 
    u32 yres; // Number of column pixels 
    u32 pixclock; // The length of each pixel clock cycle , The unit is picosecond 
    u32 left_margin; // Number of left edge pixels 
    u32 right_margin; // Number of right edge pixels 
    u32 upper_margin; // Number of upper edge pixels 
    u32 lower_margin; // Number of lower edge pixels 
    u32 hsync_len; // Row synchronization pulse width 
    u32 vsync_len; // Field synchronous pulse width 
    u32 sync; // Synchronous signal polarity 
    u32 vmode; // The default setting is  FB_VMODE_NONINTERLACED
    u32 flag; // The default setting is  FB_MODE_IS_DETAILED
};

kernel_imx/include/linux/fb.h 

 Insert picture description here

xres:TEP                          yres:Tvd

left_margin:Thf                 right_margin:Thb

hsync_len:THS                 vsync_len:Tvs

upper_margin:Tvf             lower_margin:Tvb

Pixelclock:

xfree: in MHz

fb: in picoseconds (ps)

pixclock = 1000000 / DCF

 Insert picture description here

  The above example LCD Corresponding fb The parameters are as follows :

.pixclock = 1000000/64=15625, 
.xres = 768, 
.yres = 1024, 
.left_margin =0, 
.right_margin = 180, 
.hsync_len =THS= TH-THD-THB=948-768-180=0 , 
.upper_margin = 0, 
.lower_margin = TVB=116, 
.vsync_len = TVS=TV-TVD-TVB=1140-1024-116=0,

Two :LCD drive

LCD The relevant kernel driver files are :kernel_imx/drivers/video/fbdev/mxc/mxc_lcdif.c.

add to LCD Methods supported by LCD :

stay kernel_imx/drivers/video/fbdev/mxc/mxc_lcdif.c Of documents struct fb_videomode lcdif_modedb Add the corresponding... To the array LCD Screen parameters

3、 ... and :LVDS drive

LVDS The relevant kernel driver files are :kernel_imx/drivers/video/fbdev/mxc/ldb.c.

add to LVDS Methods supported by the screen :

stay kernel_imx/drivers/video/fbdev/mxc/ldb.c Of documents struct fb_videomode ldb_modedb Add parameters corresponding to the screen to the array :

Four :u-boot Specify the device name

 u-boot Set up video Device name of parameter , Must be with ldb_modedb Add the same name .

 bootable/bootloader/uboot-imx/include/configs/mx6sabre_common.h

                                                         bootable/bootloader/uboot-imx/arch/arm/imx-common/video.c                                                                      

imx6q lvds Show learning and understanding  

原网站

版权声明
本文为[Handsome without friends~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010603040128.html