0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-25 06:26:15 +00:00
openwrt/target/linux/bcm27xx/patches-6.6/950-0311-vc04_services-isp-Report-input-node-as-wanting-full-.patch
Álvaro Fernández Rojas 8c405cdccc bcm27xx: add 6.6 kernel patches
The patches were generated from the RPi repo with the following command:
git format-patch v6.6.34..rpi-6.1.y

Some patches needed rebasing and, as usual, the applied and reverted, wireless
drivers, Github workflows, READMEs and defconfigs patches were removed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-18 18:52:49 +02:00

30 lines
1.3 KiB
Diff

From 48e5daeef22c2fd67ce07c30b810c7859992bc7e Mon Sep 17 00:00:00 2001
From: David Plowman <david.plowman@raspberrypi.com>
Date: Thu, 21 Oct 2021 14:49:15 +0100
Subject: [PATCH 0311/1085] vc04_services: isp: Report input node as wanting
full range RAW color space
RAW color spaces are more usually reported as having full range
quantization.
Tested using libcamera.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
+++ b/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
@@ -1034,7 +1034,9 @@ static int bcm2835_isp_node_try_fmt(stru
/* In all cases, we only support the defaults for these: */
f->fmt.pix.ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(f->fmt.pix.colorspace);
f->fmt.pix.xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(f->fmt.pix.colorspace);
- is_rgb = f->fmt.pix.colorspace == V4L2_COLORSPACE_SRGB;
+ /* RAW counts as sRGB here so that we get full range. */
+ is_rgb = f->fmt.pix.colorspace == V4L2_COLORSPACE_SRGB ||
+ f->fmt.pix.colorspace == V4L2_COLORSPACE_RAW;
f->fmt.pix.quantization = V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, f->fmt.pix.colorspace,
f->fmt.pix.ycbcr_enc);