>From e6dec80506ac40dc94eb8e0c6e64a861a93347b9 Mon Sep 17 00:00:00 2001 From: Zheng Ba <[email protected]> Date: Sun, 19 Sep 2010 16:07:41 +0800 Subject: [PATCH] Camera Imaging: added the LNW B0/C0 support for the lens shading issue.
ISP Lens Shade Feature is broken in LNW B0 and expects NOT to be fixed in C0, hence disabling the feature if it is B0 or C0. Signed-off-by: Shenbo Huang <[email protected]> --- .../mrstci/mrstisp/include/mrstisp_stdinc.h | 1 + drivers/staging/mrstci/mrstisp/mrstisp_hw.c | 4 +++ drivers/staging/mrstci/mrstisp/mrstisp_main.c | 21 ++++++++++++------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/staging/mrstci/mrstisp/include/mrstisp_stdinc.h b/drivers/staging/mrstci/mrstisp/include/mrstisp_stdinc.h index 854e8e4..e045281 100644 --- a/drivers/staging/mrstci/mrstisp/include/mrstisp_stdinc.h +++ b/drivers/staging/mrstci/mrstisp/include/mrstisp_stdinc.h @@ -92,6 +92,7 @@ /* #include "mrstisp_mif.h" */ extern unsigned char *mrst_isp_regs; +extern u32 do_lsc; #define MEM_CSC_REG_BASE (0x08500000) #define MEM_MRV_REG_BASE (mrst_isp_regs) #define ALIGN_TO_4(f) (((f) + 3) & ~3) diff --git a/drivers/staging/mrstci/mrstisp/mrstisp_hw.c b/drivers/staging/mrstci/mrstisp/mrstisp_hw.c index 26ad511..a5f153a 100644 --- a/drivers/staging/mrstci/mrstisp/mrstisp_hw.c +++ b/drivers/staging/mrstci/mrstisp/mrstisp_hw.c @@ -31,6 +31,9 @@ u32 rsz_scaler_bypass = 0x4000; u32 rsz_upscaler_enable = 0x8000; u32 mrv_rsz_scale_mask = 0x00003fff; +/* different Marvin IP has different capability to do lens shading correction */ +u32 do_lsc = 1; + static unsigned long jiffies_start; void mrst_timer_start(void) @@ -79,6 +82,7 @@ static int ci_isp_verify_chip_id(void) rsz_scaler_bypass = 0x10000; rsz_upscaler_enable = 0x20000; mrv_rsz_scale_mask = 0x0000ffff; + do_lsc = 0; } else if (mrv_id == CHIP_ID_MARVIN_5_V4_R11 || mrv_id == CHIP_ID_MARVIN_5_V4_R20) { dprintk(0, "LNW A3"); diff --git a/drivers/staging/mrstci/mrstisp/mrstisp_main.c b/drivers/staging/mrstci/mrstisp/mrstisp_main.c index ea922d2..1980d52 100644 --- a/drivers/staging/mrstci/mrstisp/mrstisp_main.c +++ b/drivers/staging/mrstci/mrstisp/mrstisp_main.c @@ -869,14 +869,19 @@ static int mrst_isp_dp_init(struct ci_pl_system_config *sys_conf, mrst_isp_init_mrv_image_effects(sys_conf, true); /* configure lens shading correction */ - if (strcmp(isi_config->name, "s5k4e1") == 0 - && (isi_config->res == SENSOR_RES_720P - || isi_config->res == SENSOR_RES_QXGA_PLUS)) { - dprintk(1, "enabling lsc for kmot 720p and qsxga\n"); - mrst_isp_init_mrvisp_lensshade(sys_conf, true); - } else - mrst_isp_init_mrvisp_lensshade(sys_conf, - sys_conf->isp_cfg.flags.lsc); + if (do_lsc) { + if (strcmp(isi_config->name, "s5k4e1") == 0 + && (isi_config->res == SENSOR_RES_720P + || isi_config->res == SENSOR_RES_QXGA_PLUS)) { + dprintk(1, "enabling lsc for kmot 720p and qsxga\n"); + mrst_isp_init_mrvisp_lensshade(sys_conf, true); + } else + mrst_isp_init_mrvisp_lensshade(sys_conf, + sys_conf->isp_cfg.flags.lsc); + } else { + dprintk(0, "disabling lsc feature for LNW B0/C0\n"); + mrst_isp_init_mrvisp_lensshade(sys_conf, false); + } /* configure bad pixel detection/correction */ mrst_isp_init_mrvisp_badpixel(sys_conf, true); -- 1.7.0.4 _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
