static void ipipeif_configure(struct iss_ipipeif_device *ipipeif)
{
struct iss_device *iss = to_iss_device(ipipeif);
+ const struct iss_format_info *info;
struct v4l2_mbus_framefmt *format;
u32 isif_ccolp = 0;
ISIF_MODESET_INPMOD_RAW | ISIF_MODESET_CCDW_2BIT,
iss->regs[OMAP4_ISS_MEM_ISP_ISIF] + ISIF_MODESET);
+ info = omap4iss_video_format_info(format->code);
writel((readl(iss->regs[OMAP4_ISS_MEM_ISP_ISIF] + ISIF_CGAMMAWD) &
~ISIF_CGAMMAWD_GWDI_MASK) |
- ISIF_CGAMMAWD_GWDI_BIT11,
+ ISIF_CGAMMAWD_GWDI(info->bpp),
iss->regs[OMAP4_ISS_MEM_ISP_ISIF] + ISIF_CGAMMAWD);
/* Set RAW Bayer pattern */
#define ISIF_CGAMMAWD (0x0080)
#define ISIF_CGAMMAWD_GWDI_MASK (0xF << 1)
-#define ISIF_CGAMMAWD_GWDI_BIT11 (0x4 << 1)
+#define ISIF_CGAMMAWD_GWDI(bpp) ((16 - (bpp)) << 1)
#define ISIF_CCDCFG (0x0088)
#define ISIF_CCDCFG_Y8POS (1 << 11)