aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-07-23 09:30:57 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-21 16:25:17 -0400
commitd903a0a367f3e0350a3ba1455c0a7c533977fb42 (patch)
treedcffb9b8c38df60d1b611f638cd1ec0ab97ae48d /drivers/media/platform/omap3isp
parent41316a27ee96b31970175bec87210075752001fb (diff)
[media] omap3isp: resizer: Remove slow debugging message from interrupt handler
The resizer_set_input_size() function prints a debugging message with the input width and height values. As the function is called from interrupt context, printing that message to the serial console could slow down the interrupt handler and cause it to miss the start of the next frame, causing image corruption. Fix this by reorganizing the resizer debug messages. The driver now prints the input size, the crop rectangle and the output size in the set selection handler instead of scattering debug messages in various places. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/omap3isp')
-rw-r--r--drivers/media/platform/omap3isp/ispresizer.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/media/platform/omap3isp/ispresizer.c b/drivers/media/platform/omap3isp/ispresizer.c
index 06d4e422b5e8..ebc812e48fe8 100644
--- a/drivers/media/platform/omap3isp/ispresizer.c
+++ b/drivers/media/platform/omap3isp/ispresizer.c
@@ -357,7 +357,6 @@ static void resizer_set_output_size(struct isp_res_device *res,
357 struct isp_device *isp = to_isp_device(res); 357 struct isp_device *isp = to_isp_device(res);
358 u32 rgval; 358 u32 rgval;
359 359
360 dev_dbg(isp->dev, "Output size[w/h]: %dx%d\n", width, height);
361 rgval = (width << ISPRSZ_OUT_SIZE_HORZ_SHIFT) 360 rgval = (width << ISPRSZ_OUT_SIZE_HORZ_SHIFT)
362 & ISPRSZ_OUT_SIZE_HORZ_MASK; 361 & ISPRSZ_OUT_SIZE_HORZ_MASK;
363 rgval |= (height << ISPRSZ_OUT_SIZE_VERT_SHIFT) 362 rgval |= (height << ISPRSZ_OUT_SIZE_VERT_SHIFT)
@@ -421,8 +420,6 @@ static void resizer_set_input_size(struct isp_res_device *res,
421 struct isp_device *isp = to_isp_device(res); 420 struct isp_device *isp = to_isp_device(res);
422 u32 rgval; 421 u32 rgval;
423 422
424 dev_dbg(isp->dev, "Input size[w/h]: %dx%d\n", width, height);
425
426 rgval = (width << ISPRSZ_IN_SIZE_HORZ_SHIFT) 423 rgval = (width << ISPRSZ_IN_SIZE_HORZ_SHIFT)
427 & ISPRSZ_IN_SIZE_HORZ_MASK; 424 & ISPRSZ_IN_SIZE_HORZ_MASK;
428 rgval |= (height << ISPRSZ_IN_SIZE_VERT_SHIFT) 425 rgval |= (height << ISPRSZ_IN_SIZE_VERT_SHIFT)
@@ -1292,12 +1289,10 @@ static int resizer_set_selection(struct v4l2_subdev *sd,
1292 format_source = __resizer_get_format(res, fh, RESZ_PAD_SOURCE, 1289 format_source = __resizer_get_format(res, fh, RESZ_PAD_SOURCE,
1293 sel->which); 1290 sel->which);
1294 1291
1295 dev_dbg(isp->dev, "%s: L=%d,T=%d,W=%d,H=%d,which=%d\n", __func__, 1292 dev_dbg(isp->dev, "%s(%s): req %ux%u -> (%d,%d)/%ux%u -> %ux%u\n",
1296 sel->r.left, sel->r.top, sel->r.width, sel->r.height, 1293 __func__, sel->which == V4L2_SUBDEV_FORMAT_TRY ? "try" : "act",
1297 sel->which);
1298
1299 dev_dbg(isp->dev, "%s: input=%dx%d, output=%dx%d\n", __func__,
1300 format_sink->width, format_sink->height, 1294 format_sink->width, format_sink->height,
1295 sel->r.left, sel->r.top, sel->r.width, sel->r.height,
1301 format_source->width, format_source->height); 1296 format_source->width, format_source->height);
1302 1297
1303 /* Clamp the crop rectangle to the bounds, and then mangle it further to 1298 /* Clamp the crop rectangle to the bounds, and then mangle it further to
@@ -1312,6 +1307,12 @@ static int resizer_set_selection(struct v4l2_subdev *sd,
1312 *__resizer_get_crop(res, fh, sel->which) = sel->r; 1307 *__resizer_get_crop(res, fh, sel->which) = sel->r;
1313 resizer_calc_ratios(res, &sel->r, format_source, &ratio); 1308 resizer_calc_ratios(res, &sel->r, format_source, &ratio);
1314 1309
1310 dev_dbg(isp->dev, "%s(%s): got %ux%u -> (%d,%d)/%ux%u -> %ux%u\n",
1311 __func__, sel->which == V4L2_SUBDEV_FORMAT_TRY ? "try" : "act",
1312 format_sink->width, format_sink->height,
1313 sel->r.left, sel->r.top, sel->r.width, sel->r.height,
1314 format_source->width, format_source->height);
1315
1315 if (sel->which == V4L2_SUBDEV_FORMAT_TRY) 1316 if (sel->which == V4L2_SUBDEV_FORMAT_TRY)
1316 return 0; 1317 return 0;
1317 1318