示例#1
0
/* coordinate between sgx, omapdss, dsscomp and ion needs */
void omap_android_display_setup(struct omap_dss_board_info *dss,
			       struct dsscomp_platform_data *dsscomp,
			       struct sgx_omaplfb_platform_data *sgx,
			       struct omapfb_platform_data *fb,
			       struct omap_ion_platform_data *ion)
{
	struct sgx_omaplfb_config *p_sgx_config = NULL;

	struct omap_android_display_data mem = {
		.bpp = 4,
		.width = 1920,
		.height = 1080,
	};

	if (!sgx || !sgx->configs)
		p_sgx_config = sgx_omaplfb_get(0);
	else
		p_sgx_config = &(sgx->configs[0]);

	get_display_size(dss, &mem);
	set_tiler1d_slot_size(dsscomp, &mem);
	set_vram_sizes(p_sgx_config, fb, &mem);
	if (ion)
		set_ion_carveouts(p_sgx_config, ion, &mem);

	sgx_omaplfb_set(0, p_sgx_config);
}
示例#2
0
/*
 * Set up screen mode.
 */
void scr_set(void)
{
	winsize_t ws;
	
	Rows = 0;
	Cols = 0;
	
	if (get_display_size(&ws) == 0) {
		Rows = ws.ws_row;
		Cols = ws.ws_col;
	}

	use_color = get_display_color_sup();
	
	if ((Rows < MINROWS) || (Cols < MINCOLS)) {
		char smallscr[55];
		
		snprintf(smallscr, sizeof(smallscr),
		    "the screen is too small (must be at least %dx%d)",
		    MINROWS, MINCOLS);
		stop(smallscr);
	}
	isset = 1;
	
	scr_clear();
}