SSD_PANEL PARAMETER CONFIG


1. CONFIG FILE INTRODUCTION

The path of the config files in alkaid is project/board/ini/misc/config.ini

When the system starts, it will parse the config files, and then save the different screen parameters to the system and provide them to the display module. Then, according to the parameter setting of the user calling API, obtain the required screen parameters from the system.

The config files are composed of section and variable name:

  • section:

    Fields in "[]" in the file.

  • variable name:

    The field on the left of "=", and the assignment of variable name on the right.

The section is unique, and the same name is not allowed, but the variable name is allowed. As shown above, there can only be one section DACOUT_576I, but m_pPanelName can be in a different section. The system distinguishes variable names according to different sections, and then adds different screen parameters.

The variable name field is predefined by the system. When adding a new screen parameter, you can only fill in the existing ones in the system. Please inform the owner when adding or modifying it, otherwise the system will not recognize it. If the system definition is m_pPanelName, you can only use m_pPanelName to define a new panel name when adding.

An example of variable name assignment is as follows:


2. ADD NEW PARAMETER

  1. The defined new screen parameter section name cannot be the same as the existing one.

  2. Add the section name of the new screen to the m_pnlList of the ROOT section (there can only be one LCD section with different interfaces, for example, there is a TTL panel section name in m_pnlList. If you want to add a new one, you can only delete the previous one.)

  3. Add the new screen parameters to the new section:

    [SAT070AT50H18BH]
    m_pPanelName = "SAT070AT50H18BH_1024x600";
    m_bPanelDither = 0;
    m_ePanelLinkType = 0; #0:ttl 1:lvds 11:mipi
    
    m_bPanelInvDCLK = 0;
    m_bPanelInvDE = 0;
    m_bPanelInvHSync = 0;
    m_bPanelInvVSync = 0;
    
    m_wPanelHSyncWidth = 48;
    m_wPanelHSyncBackPorch = 46;
    m_wPanelVSyncWidth = 4;
    m_wPanelVBackPorch = 23;
    m_wPanelHStart = 98;
    m_wPanelVStart = 27;
    m_wPanelWidth = 1024;
    m_wPanelHeight = 600;
    
    m_wPanelHTotal = 1344;
    m_wPanelVTotal = 635;
    m_wPanelDCLK = 51;
    
    m_wSpreadSpectrumStep = 0;
    m_wSpreadSpectrumSpan = 0;
    
    m_eOutputFormatBitMode = 2; #0:10bit 1:6bit 2:8bit 3:565bit
    
    m_ucPanelSwapChnR = 3;
    m_ucPanelSwapChnG = 2;
    m_ucPanelSwapChnB = 1;
    m_ucPanelSwapRgbML = 1;
    

3. PARAMETER DESCRIPTION

Parameter Description
m_pPanelName panel name
m_bPanelDither 1:enable Dither
0:disable Dither
m_ePanelLinkType Panel Link Type
TTL :0
MIPI_DSI :10
m_bPanelInvDCLK Pixel clk polarity reversal
m_bPanelInvDE DE polarity reversal
m_bPanelInvHSync Hsync polarity reversal
m_bPanelInvVSync Vsync polarity reversal
m_wPanelHSyncWidth Horizontal sync signal width
m_wPanelHSyncBackPorch Horizontal sync signal back porch
m_wPanelVSyncWidth Vertical sync signal width
m_wPanelVBackPorch Vertical sync signal back porch
m_wPanelHStart m_wPanelHSyncWidth+m_wPanelHSyncBackPorch
m_wPanelVStart m_wPanelVSyncWidth+ m_wPanelVBackPorch
m_wPanelWidth Vertical effective pixels
m_wPanelHeight Horizontal effective pixels
m_wPanelHTotal m_wPanelWidth+m_wPanelHSyncWidth+m_wPanelHSyncBackPorch+HsyncFrontPorch
m_wPanelVTotal m_wPanelHeight+m_wPanelVSyncWidth+ m_wPanelVBackPorch+VsyncFrontPorch
m_wPanelDCLK m_wPanelHTotal*m_wPanelVTotal*fps (IP internal use clk)
m_wSpreadSpectrumFreq Clock stretching amplitude modulation (Refer to Spread spectrum calculation)
m_wSpreadSpectrumRatio Clock stretching frequency modulation (Refer to Spread spectrum calculation)
m_eOutputFormatBitMode 10BIT :0
6BIT :1
8BIT :2
565BIT :3
m_ucPanelSwapChnR Swap Channel R
0:default
1:select R 
2:select G
3:select B
m_ucPanelSwapChnG Swap Channel G
0:default
1:select R 
2:select G
3:select B
m_ucPanelSwapChnB Swap Channel B
0:default
1:select R 
2:select G
3:select B
m_ucPanelSwapRgbML Swap Rgb MSB/LSB
0:disable M/L swap
1:enable M/L swap

