ImmortalWrt/target/linux/bcm27xx/patches-5.15/950-0268-media-i2c-imx290-Set-the-colorspace-fields-in-the-fo.patch
Álvaro Fernández Rojas 20ea6adbf1 bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-17 15:11:22 +02:00

32 lines
1.1 KiB
Diff

From 011a58382464937945ad70946241aaa881b8a512 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Tue, 7 Jul 2020 11:51:26 +0100
Subject: [PATCH] media: i2c: imx290: Set the colorspace fields in the
format
The colorspace fields were left untouched in imx290_set_fmt
which lead to a v4l2-compliance failure.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/media/i2c/imx290.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -813,6 +813,14 @@ static int imx290_set_fmt(struct v4l2_su
fmt->format.code = imx290->formats[i].code;
fmt->format.field = V4L2_FIELD_NONE;
+ fmt->format.colorspace = V4L2_COLORSPACE_SRGB;
+ fmt->format.ycbcr_enc =
+ V4L2_MAP_YCBCR_ENC_DEFAULT(fmt->format.colorspace);
+ fmt->format.quantization =
+ V4L2_MAP_QUANTIZATION_DEFAULT(true, fmt->format.colorspace,
+ fmt->format.ycbcr_enc);
+ fmt->format.xfer_func =
+ V4L2_MAP_XFER_FUNC_DEFAULT(fmt->format.colorspace);
if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
format = v4l2_subdev_get_try_format(sd, sd_state, fmt->pad);