summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is/fimc-isp.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-04-10 06:23:05 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-14 15:50:31 -0300
commita6f5635e63ffa02c30a22ea4af21f3daa1e98cdf (patch)
tree48581b597f3ff45132d968db30d91cb0e1da5fa9 /drivers/media/platform/exynos4-is/fimc-isp.c
parent4c8f0629f53bb198ed00c2c54cf80cc2be95acab (diff)
[media] exynos4-is: Improve the ISP chain parameter count calculation
Instead of incrementing p_region_num field each time we set a bit in the parameter mask calculate the number of bits set only when this information is needed. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is/fimc-isp.c')
-rw-r--r--drivers/media/platform/exynos4-is/fimc-isp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-isp.c b/drivers/media/platform/exynos4-is/fimc-isp.c
index 59502b111a8..b11c001ad38 100644
--- a/drivers/media/platform/exynos4-is/fimc-isp.c
+++ b/drivers/media/platform/exynos4-is/fimc-isp.c
@@ -229,8 +229,11 @@ static int fimc_isp_subdev_s_stream(struct v4l2_subdev *sd, int on)
fimc_is_mem_barrier();
if (on) {
- if (atomic_read(&is->cfg_param[is->scenario_id].p_region_num))
+ if (__get_pending_param_count(is)) {
ret = fimc_is_itf_s_param(is, true);
+ if (ret < 0)
+ return ret;
+ }
v4l2_dbg(1, debug, sd, "changing mode to %d\n",
is->scenario_id);
@@ -414,7 +417,6 @@ static int __ctrl_set_aewb_lock(struct fimc_is *is,
isp->aa.cmd = cmd;
isp->aa.target = ISP_AA_TARGET_AE;
fimc_is_set_param_bit(is, PARAM_ISP_AA);
- fimc_is_inc_param_num(is);
is->af.ae_lock_state = ae_lock;
wmb();
@@ -426,7 +428,6 @@ static int __ctrl_set_aewb_lock(struct fimc_is *is,
isp->aa.cmd = cmd;
isp->aa.target = ISP_AA_TARGET_AE;
fimc_is_set_param_bit(is, PARAM_ISP_AA);
- fimc_is_inc_param_num(is);
is->af.awb_lock_state = awb_lock;
wmb();