Exemplo n.º 1
0
int de_smbl_tasklet(unsigned int sel)
{
	unsigned short *lut;
	if(g_smbl_status[sel]->IsEnable  && ((SMBL_FRAME_MASK==(smbl_frame_cnt[sel]%2)) || (SMBL_FRAME_MASK==0x2)))
	{
		if(g_smbl_status[sel]->Runtime > 0)
		{
			//POWER SAVE ALG
			lut = (unsigned short *)PWRSAVE_CORE(sel);
		}
		else
		{
			lut = (unsigned short *)pwrsv_lgc_tab[128-1];
		}

		de_smbl_set_lut(sel, lut);

		if(g_smbl_status[sel]->Runtime == 0)
		{
			g_smbl_status[sel]->Runtime ++;
		}
	}
	smbl_frame_cnt[sel]++;

	return 0;
}
Exemplo n.º 2
0
__s32 Disp_drc_proc(__u32 sel, __u32 tcon_index)
{
	__u32 top, bot, left, right;
	__u32 lgcaddr;

	if (sel == 0) {
		if (giep[sel].runframe < giep[sel].waitframe) {
			/*
			 * first  frame, wont get the valid histogram, so open
			 * a "zero" window
			 */
			top = 0;
			bot = 0;
			left = 0;
			right = 0;

			DE_IEP_Set_Demo_Win_Para(sel, top, bot, left, right);
			DE_IEP_Demo_Win_Enable(sel, 1);	/* enable here */
			/* 12-04-01 debug flicker in LCD opening */
			DE_IEP_Set_Csc_Coeff(sel, 3);
			BSP_disp_set_output_csc(sel,
						gdisp.screen[sel].output_type,
						1);

			lgcaddr = (__u32) pttab + ((128 - 1) << 9);
			lgcaddr = __pa(lgcaddr);
			/* set "gain=1" tab to lgc */
			DE_IEP_Drc_Set_Lgc_Addr(sel, lgcaddr);
			DE_IEP_Enable(sel); /* enable here */
#if 0
			DE_INF("waitting for runframe %d up to%d!\n",
			       giep.runframe, giep.waitframe);
#endif
			giep[sel].runframe++;
		} else {
			if (giep[sel].drc_win_en) {
				/* convert rectangle to register */
				top = giep[sel].drc_win.y;
				bot = giep[sel].drc_win.y +
					giep[sel].drc_win.height - 1;
				left = giep[sel].drc_win.x;
				right = giep[sel].drc_win.x +
					giep[sel].drc_win.width - 1;

				DE_IEP_Set_Demo_Win_Para(sel, top, bot, left,
							 right);
			}
			/* BACKLIGHT Control ALG */
			PWRSAVE_CORE(sel);
		}

		return 0;
	} else {
		return -1;
	}
}
Exemplo n.º 3
0
__s32 drc_proc(__u32 sel)
{
	__u32 top, bot, left, right;
	__u32 lgcaddr;
	__u32 csc_mode, drc_mode;

	csc_mode = (giep[sel].video_mode_en)?3:1;
	drc_mode = (giep[sel].video_mode_en==1)?0:1;
	DRC_EBIOS_Drc_Set_Mode(sel, drc_mode);

	if(giep[sel].runframe < giep[sel].waitframe) {
		/* first  frame, wont get the valid histogram, so open a "zero" window */
		top = 0;
		bot = 0;
		left = 0;
		right = 0;

		DRC_EBIOS_Set_Win_Para(sel, top, bot, left, right);
		DRC_EBIOS_Win_Enable(sel, 1);   //enable here
		DRC_EBIOS_Set_Csc_Coeff(sel, csc_mode);   //12-04-01 debug flicker in LCD opening
		//bsp_disp_set_output_csc(sel, gdisp.screen[sel].output_type, 1); //TBD

		lgcaddr = (__u32)pttab[sel] + ((128-1)<<9);
#if defined(__LINUX_OSAL__)
		lgcaddr = __pa(lgcaddr);
#endif
		DRC_EBIOS_Drc_Set_Lgc_Addr(sel, lgcaddr); //set "gain=1" tab to lgc
		DRC_EBIOS_Enable(sel);  //enable here
		//DE_INF("waitting for runframe %d up to%d!\n", giep.runframe, giep.waitframe);
		giep[sel].runframe++;
	}	else {
		DRC_EBIOS_Set_Csc_Coeff(sel, csc_mode); //flicker when mode change??
		if(giep[sel].drc_win_en) {
			/* convert rectangle to register */
			top = giep[sel].drc_win.y;
			bot = giep[sel].drc_win.y + giep[sel].drc_win.height - 1;
			left = giep[sel].drc_win.x;
			right = giep[sel].drc_win.x + giep[sel].drc_win.width - 1;

			DRC_EBIOS_Set_Win_Para(sel, top, bot, left, right);
		}
		//BACKLIGHT Control ALG
		PWRSAVE_CORE(sel);
	}
	return DIS_SUCCESS;
}