Exemplo n.º 1
0
void mDNIe_Set_Mode(enum Lcd_mDNIe_UI mode)
{
	unsigned int *pLut;
	int sharpvalue = 0;
	static int isSetDMBMode;

	DPRINT("[mdnie set] mDNIe_Set_Mode\n");
	if (!g_mdine_enable) {
		printk(KERN_ERR
		       "[mDNIE WARNING] mDNIE engine is OFF. So you cannot set mDnie Mode correctly.\n");
		return;
	}

	play_speed_1_5 = 0;
#if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_HD_PT)
	video_mode = FALSE;
	camera_mode = FALSE;
#endif

#if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_WVGA_PT)
	camera_mode = FALSE;
#endif

	switch (mode) {
	case mDNIe_UI_MODE:
		if (isSetDMBMode == 1) {
			mdp4_vg_qseed_init_VideoPlay(0);
			/*mdp4_vg_qseed_init_VideoPlay(1);*/
			isSetDMBMode = 0;
		}
		pLut = UI_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;

	case mDNIe_VIDEO_MODE:
		/*case mDNIe_VIDEO_WARM_MODE:*/
		/*case mDNIe_VIDEO_COLD_MODE:*/
		if (isSetDMBMode == 1) {
			mdp4_vg_qseed_init_VideoPlay(0);
			/*mdp4_vg_qseed_init_VideoPlay(1);*/
			isSetDMBMode = 0;
		}
		pLut = VIDEO_LUT;
		sharpvalue = SHARPNESS_VIDEO;
#if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_HD_PT)
		video_mode = TRUE;
#endif
		break;

	case mDNIe_CAMERA_MODE:
		pLut = BYPASS_LUT;
		sharpvalue = SHARPNESS_BYPASS;
#if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_HD_PT) || \
	defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_WVGA_PT)
		camera_mode = TRUE;
#endif
		break;

	case mDNIe_NAVI:
		pLut = BYPASS_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;

	case mDNIe_GALLERY:
		pLut = GALLERY_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;
	case mDNIe_BYPASS:
		pLut = BYPASS_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;

	case mDNIe_DMB_MODE:	/*warm, clod not distinguish*/
		if (isSetDMBMode == 0) {
			mdp4_vg_qseed_init_DMB(0);
			/*mdp4_vg_qseed_init_DMB(1);*/
			isSetDMBMode = 1;
		}
		pLut = DMB_LUT;
		sharpvalue = SHARPNESS_DMB;
		break;

#ifdef BROWSER_COLOR_TONE_SET
	case mDNIe_BROWSER_TONE1:
		pLut = BROWSER_TONE1_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;
	case mDNIe_BROWSER_TONE2:
		pLut = BROWSER_TONE2_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;
	case mDNIe_BROWSER_TONE3:
		pLut = BROWSER_TONE3_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;
#endif
	default:
		pLut = BYPASS_LUT;
		sharpvalue = SHARPNESS_BYPASS;
		break;
	}

	lut_tune(MAX_LUT_SIZE, pLut);
	sharpness_tune(sharpvalue);

	current_mDNIe_Mode = mode;

#ifdef CONFIG_FB_S3C_MDNIE_TUNINGMODE_FOR_BACKLIGHT
	pre_val = -1;
#endif			/* CONFIG_FB_S3C_MDNIE_TUNINGMODE_FOR_BACKLIGHT */
	DPRINT("[mDNIe] mDNIe_Set_Mode : Current_mDNIe_mode (%d)\n",
	       current_mDNIe_Mode);
	DPRINT("[mDNIe] Sharpness value : (%d)\n", sharpvalue);
}
void mDNIe_Set_Mode(Lcd_mDNIe_UI mode)
{
	unsigned int *pLut;
	int	sharpvalue = 0;
	static int isSetDMBMode = 0;

	DPRINT("[mdnie set] mDNIe_Set_Mode \n");
	if(!g_mdine_enable) {
		printk(KERN_ERR"[mDNIE WARNING] mDNIE engine is OFF. So you cannot set mDnie Mode correctly.\n");
		return 0;
	}
		switch (mode) {
		case mDNIe_UI_MODE:
			if(isSetDMBMode==1)
			{
				mdp4_vg_qseed_init_VideoPlay(0);
//				mdp4_vg_qseed_init_VideoPlay(1);
				isSetDMBMode = 0;
			}
			pLut = BYPASS_LUT;
			sharpvalue = SHARPNESS_BYPASS;
			break;

		case mDNIe_VIDEO_MODE:
		case mDNIe_VIDEO_WARM_MODE:
		case mDNIe_VIDEO_COLD_MODE:
			if(isSetDMBMode==1)
			{
				mdp4_vg_qseed_init_VideoPlay(0);
//				mdp4_vg_qseed_init_VideoPlay(1);
				isSetDMBMode = 0;
			}
			pLut = VIDEO_LUT;
			sharpvalue = SHARPNESS_VIDEO;		
			break;

		case mDNIe_CAMERA_MODE:
			pLut = BYPASS_LUT;
			sharpvalue = SHARPNESS_BYPASS;
			break;

		case mDNIe_NAVI:
			pLut = BYPASS_LUT;
			sharpvalue = SHARPNESS_BYPASS;
			break;
			
		case mDNIe_GALLERY:
			pLut = BYPASS_LUT;
			sharpvalue = SHARPNESS_BYPASS;
			break;
		case mDNIe_BYPASS: 
			pLut = BYPASS_LUT;
			sharpvalue = SHARPNESS_BYPASS;
			break;

#if defined(CONFIG_TDMB) || defined(CONFIG_TDMB_MODULE)
		case mDNIe_DMB_MODE:				// warm, clod not distinguish
		case mDNIe_DMB_WARM_MODE:
		case mDNIe_DMB_COLD_MODE:
			if(isSetDMBMode==0)
			{
				mdp4_vg_qseed_init_DMB(0);
//				mdp4_vg_qseed_init_DMB(1);
				isSetDMBMode = 1;
			}
			pLut = DMB_LUT;
			sharpvalue = SHARPNESS_DMB;
			break;
#endif 
#ifdef CONFIG_TARGET_LOCALE_NTT
		case mDNIe_ISDBT_MODE:
		case mDNIe_ISDBT_WARM_MODE:
		case mDNIe_ISDBT_COLD_MODE:
			pLut = BYPASS_LUT;
			sharpvalue = SHARPNESS_BYPASS;	
//			mDNIe_txtbuf_to_parsing(ISDBT_COLD_MODE_FILE);
			break;
#endif
		}

		lut_tune(MAX_LUT_SIZE, pLut);
		sharpness_tune(sharpvalue);

		current_mDNIe_Mode = mode;
//		current_mDNIe_OutDoor_OnOff = FALSE;
//	}

#ifdef CONFIG_FB_S3C_MDNIE_TUNINGMODE_FOR_BACKLIGHT
	pre_val = -1;
#endif	/* CONFIG_FB_S3C_MDNIE_TUNINGMODE_FOR_BACKLIGHT */
	DPRINT("[mDNIe] mDNIe_Set_Mode : Current_mDNIe_mode (%d)  \n", current_mDNIe_Mode);  
}