media: rcar-vin: add support for MEDIA_BUS_FMT_UYVY8_1X16
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tue, 24 Apr 2018 23:46:07 +0000 (19:46 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sat, 5 May 2018 14:27:45 +0000 (10:27 -0400)
By setting VNMC_YCAL rcar-vin can support input video in
MEDIA_BUS_FMT_UYVY8_1X16 format.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/rcar-vin/rcar-core.c
drivers/media/platform/rcar-vin/rcar-dma.c

index 51e6694c494658146a35af6fd94274856fb8b715..d3072e166a1ca24fd54248846a8ea924c0cc55d4 100644 (file)
@@ -406,6 +406,7 @@ static int rvin_digital_subdevice_attach(struct rvin_dev *vin,
                code.index++;
                switch (code.code) {
                case MEDIA_BUS_FMT_YUYV8_1X16:
+               case MEDIA_BUS_FMT_UYVY8_1X16:
                case MEDIA_BUS_FMT_UYVY8_2X8:
                case MEDIA_BUS_FMT_UYVY10_2X10:
                case MEDIA_BUS_FMT_RGB888_1X24:
index 4a3a195e7f59047c89ef58c64ffb614c39ad3d31..ac07f99e3516a6200978d4d44d56e389a9d5a10d 100644 (file)
@@ -653,6 +653,10 @@ static int rvin_setup(struct rvin_dev *vin)
                vnmc |= VNMC_INF_YUV16;
                input_is_yuv = true;
                break;
+       case MEDIA_BUS_FMT_UYVY8_1X16:
+               vnmc |= VNMC_INF_YUV16 | VNMC_YCAL;
+               input_is_yuv = true;
+               break;
        case MEDIA_BUS_FMT_UYVY8_2X8:
                /* BT.656 8bit YCbCr422 or BT.601 8bit YCbCr422 */
                vnmc |= vin->mbus_cfg.type == V4L2_MBUS_BT656 ?
@@ -1009,6 +1013,7 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
 
        switch (fmt.format.code) {
        case MEDIA_BUS_FMT_YUYV8_1X16:
+       case MEDIA_BUS_FMT_UYVY8_1X16:
        case MEDIA_BUS_FMT_UYVY8_2X8:
        case MEDIA_BUS_FMT_UYVY10_2X10:
        case MEDIA_BUS_FMT_RGB888_1X24: