diff mbox series

[v10,12/13] media: video-mux: add bayer formats

Message ID 20190123105222.2378-13-rui.silva@linaro.org
State Superseded
Headers show
Series media: staging/imx7: add i.MX7 media driver | expand

Commit Message

Rui Miguel Silva Jan. 23, 2019, 10:52 a.m. UTC
Add non vendor bayer formats to the  allowed format array.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>

---
 drivers/media/platform/video-mux.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

-- 
2.20.1

Comments

Philipp Zabel Jan. 24, 2019, 11:23 a.m. UTC | #1
On Wed, 2019-01-23 at 10:52 +0000, Rui Miguel Silva wrote:
> Add non vendor bayer formats to the  allowed format array.

> 

> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>

> ---

>  drivers/media/platform/video-mux.c | 20 ++++++++++++++++++++

>  1 file changed, 20 insertions(+)

> 

> diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c

> index c33900e3c23e..0ba30756e1e4 100644

> --- a/drivers/media/platform/video-mux.c

> +++ b/drivers/media/platform/video-mux.c

> @@ -263,6 +263,26 @@ static int video_mux_set_format(struct v4l2_subdev *sd,

>  	case MEDIA_BUS_FMT_UYYVYY16_0_5X48:

>  	case MEDIA_BUS_FMT_JPEG_1X8:

>  	case MEDIA_BUS_FMT_AHSV8888_1X32:

> +	case MEDIA_BUS_FMT_SBGGR8_1X8:

> +	case MEDIA_BUS_FMT_SGBRG8_1X8:

> +	case MEDIA_BUS_FMT_SGRBG8_1X8:

> +	case MEDIA_BUS_FMT_SRGGB8_1X8:

> +	case MEDIA_BUS_FMT_SBGGR10_1X10:

> +	case MEDIA_BUS_FMT_SGBRG10_1X10:

> +	case MEDIA_BUS_FMT_SGRBG10_1X10:

> +	case MEDIA_BUS_FMT_SRGGB10_1X10:

> +	case MEDIA_BUS_FMT_SBGGR12_1X12:

> +	case MEDIA_BUS_FMT_SGBRG12_1X12:

> +	case MEDIA_BUS_FMT_SGRBG12_1X12:

> +	case MEDIA_BUS_FMT_SRGGB12_1X12:

> +	case MEDIA_BUS_FMT_SBGGR14_1X14:

> +	case MEDIA_BUS_FMT_SGBRG14_1X14:

> +	case MEDIA_BUS_FMT_SGRBG14_1X14:

> +	case MEDIA_BUS_FMT_SRGGB14_1X14:

> +	case MEDIA_BUS_FMT_SBGGR16_1X16:

> +	case MEDIA_BUS_FMT_SGBRG16_1X16:

> +	case MEDIA_BUS_FMT_SGRBG16_1X16:

> +	case MEDIA_BUS_FMT_SRGGB16_1X16:

>  		break;

>  	default:

>  		sdformat->format.code = MEDIA_BUS_FMT_Y8_1X8;


This could be merged independently from the other changes.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>


regards
Philipp
diff mbox series

Patch

diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c
index c33900e3c23e..0ba30756e1e4 100644
--- a/drivers/media/platform/video-mux.c
+++ b/drivers/media/platform/video-mux.c
@@ -263,6 +263,26 @@  static int video_mux_set_format(struct v4l2_subdev *sd,
 	case MEDIA_BUS_FMT_UYYVYY16_0_5X48:
 	case MEDIA_BUS_FMT_JPEG_1X8:
 	case MEDIA_BUS_FMT_AHSV8888_1X32:
+	case MEDIA_BUS_FMT_SBGGR8_1X8:
+	case MEDIA_BUS_FMT_SGBRG8_1X8:
+	case MEDIA_BUS_FMT_SGRBG8_1X8:
+	case MEDIA_BUS_FMT_SRGGB8_1X8:
+	case MEDIA_BUS_FMT_SBGGR10_1X10:
+	case MEDIA_BUS_FMT_SGBRG10_1X10:
+	case MEDIA_BUS_FMT_SGRBG10_1X10:
+	case MEDIA_BUS_FMT_SRGGB10_1X10:
+	case MEDIA_BUS_FMT_SBGGR12_1X12:
+	case MEDIA_BUS_FMT_SGBRG12_1X12:
+	case MEDIA_BUS_FMT_SGRBG12_1X12:
+	case MEDIA_BUS_FMT_SRGGB12_1X12:
+	case MEDIA_BUS_FMT_SBGGR14_1X14:
+	case MEDIA_BUS_FMT_SGBRG14_1X14:
+	case MEDIA_BUS_FMT_SGRBG14_1X14:
+	case MEDIA_BUS_FMT_SRGGB14_1X14:
+	case MEDIA_BUS_FMT_SBGGR16_1X16:
+	case MEDIA_BUS_FMT_SGBRG16_1X16:
+	case MEDIA_BUS_FMT_SGRBG16_1X16:
+	case MEDIA_BUS_FMT_SRGGB16_1X16:
 		break;
 	default:
 		sdformat->format.code = MEDIA_BUS_FMT_Y8_1X8;