diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-07-23 15:30:57 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-21 22:25:17 +0200 |
commit | d903a0a367f3e0350a3ba1455c0a7c533977fb42 (patch) | |
tree | dcffb9b8c38df60d1b611f638cd1ec0ab97ae48d /drivers/media/platform/omap3isp | |
parent | [media] omap3isp: resizer: Remove needless variable initializations (diff) | |
download | linux-d903a0a367f3e0350a3ba1455c0a7c533977fb42.tar.xz linux-d903a0a367f3e0350a3ba1455c0a7c533977fb42.zip |
[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.c | 17 |
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, struct isp_device *isp = to_isp_device(res); u32 rgval; - dev_dbg(isp->dev, "Output size[w/h]: %dx%d\n", width, height); rgval = (width << ISPRSZ_OUT_SIZE_HORZ_SHIFT) & ISPRSZ_OUT_SIZE_HORZ_MASK; rgval |= (height << ISPRSZ_OUT_SIZE_VERT_SHIFT) @@ -421,8 +420,6 @@ static void resizer_set_input_size(struct isp_res_device *res, struct isp_device *isp = to_isp_device(res); u32 rgval; - dev_dbg(isp->dev, "Input size[w/h]: %dx%d\n", width, height); - rgval = (width << ISPRSZ_IN_SIZE_HORZ_SHIFT) & ISPRSZ_IN_SIZE_HORZ_MASK; rgval |= (height << ISPRSZ_IN_SIZE_VERT_SHIFT) @@ -1292,12 +1289,10 @@ static int resizer_set_selection(struct v4l2_subdev *sd, format_source = __resizer_get_format(res, fh, RESZ_PAD_SOURCE, sel->which); - dev_dbg(isp->dev, "%s: L=%d,T=%d,W=%d,H=%d,which=%d\n", __func__, - sel->r.left, sel->r.top, sel->r.width, sel->r.height, - sel->which); - - dev_dbg(isp->dev, "%s: input=%dx%d, output=%dx%d\n", __func__, + dev_dbg(isp->dev, "%s(%s): req %ux%u -> (%d,%d)/%ux%u -> %ux%u\n", + __func__, sel->which == V4L2_SUBDEV_FORMAT_TRY ? "try" : "act", format_sink->width, format_sink->height, + sel->r.left, sel->r.top, sel->r.width, sel->r.height, format_source->width, format_source->height); /* 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, *__resizer_get_crop(res, fh, sel->which) = sel->r; resizer_calc_ratios(res, &sel->r, format_source, &ratio); + dev_dbg(isp->dev, "%s(%s): got %ux%u -> (%d,%d)/%ux%u -> %ux%u\n", + __func__, sel->which == V4L2_SUBDEV_FORMAT_TRY ? "try" : "act", + format_sink->width, format_sink->height, + sel->r.left, sel->r.top, sel->r.width, sel->r.height, + format_source->width, format_source->height); + if (sel->which == V4L2_SUBDEV_FORMAT_TRY) return 0; |