void mDNIe_set_negative(enum Lcd_mDNIe_Negative negative) { unsigned int *pLut; int sharpvalue = 0; if (negative == 0) { DPRINT("[mdnie set] mDNIe_Set_mDNIe_Mode = %d\n", current_mDNIe_Mode); mDNIe_Set_Mode(current_mDNIe_Mode); return; } else { DPRINT("[mdnie set] mDNIe_Set_Negative = %d\n", negative); pLut = NEGATIVE_LUT; sharpvalue = SHARPNESS_NEGATIVE; lut_tune(MAX_LUT_SIZE, pLut); sharpness_tune(sharpvalue); } DPRINT("[mdnie set] mDNIe_Set_Negative END\n"); }
static int load_tuning_data(char *filename) { struct file *filp; char *dp; long l; loff_t pos; int ret, num; mm_segment_t fs; DPRINT("[CMC623:INFO]:%s called loading file name : [%s]\n", __func__, filename); fs = get_fs(); set_fs(get_ds()); filp = filp_open(filename, O_RDONLY, 0); if (IS_ERR(filp)) { printk(KERN_ERR "[CMC623:ERROR]:File open failed\n"); return -1; } l = filp->f_path.dentry->d_inode->i_size; DPRINT("[CMC623:INFO]: Loading File Size : %ld(bytes)", l); dp = kmalloc(l + 10, GFP_KERNEL); if (dp == NULL) { DPRINT ("[CMC623:ERROR]:Can't not alloc memory"\ "for tuning file load\n"); filp_close(filp, current->files); return -1; } pos = 0; memset(dp, 0, l); DPRINT("[CMC623:INFO] : before vfs_read()\n"); ret = vfs_read(filp, (char __user *)dp, l, &pos); DPRINT("[CMC623:INFO] : after vfs_read()\n"); if (ret != l) { DPRINT("[CMC623:ERROR] : vfs_read() filed ret : %d\n", ret); kfree(dp); filp_close(filp, current->files); return -1; } filp_close(filp, current->files); set_fs(fs); num = parse_text(dp, l); if (!num) { DPRINT("[CMC623:ERROR]:Nothing to parse\n"); kfree(dp); return -1; } DPRINT("[CMC623:INFO] : Loading Tuning Value's Count : %d", num); lut_tune(num, mDNIe_data); sharpness_tune(mDNIe_data_sharpness); kfree(dp); return num; }
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); }