Commit 2e8f0172 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] omap3isp: ccdc: Simplify the configuration function

Assign the format variable to the sink pad format earlier and use it
instead of accessing the sink pad format directly from the ISP
structure.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: default avatarEnrico Butera <ebutera@users.sourceforge.net>
Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent f7abbe98
...@@ -1114,6 +1114,9 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) ...@@ -1114,6 +1114,9 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
pdata = &((struct isp_v4l2_subdevs_group *)sensor->host_priv) pdata = &((struct isp_v4l2_subdevs_group *)sensor->host_priv)
->bus.parallel; ->bus.parallel;
/* CCDC_PAD_SINK */
format = &ccdc->formats[CCDC_PAD_SINK];
/* Compute the lane shifter shift value and enable the bridge when the /* Compute the lane shifter shift value and enable the bridge when the
* input format is YUV. * input format is YUV.
*/ */
...@@ -1124,8 +1127,7 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) ...@@ -1124,8 +1127,7 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
depth_in = fmt_info->width; depth_in = fmt_info->width;
} }
fmt_info = omap3isp_video_format_info fmt_info = omap3isp_video_format_info(format->code);
(isp->isp_ccdc.formats[CCDC_PAD_SINK].code);
depth_out = fmt_info->width; depth_out = fmt_info->width;
shift = depth_in - depth_out; shift = depth_in - depth_out;
...@@ -1157,9 +1159,6 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) ...@@ -1157,9 +1159,6 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
else else
syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ; syn_mode &= ~ISPCCDC_SYN_MODE_SDR2RSZ;
/* CCDC_PAD_SINK */
format = &ccdc->formats[CCDC_PAD_SINK];
/* Mosaic filter */ /* Mosaic filter */
switch (format->code) { switch (format->code) {
case V4L2_MBUS_FMT_SRGGB10_1X10: case V4L2_MBUS_FMT_SRGGB10_1X10:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment