Commit caf67f31 authored by Enrico Scholz's avatar Enrico Scholz

media:mx6s_capture: fixed Y10 + Y12 support

manage the BIT_PIXEL_BIT bit
Signed-off-by: Enrico Scholz's avatarEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
parent 766b5c3e
......@@ -954,7 +954,7 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
if (csi_dev->csi_mipi_mode == true) {
cr1 = csi_read(csi_dev, CSI_CSICR1);
cr1 &= ~BIT_GCLK_MODE;
csi_write(csi_dev, cr1, CSI_CSICR1);
cr1 &= ~BIT_PIXEL_BIT;
cr18 = csi_read(csi_dev, CSI_CSICR18);
cr18 &= ~BIT_MIPI_DATA_FORMAT_MASK;
......@@ -978,6 +978,7 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
case V4L2_PIX_FMT_SRGGB10:
case V4L2_PIX_FMT_Y10:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
cr1 |= BIT_PIXEL_BIT;
break;
case V4L2_PIX_FMT_SBGGR12:
case V4L2_PIX_FMT_SGRBG12:
......@@ -985,12 +986,14 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
case V4L2_PIX_FMT_SRGGB12:
case V4L2_PIX_FMT_Y12:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
cr1 |= BIT_PIXEL_BIT;
break;
default:
pr_debug(" fmt not supported\n");
return -EINVAL;
}
csi_write(csi_dev, cr1, CSI_CSICR1);
csi_write(csi_dev, cr18, CSI_CSICR18);
}
return 0;
......
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