summaryrefslogtreecommitdiff
path: root/drivers/media/video/omap3isp/ispccdc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-31 14:57:12 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-11 19:00:36 (GMT)
commit1697e49a0b8c0ced14015b3f830cdd90c79c75b4 (patch)
tree1bfb850f592d038565044f762f1fc1886d076fc2 /drivers/media/video/omap3isp/ispccdc.c
parent6fd206cb6ebd59e42b376b9e2e8f40d90910757e (diff)
downloadlinux-fsl-qoriq-1697e49a0b8c0ced14015b3f830cdd90c79c75b4.tar.xz
[media] omap3isp: video: Split format info bpp field into width and bpp
The bpp field currently stores the sample width and is aligned to the next multiple of 8 bits when computing data size in memory. This won't work anymore for YUYV8_2X8 formats. Split the bpp field into a sample width and a bytes per pixel value. 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/ispccdc.c')
-rw-r--r--drivers/media/video/omap3isp/ispccdc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/omap3isp/ispccdc.c b/drivers/media/video/omap3isp/ispccdc.c
index 9d7ca9b..4678e2f 100644
--- a/drivers/media/video/omap3isp/ispccdc.c
+++ b/drivers/media/video/omap3isp/ispccdc.c
@@ -1143,12 +1143,12 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
fmt_src.which = V4L2_SUBDEV_FORMAT_ACTIVE;
if (!v4l2_subdev_call(sensor, pad, get_fmt, NULL, &fmt_src)) {
fmt_info = omap3isp_video_format_info(fmt_src.format.code);
- depth_in = fmt_info->bpp;
+ depth_in = fmt_info->width;
}
fmt_info = omap3isp_video_format_info
(isp->isp_ccdc.formats[CCDC_PAD_SINK].code);
- depth_out = fmt_info->bpp;
+ depth_out = fmt_info->width;
shift = depth_in - depth_out;
omap3isp_configure_bridge(isp, ccdc->input, pdata, shift);
@@ -1179,7 +1179,7 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ;
/* Use PACK8 mode for 1byte per pixel formats. */
- if (omap3isp_video_format_info(format->code)->bpp <= 8)
+ if (omap3isp_video_format_info(format->code)->width <= 8)
syn_mode |= ISPCCDC_SYN_MODE_PACK8;
else
syn_mode &= ~ISPCCDC_SYN_MODE_PACK8;
@@ -2182,7 +2182,7 @@ static bool ccdc_is_shiftable(enum v4l2_mbus_pixelcode in,
if (in_info->flavor != out_info->flavor)
return false;
- return in_info->bpp - out_info->bpp + additional_shift <= 6;
+ return in_info->width - out_info->width + additional_shift <= 6;
}
static int ccdc_link_validate(struct v4l2_subdev *sd,