]> git.baikalelectronics.ru Git - kernel.git/commitdiff
gpu: ipu-cpmem: add 16-bit grayscale support to ipu_cpmem_set_image
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 25 Jan 2018 09:37:52 +0000 (10:37 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 19 Feb 2018 14:13:00 +0000 (15:13 +0100)
Add the missing offset calculation for 16-bit grayscale images. Since
the IPU only supports capturing greyscale in raw passthrough mode, it
is the same as 16-bit bayer formats.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/ipu-v3/ipu-cpmem.c

index ef32377b91c0899f0c81eb0c5d6925decc332087..9f2d9ec42add6731069cad774762efc06eab0139 100644 (file)
@@ -795,6 +795,7 @@ int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image)
        case V4L2_PIX_FMT_SGBRG16:
        case V4L2_PIX_FMT_SGRBG16:
        case V4L2_PIX_FMT_SRGGB16:
+       case V4L2_PIX_FMT_Y16:
                offset = image->rect.left * 2 +
                         image->rect.top * pix->bytesperline;
                break;