8x12 panel lk 启动流程分析

----bootloader/lk/kernel/maic.c

void kmain(void)
{
	// get us into some sort of thread context
	thread_init_early();

	// early arch stuff
	arch_early_init();

	// do any super early platform initialization
	platform_early_init();

	// do any super early target initialization
	target_early_init();

	dprintf(INFO, "welcome to lk\n\n");

----------lk/target/msm8610

void target_init(void)
{
	dprintf(INFO, "target_init()\n");

	spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID);

	target_keystatus();

	target_sdc_init();

	/* Display splash screen if enabled */
	dprintf(SPEW, "Display Init: Start\n");
	display_init();
	dprintf(SPEW, "Display Init: Done\n");

	if (target_use_signed_kernel())
		target_crypto_init_params();
}
-----------lk/target/msm8610/target_display.c

                 

void display_init(void)
{
	gcdb_display_init(MDP_REV_304, MIPI_FB_ADDR);
}
--------------lk/dev/gcdb/display/gcdb_display.c

nt gcdb_display_init(uint32_t rev, void *base)
{
	int ret = NO_ERROR;

	if (!oem_panel_select(&panelstruct, &(panel.panel_info),
				 &dsi_video_mode_phy_db)) {
		dprintf(CRITICAL, "Target panel init not found!\n");
		ret = ERR_NOT_SUPPORTED;
		goto error_gcdb_display_init;
	}
	init_platform_data();

	if (dsi_panel_init(&(panel.panel_info), &panelstruct)) {
		dprintf(CRITICAL, "DSI panel init failed!\n");
		ret = ERROR;
		goto error_gcdb_display_init;
	}

	panel.panel_info.mipi.mdss_dsi_phy_db = &dsi_video_mode_phy_db;

	panel.pll_clk_func = mdss_dsi_panel_clock;
	panel.power_func = mdss_dsi_panel_power;
	panel.pre_init_func = mdss_dsi_panel_pre_init;
	panel.bl_func = mdss_dsi_bl_enable;
	panel.fb.base = base;
	panel.fb.width =  panel.panel_info.xres;
	panel.fb.height =  panel.panel_info.yres;
	panel.fb.stride =  panel.panel_info.xres;
	panel.fb.bpp =  panel.panel_info.bpp;
	panel.fb.format = panel.panel_info.mipi.dst_format;
	panel.mdp_rev = rev;

	ret = msm_display_init(&panel);

error_gcdb_display_init:
	display_enable = ret ? 0 : 1;
	return ret;
}

你可能感兴趣的:(linux内核)