예제 #1
0
s32 disp_init_connections(void)
{
	u32 disp = 0;
	u32 num_screens = 0;
	u32 num_layers = 0,layer_id = 0;

	DE_INF("disp_init_connections\n");

	num_screens = bsp_disp_feat_get_num_screens();
	for(disp=0; disp<num_screens; disp++) {
		struct disp_manager *mgr;
		struct disp_layer *lyr;
		struct disp_device *lcd = NULL;
		struct disp_enhance *enhance = NULL;
		struct disp_smbl *smbl = NULL;
		struct disp_capture *cptr = NULL;

		mgr = disp_get_layer_manager(disp);
		if(!mgr)
			continue;

		/* connect layer & it's manager */
		num_layers = bsp_disp_feat_get_num_layers(disp);
		for(layer_id=0; layer_id<num_layers; layer_id++) {
			lyr = disp_get_layer_1(disp, layer_id);
			if(NULL != lyr) {
				lyr->set_manager(lyr, mgr);
			}
		}

		/* connect device & it's manager */
		if(bsp_disp_feat_is_supported_output_types(disp, DISP_OUTPUT_TYPE_LCD)) {
			lcd = disp_get_lcd(disp);
			if((lcd) && (lcd->set_manager))
				lcd->set_manager(lcd, mgr);
		} else {
			//other device
		}

		enhance = disp_get_enhance(disp);
		if(enhance && (enhance->set_manager)) {
			enhance->set_manager(enhance, mgr);
		}

		smbl = disp_get_smbl(disp);
		if(smbl && (smbl->set_manager)) {
			smbl->set_manager(smbl, mgr);
		}

		cptr = disp_get_capture(disp);
		if(cptr && (cptr->set_manager)) {
			cptr->set_manager(cptr, mgr);
		}
	}

	return 0;
}
예제 #2
0
static s32 disp_sync_all(u32 screen_id)
{
	struct disp_manager *mgr;
	struct disp_smbl *smbl;
	struct disp_capture *capture;
	struct disp_smcl *smcl;

#if defined(CONFIG_ARCH_SUN9IW1P1)
	struct disp_cursor *cursor;
#endif

	mgr = disp_get_layer_manager(screen_id);
	if(!mgr) {
		//DE_WRN("get mgr%d fail\n", screen_id);
	} else {
		if(mgr->sync)
			mgr->sync(mgr);
		}

	smbl = disp_get_smbl(screen_id);
	if(!smbl) {
		//DE_WRN("get smbl%d fail\n", screen_id);
	} else {
		if(smbl->sync)
			smbl->sync(smbl);
		}

	capture = disp_get_capture(screen_id);
	if(!capture) {
		//DE_WRN("get capture%d fail\n", screen_id);
	} else {
		if(capture->sync)
			capture->sync(capture);
		}

	smcl = disp_get_smcl(screen_id);
	if(!smcl) {
		//DE_WRN("get smcl %d fail\n", screen_id);
	} else {
		if(smcl->sync)
			smcl->sync(smcl);
		}

#if defined(CONFIG_ARCH_SUN9IW1P1)
	cursor = disp_get_cursor(screen_id);
	if(!cursor) {
		//DE_WRN("get cursor%d fail\n", screen_id);
	} else {
		if(cursor->sync)
			cursor->sync(cursor);
		}

#endif
	return 0;
}
예제 #3
0
s32 bsp_disp_smbl_get_window(u32 screen_id, disp_window *window)
{
	struct disp_smbl *smbl;

	smbl = disp_get_smbl(screen_id);
	if(!smbl) {
		DE_WRN("get smbl %d fail \n", screen_id);
		return DIS_FAIL;
	}

	if(smbl->get_window)
		return smbl->get_window(smbl, window);

	return DIS_FAIL;
}
예제 #4
0
s32 bsp_disp_smbl_is_enabled(u32 screen_id)
{
	struct disp_smbl *smbl;

	smbl = disp_get_smbl(screen_id);
	if(!smbl) {
		DE_WRN("get smbl %d fail \n", screen_id);
		return DIS_FAIL;
	}

	if(smbl->is_enabled)
		return smbl->is_enabled(smbl);

	return DIS_FAIL;
}
예제 #5
0
s32 bsp_disp_smbl_set_window(u32 screen_id, disp_window *window)
{
	struct disp_smbl *smbl;

	smbl = disp_get_smbl(screen_id);
	if(!smbl) {
		DE_WRN("get smbl %d fail \n", screen_id);
		return DIS_FAIL;
	}

	DE_INF("smbl %d window<%d,%d,%d,%d>\n", screen_id, window->x, window->y, window->width, window->height);
	if(smbl->set_window)
		return smbl->set_window(smbl, window);

	return DIS_FAIL;
}
예제 #6
0
s32 bsp_disp_smbl_disable(u32 screen_id)
{
	struct disp_smbl *smbl;

	smbl = disp_get_smbl(screen_id);
	if(!smbl) {
		DE_WRN("get smbl %d fail \n", screen_id);
		return DIS_FAIL;
	}

	DE_INF("smbl %d disable\n", screen_id);
	if(smbl->disable)
		return smbl->disable(smbl);

	return DIS_FAIL;
}
예제 #7
0
s32 disp_init_connections(void)
{
	u32 screen_id = 0;
	u32 num_screens = 0;

	DE_INF("disp_init_connections\n");

	num_screens = bsp_disp_feat_get_num_screens();
	for(screen_id=0; screen_id<num_screens; screen_id++) {
		struct disp_manager *mgr;
		struct disp_smbl *smbl;
		struct disp_capture *capture;
		struct disp_smcl *smcl;
#if defined(CONFIG_ARCH_SUN9IW1P1)
		struct disp_cursor *cursor;
#endif
		u32 num_layers, layer_id;

		num_layers = bsp_disp_feat_get_num_layers(screen_id);
		mgr = disp_get_layer_manager(screen_id);
		if(!mgr)
			continue;
		for(layer_id=0; layer_id<num_layers; layer_id++) {
			struct disp_layer *lyr;

			lyr = disp_get_layer(screen_id, layer_id);
			if(!lyr)
				continue;

			if(mgr->add_layer)
				mgr->add_layer(mgr, lyr);
			else
				DE_INF("mgr's add_layer is NULL\n");

			if(lyr->set_manager)
				lyr->set_manager(lyr, mgr);
			else
				DE_INF("lyr's set_manager is NULL\n");
		}

		smbl = disp_get_smbl(screen_id);
		if(smbl && smbl->set_manager)
			smbl->set_manager(smbl, mgr);
		else
			DE_INF("smbl's set manager is NULL\n");

		capture = disp_get_capture(screen_id);
		if(capture && capture->set_manager)
			capture->set_manager(capture, mgr);
		else
			DE_INF("capture's set manager is NULL\n");

		smcl = disp_get_smcl(screen_id);
		if(smcl && smcl->set_manager)
			smcl->set_manager(smcl, mgr);
		else
			DE_INF("smcl's set manager is NULL\n");

#if defined(CONFIG_ARCH_SUN9IW1P1)
		cursor = disp_get_cursor(screen_id);
		if(cursor && cursor->set_manager)
			cursor->set_manager(cursor, mgr);
		else
			DE_INF("cursor's set manager is NULL\n");
#endif
	}

	return 0;
}