全志A133 uboot的显示流程

drivers/video/sunxi/disp2/disp/de/disp_display.c
		disp_device_attached_and_enable
			mgr->device->enable(mgr->device);
				disp_lcd_enable
					__disp_lcd_enable
						lcd_clk_enable
							//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_lcd.c
							lcd_clk_config  //显示屏clk配置
					
		
		
		
//u-boot-2018/common/board_r.c
	board_init_r
		initcall_run_list(init_sequence_r)
			//u-boot-2018/board/sunxi/board_common.c
			board_early_init_r
				initr_sunxi_display	 //这里如果定义了CONFIG_DISP2_SUNXI就会进入屏幕初始化流程
					get_boot_work_mode   //这里会读取USB工作状态,如果系统进入烧写模式,会直接跳出initr_sunxi_display函数
						//u-boot-2018/drivers/video/sunxi/disp2/disp/dev_disp.c
						drv_disp_init
							//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_display.c			
							bsp_disp_init			
								//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_lcd.c
								disp_init_lcd
									lcd->init(lcd)
										disp_lcd_init
											lcd_parse_panel_para //获取设备树的屏参数据
								disp_init_hdmi
								disp_init_edp
						
						lcd_init//只有正确执行了该函数,disp_lcd_get_open_flow之后才能正确往下执行	
							//u-boot-2018/drivers/video/sunxi/disp2/disp/lcd/panels.c
							lcd_set_panel_funs
								sunxi_lcd_set_panel_funs
									//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_display.c
									bsp_disp_lcd_set_panel_funs
										lcd->set_panel_func(lcd, name, lcd_cfg)
											//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_lcd.c
											disp_lcd_set_panel_funs
												lcdp->lcd_panel_fun.cfg_panel_info= lcd_cfg->cfg_panel_info;
												lcdp->lcd_panel_fun.cfg_open_flow = lcd_cfg->cfg_open_flow;
												lcdp->lcd_panel_fun.cfg_close_flow = lcd_cfg->cfg_close_flow;
						 bsp_disp_open();
			board_late_init		
				axp_battery_status_handle
					//u-boot-2018/board/sunxi/power_manage.c
					sunxi_bat_low_vol_handle
						disp_ioctl	//这里如果定义了CONFIG_DISP2_SUNXI就会进入屏幕初始化流程
							//u-boot-2018/drivers/video/sunxi/disp2/disp/dev_disp.c
							drv_lcd_enable
								drv_lcd_open_callback  //回调函数,通过add_timer定时器轮询执行屏驱动里的函数(即下面的LCD_OPEN_FUNC),这里要在uboot结束前轮询完所有函数,如果不能轮询完就会有点不亮屏的问题,因此这个delay时间很关键
									lcd_timer[sel].expires = flow->func[i].delay;
									add_timer(&lcd_timer[sel]);
										bsp_disp_lcd_get_open_flow
											//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_display.c
											disp_get_lcd
												//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_lcd.c
												bsp_disp_feat_get_num_screens
											lcd->get_open_flow
												//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_lcd.c
												disp_lcd_get_open_flow	//只有正确执行了上面的lcd_init,才能往下进行					
													//u-boot-2018/drivers/video/sunxi/disp2/disp/lcd/k101im2byl02l.c						
													LCD_open_flow  //.cfg_open_flow=LCD_open_flow
														LCD_OPEN_FUNC(sel, LCD_power_on, 100);   //这里的100即为add_timer定时器的delay时间 
															lcd->set_open_func()
																//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_lcd.c
																disp_lcd_set_open_func
																	lcdp->open_flow.func[lcdp->open_flow.func_num].func = func;
																	lcdp->open_flow.func[lcdp->open_flow.func_num].delay = delay; //将delay传给add_timer定时器
																	lcdp->open_flow.func_num ++;
															LCD_power_on
																reset_gpio/en_gpio //上电时序初始化
																sunxi_lcd_pin_cfg(sel, 1);
																	//u-boot-2018/drivers/video/sunxi/disp2/disp/lcd/lcd_source.c
																	g_lcd_drv.src_ops.sunxi_lcd_pin_cfg
																		//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_display.c
																		bsp_disp_lcd_pin_cfg
																			lcd->pin_cfg(lcd, en)
																				//u-boot-2018/drivers/video/sunxi/disp2/disp/de/disp_lcd.c
																				disp_lcd_pin_cfg
																					disp_sys_power_enable
																						//u-boot-2018/drivers/video/sunxi/disp2/disp/disp_sys_intf.c
																						pmu_set_voltage(name, 0, 1)
														LCD_OPEN_FUNC(sel, LCD_panel_init, 200);      
														LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50);
														LCD_OPEN_FUNC(sel, LCD_bl_open, 0);           
															

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值