专栏算法工具链J5 EVM显示

J5 EVM显示

费小财2024-08-08
120
0

J5 EVM显示地平线logo画面

1通路流程图及外部设备连接


该通路可验证IDU、MIPI TX_0、HDMI子板3个模块的功能,其中IDU模块从eMMC中读取数据并发送给MIPI TX_0,MIPI TX_0把数据再发给HDMI子板,HDMI子板负责信号转换,最后把信号显示到HDMI屏幕上。

HDMI子板接到MIPI_TX卡槽上。

1.2测试代码位置

测试代码位置在工程代码根目录/vapi-sample/j5_board_evm/vio_scenario/sample1_vio_scenario目录下面。  

1.3测试脚本使用说明

case运行15s。

/app/bin/vps/vpm/evm/sample_test_case.sh evm_tx0_idu0yuv_hdmi_1080p_logo

2配置文件说明

2.1 IDU配置文件说明

1. {  
2.     "memory_config":  
3.     {  
4.         "mem_mode": 0  
5.     },  
6.     "channel0_config":  
7.     {  
8.         "ch_en": 1,  
9.         "pri": 2,  
10.         "src_width": 318,  
11.         "src_height": 98,  
12.         "format": 6,  
13.         "xpos": 1600,  
14.         "ypos": 10,  
15.         "alpha_sel": 0,  
16.         "overmode": 0,  
17.         "alpha_en": 1,  
18.         "alpha": 50,  
19.         "key-color": 0,  
20.         "crop_width": 318,  
21.         "crop_height": 98  
22.     },  
23.     "channel1_config":  
24.     {  
25.         "ch_en": 1,         -- 使能通道  
26.         "pri": 3,           -- 通道的优先级为3  
27.         "src_width": 1920,  -- logo的宽  
28.         "src_height": 1080, -- logo的高  
29.         "format": 6,        -- 数据格式配置为FORMAT_YUV420SP_UV  
30.         "xpos": 0,          -- xpos/ypos决定图片从左上角不做偏移开始显示  
31.         "ypos": 0,  
32.         "alpha": 255,       -- alpha_sel为0表示越大越不透明,反之,alpha_sel为1表示越大越透明  
33.         "alpha_sel": 0,  
34.         "overmode": 0,  
35.         "alpha_en": 1,      -- 使能透明度  
36.         "key-color": 0,  
37.         "crop_width": 1920, -- 原图不进行裁剪  
38.         "crop_height": 1080  
39.     },  
40.     "channel2_config":  
41.     {  
42.         "ch_en": 0,  
43.         "pri": 0,  
44.         "src_width": 1920,  
45.         "src_height": 1080,  
46.         "format": 4,  
47.         "xpos": 0,  
48.         "ypos": 0,  
49.         "alpha": 255,  
50.         "alpha_sel": 0,  
51.         "overmode": 0,  
52.         "alpha_en": 1,  
53.         "key-color": 0,  
54.         "crop_width": 1920,  
55.         "crop_height": 1080  
56.     },  
57.     "channel3_config":  
58.     {  
59.         "ch_en": 0,  
60.         "pri": 1,  
61.         "src_width": 1920,  
62.         "src_height": 1080,  
63.         "format": 4,  
64.         "xpos": 0,  
65.         "ypos": 0,  
66.         "alpha": 255,  
67.         "alpha_sel": 0,  
68.         "overmode": 0,  
69.         "alpha_en": 1,  
70.         "key-color": 0,  
71.         "crop_width": 1920,  
72.         "crop_height": 1080  
73.     },  
74.     "upscale_config":  
75.     {  
76.         "scale_en": 0,  
77.         "src_size_width": 1920,  
78.         "src_size_height": 1080,  
79.         "tgt_size_width": 1920,  
80.         "tgt_size_height": 1080  
81.     },  
82.     "timing_config":  
83.     {  
84.         "hbp": 148,  
85.         "hfp": 88,  
86.         "hs": 44,  
87.         "vbp": 36,  
88.         "vfp": 10,  
89.         "vs": 5,  
90.         "vfp_cnt": 0  
91.     },  
92.     "outputconfig":  
93.     {  
94.         "output_mode": 4,  
95.         "panel_width": 1920,  
96.         "panel_height": 1080,  
97.         "display_addr_type": 2,  
98.         "display_cam_no": 0,  
99.         "display_addr_type_layer1": 0,  
100.         "display_cam_no_layer1": 0,  
101.         "backlight_level": 10,  
102.         "panel_type": 1,  
103.         "bg_color": 16744328,  
104.         "contrast_en": 0,  
105.         "contrast_val": 0,  
106.         "bright_en": 0,  
107.         "bright_val": 0,  
108.         "off_contrast": 0,  
109.         "sat_en": 0,  
110.         "sat_val": 0,  
111.         "hue_en": 0,  
112.         "theta_sign": 0,  
113.         "theta_abs": 0,  
114.         "dithering_en": 0,  
115.         "dithering_flag": 0,  
116.         "gamma_en": 0,  
117.         "gamma_val": 0,  
118.         "user_refresh": 1,  
119.         "user_refresh_layer1": 1,  
120.         "rotate": 0,  
121.         "platform": 1,  
122.         "big_endian": 0  
123.     }  
124. }  

2.2 Mipi配置文件说明

1. {  
2.     "mipi": {  
3.         "base": {  
4.             "lane": 4,  
5.             "datatype""0x1e",  
6.             "mclk": 24,  
7.             "mipiclk": 6000,  
8.             "fps": 30,  
9.             "width": 1920,  
10.             "height": 1080,  
11.             "linelenth": 4464,  
12.             "framelenth": 2800,  
13.             "settle": 20  
14.         },  
15.         "host": {               -- HOST独有的配置项  
16.             "enable": 0,        -- 1-使能,0-不使能(操作时忽略,为0时下述配置都忽略)  
17.             "hsa": 0,           -- IPI的HSA配置,0-使用驱动默认值(4)  
18.             "hbp": 0,           -- IPI的HBP配置,0-使用驱动默认值(4)   
19.             "hsd": 0,           -- IPI的HSD配置,0-使用驱动默认值(根据base内参数计算而来)  
20.             "vc_num": 2,        -- 接入VC(使用IPI)的数量(注:Host2/3最多只支持2路VC)  
21.             "vc0_index": 0,     -- VC0绑定到IPI1  
22.             "vc1_index": 1,     -- VC1绑定到IPI2  
23.             "vc2_index": 2,     -- VC2绑定到IPI3  
24.             "vc3_index": 3      -- VC3绑定到IPI4  
25.         },  
26.         "dev": {                     -- DEV独有的配置项  
27.             "enable": 1,             -- 1/2-使能dev0/1,0-不使能(操作时忽略,为0时下述配置都忽略)  
28.             "vpg": 0,                -- VPG模式:b0=0-禁止/1-使能,b1=0-竖条纹/1-横条纹,b2=0-ColorBar/1-BER,b7:3=VC  
29.             "ipi_lines": 1117,       -- IPI的总行数,0-使用驱动默认(为height+1)  
30.             "dev_base": {            -- 非必须,只有在dev和host的base配置不同时可单独配置dev的base配置  
31.                 "lane": 4,           -- dphy为4lane模式  
32.                 "datatype""0x1e",  -- mipi数据类型: 0x2c-RAW12,更多可参见后文  
33.                 "mclk": 24,  
34.                 "mipiclk": 4200,     -- MIPI总传输率(所有LANE): -> 每lane的速率为mipiclk/lane/2;  
35.                 "fps": 30,  
36.                 "width": 1920,       -- 图宽pixel (HOST无对应寄存器,DEV有相应寄存器)  
37.                 "height": 1080,      -- 图高lines (HOST无对应寄存器,DEV供ipi_lines计算用)  
38.                 "linelenth": 4167,  
39.                 "framelenth": 1600,  
40.                 "settle": 20  
41.             }  
42.         }  
43.     }  
44. }  

45.  

MIPI数据格式

YUV

0x18

YUV420 8-bit

0x19

YUV420 10-bit

0x1A

Legacy YUV420 8-bit

0x1B

Reserved

0x1C

YUV420 8-bit (Chroma Shifted Pixel Sampling)

0x1D

YUV420 10-bit (Chroma Shifted Pixel Sampling)

0x1E

YUV422 8-bit

0x1F

YUV422 10-bit

RGB

0x20

RGB444

0x21

RGB555

0x22

RGB565

0x23

RGB666

0x24

RGB888

0x25~0x27

Reserved

RAW

0x28

RAW6

0x29

RAW7

0x2A

RAW8

0x2B

RAW10

0x2C

RAW12

0x2D

RAW14

0x2E~0x2F

Reserved

算法工具链
社区征文征程5官方教程
评论0
0/1000