If it is a MIPI panel, you need to configure MIPI DSI.

MIPI DSI parameter description:

Parameter Description
m_wHsTrail Default: 5
m_wHsPrpr Default: 3
m_wHsZero Default: 5
m_wClkHsPrpr Default: 10
m_wClkHsExit Default: 14
m_wClkTrail Default: 3
m_wClkZero Default: 12
m_wClkHsPost Default: 10
m_wDaHsExit Default: 5
m_wContDet Default:0
m_wLpx Default:16
m_wTaGet Default:26
m_wTaSure Default:24
m_wTaGo Default:50
m_wHactive Follow screen parameter setting
m_wHpw Follow screen parameter setting
m_wHbp Follow screen parameter setting
m_wHfp Follow screen parameter setting
m_wVactive Follow screen parameter setting
m_wVpw Follow screen parameter setting
m_wVbp Follow screen parameter setting
m_wVfp Follow screen parameter setting
m_wBllp 0
m_wFps Default:60
m_eLaneNum one lane :1
two lane :2
three lane :3
four lane :4
m_eFormat RGB565 :0
RGB666 :1
LOOSELY_RGB666 :2
RGB888 :3
m_eCtrlMode CMD_MODE :0
SYNC_PULSE :1
SYNC_EVENT :2
BURST_MODE :3
m_ucClkLane Clk lane selection(default:2)
0:select chn0
1:select chn1
2:select chn2
3:select chn3
4:select chn4
m_ucDataLane0 data lane0 selection(default:4)
0:select chn0
1:select chn1
2:select chn2
3:select chn3
4:select chn4
m_ucDataLane1 data lane1 selection(default:3)
0:select chn0
1:select chn1
2:select chn2
3:select chn3
4:select chn4
m_ucDataLane2 data lane2 selection(default:1)
0:select chn0
1:select chn1
2:select chn2
3:select chn3
4:select chn4
m_ucDataLane3 data lane3 selection(default:0)
0:select chn0
1:select chn1
2:select chn2
3:select chn3
4:select chn4
m_pCmdBuff Mipi panel cmd
m_pCmdBuff=
m_ucPolCh0 Chn0 polarity
0:default
1:positive
m_ucPolCh1 Chn1 polarity
0:default
1:positive
m_ucPolCh2 Chn2 polarity
0:default
1:positive
m_ucPolCh3 Chn3 polarity
0:default
1:positive
2:negative
m_ucPolCh4 Chn4 polarity
0:default
1:positive

Fill in the screen parameters according to the screen specification:

Timing related definition:

Timing definition and screen parameter parameters:

m_wPanelHSyncWidth HSYNC period time
m_wPanelHSyncBackPorch Refer to the requirements of HSYNC blanking, if HSYNC blanking is 320, m_wPanelHSyncBackPorch must be less than 320, and the difference is the size of hsync front porch
m_wPanelVSyncWidth VSYNC period time
m_wPanelVBackPorch Refer to the requirements of VSYNC blanking, if VSYNC blanking is 35, m_wPanelVBackPorch must be less than 35, and the difference is the size of vsync front porch
m_wPanelHStart m_wPanelHSyncWidth+m_wPanelHSyncBackPorch
m_wPanelVStart m_wPanelVSyncWidth+ m_wPanelVBackPorch
m_wPanelWidth Horizonial display area 
m_wPanelHeight Vertical display area
m_wPanelHTotal m_wPanelWidth+HSYNC blanking
m_wPanelVTotal m_wPanelHeight+VSYNC blanking
m_wPanelDCLK m_wPanelHTotal*m_wPanelVTotal*fps

If it is a MIPI panel, you need to configure the MIPI AC timing related parameters. First, find the MIPI timing specification part in the panel specification.

UI calculation:

H\_Total = HACT+HPW+HBP+HFP
V\_Total = VACT+VPW+VBP+VFP
BitsPerPixel=24(RGB888)/18(RGB666)/16(RGB565)
Bitrate = H\_Total \times V\_Total \times FPS \times BitsPerPixel \div lane number
UI = \frac{1}{Bitrate}

For example: 40ns+4 \times UI < HS-PREPARE < 85ns+6\times UI , the corresponding parameters in MIPI AC timing are as follows.

\frac{40ns+4 \times UI}{8 \times UI} < m\_wHsTrail < \frac{85ns+6\times UI}{8 \times UI}

The calculation of other parameters in MIPI AC timing is the same as above.

Note:

The current screen parameter settings need to be updated: config_tool/mi_disp/mhal, if uboot pannel is involved, uboot needs to be updated.