[media] omap3isp: video: Split format info bpp field into width and bpp
[firefly-linux-kernel-4.4.55.git] / drivers / media / video / omap3isp / ispccdc.c
index 9d7ca9b4c9254c3382777a0788ca685a298b2d26..4678e2f44973a63bc5f6d8493ac3bfd68d599ebd 100644 (file)
@@ -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,