summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap3isp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-26 15:24:50 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-08 18:52:33 +0200
commitf22926e06e1ab7aa5f5c532afa4591f3d9baf59c (patch)
tree4d736ec9974a4921fae70279b8888351a82265b0 /drivers/media/video/omap3isp
parent[media] omap3isp: preview: Skip brightness and contrast in configuration ioctl (diff)
downloadlinux-f22926e06e1ab7aa5f5c532afa4591f3d9baf59c.tar.xz
linux-f22926e06e1ab7aa5f5c532afa4591f3d9baf59c.zip
[media] omap3isp: preview: Optimize parameters setup for the common case
If no parameter needs to be modified, make preview_config() and preview_setup_hw() return immediately. This speeds up interrupt handling in the common case. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp')
-rw-r--r--drivers/media/video/omap3isp/isppreview.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c
index cf5014f2302d..04c96899f005 100644
--- a/drivers/media/video/omap3isp/isppreview.c
+++ b/drivers/media/video/omap3isp/isppreview.c
@@ -889,6 +889,9 @@ static int preview_config(struct isp_prev_device *prev,
struct preview_update *attr;
int i, bit, rval = 0;
+ if (cfg->update == 0)
+ return 0;
+
params = &prev->params;
if (prev->state != ISP_PIPELINE_STREAM_STOPPED) {
@@ -944,6 +947,9 @@ static void preview_setup_hw(struct isp_prev_device *prev)
int i, bit;
void *param_ptr;
+ if (prev->update == 0)
+ return;
+
for (i = 0; i < ARRAY_SIZE(update_attrs); i++) {
attr = &update_attrs[i];