예제 #1
0
BOOL DISP_DetectDevice(void)
{
	LCD_STATUS ret;

	ret = LCD_Init();

	lcm_drv = disp_drv_get_lcm_driver(NULL);
	if (NULL == lcm_drv)
	{
		printf("%s, disp_drv_get_lcm_driver() returns NULL\n", __func__);
		return FALSE;
	}

	disp_dump_lcm_parameters(lcm_params);
	return true;
}
예제 #2
0
BOOL DISP_SelectDevice(const char* lcm_name)
{
	LCD_STATUS ret;

	ret = LCD_Init();
	printf("ret of LCD_Init() = %d\n", ret);

	lcm_drv = disp_drv_get_lcm_driver(lcm_name);
	if (NULL == lcm_drv)
	{
		printf("%s, disp_drv_get_lcm_driver() returns NULL\n", __func__);
		return FALSE;
	}

	disp_dump_lcm_parameters(lcm_params);
	return disp_drv_init_context();
}
예제 #3
0
BOOL DISP_SelectDeviceBoot(const char* lcm_name)
{
	LCM_DRIVER *lcm = NULL;
	int i;

	printk("%s\n", __func__);
	if(lcm_name == NULL)
	{
		// we can't do anything in boot stage if lcm_name is NULL
		return false;
	}
	for(i = 0;i < lcm_count;i++)
	{
		lcm_params = &s_lcm_params;
		lcm = lcm_driver_list[i];

		printk("[LCM Auto Detect] [%d] - [%s]\t", 
			i, 
			(lcm->name==NULL)?"unknown":lcm->name);

		lcm->set_util_funcs(&lcm_utils);
		memset((void*)lcm_params, 0, sizeof(LCM_PARAMS));
		lcm->get_params(lcm_params);

		// if lcm type is speficied, we don't need to compare the lcm name
		// in case the uboot is old version, which don't have lcm name in command line
		if(lcm_count == 1)
		{
			lcm_drv = lcm;
			isLCMFound = TRUE;
			break;
		}

		if(!strcmp(lcm_name,lcm->name))
		{
			printk("\t\t[success]\n");
			lcm_drv = lcm;
			isLCMFound = TRUE;

			break;
		}
		else
		{
			printk("\t\t[fail]\n");
		}
	}

	if (NULL == lcm_drv)
	{
		printk("%s, disp_drv_get_lcm_driver() returns NULL\n", __func__);
		return FALSE;
	}

	switch(lcm_params->type)
	{
		case LCM_TYPE_DBI : disp_drv = DISP_GetDriverDBI(); break;
		case LCM_TYPE_DPI : disp_drv = DISP_GetDriverDPI(); break;
		case LCM_TYPE_DSI : disp_drv = DISP_GetDriverDSI(); break;
		default : ASSERT(0);
	}

	disp_dump_lcm_parameters(lcm_params);
	return TRUE;
}