openwrt/target/linux/bcm27xx/patches-6.1/950-0868-V4L2-Add-PiSP-opaque-formats-to-V4L2.patch

43 lines
1.9 KiB
Diff
Raw Normal View History

From 9a11300e46344917226b986a8740e7581d66adf3 Mon Sep 17 00:00:00 2001
From: Naushir Patuck <naush@raspberrypi.com>
Date: Mon, 7 Feb 2022 09:20:49 +0000
Subject: [PATCH] V4L2: Add PiSP opaque formats to V4L2
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
drivers/media/v4l2-core/v4l2-ioctl.c | 4 +++-
include/uapi/linux/videodev2.h | 7 +++++++
2 files changed, 10 insertions(+), 1 deletion(-)
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1452,7 +1452,9 @@ static void v4l_fill_fmtdesc(struct v4l2
case V4L2_PIX_FMT_NV12M_10BE_8L128: descr = "10-bit NV12M (8x128 Linear, BE)"; break;
case V4L2_META_FMT_SENSOR_DATA: descr = "Sensor Ancillary Metadata"; break;
case V4L2_META_FMT_BCM2835_ISP_STATS: descr = "BCM2835 ISP Image Statistics"; break;
- case V4L2_META_FMT_RPI_BE_CFG: descr = "PiSP Config format"; break;
+ case V4L2_META_FMT_RPI_BE_CFG: descr = "PiSP BE Config format"; break;
+ case V4L2_META_FMT_RPI_FE_CFG: descr = "PiSP FE Config format"; break;
+ case V4L2_META_FMT_RPI_FE_STATS: descr = "PiSP FE Statistics format"; break;
default:
/* Compressed formats */
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -826,8 +826,15 @@ struct v4l2_pix_format {
#define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */
/* The metadata format identifier for our configuration buffers. */
+/* The metadata format identifier for BE configuration buffers. */
#define V4L2_META_FMT_RPI_BE_CFG v4l2_fourcc('R', 'P', 'B', 'C')
+/* The metadata format identifier for FE configuration buffers. */
+#define V4L2_META_FMT_RPI_FE_CFG v4l2_fourcc('R', 'P', 'F', 'C')
+
+/* The metadata format identifier for FE configuration buffers. */
+#define V4L2_META_FMT_RPI_FE_STATS v4l2_fourcc('R', 'P', 'F', 'S')
+
/* priv field value to indicates that subsequent fields are valid. */
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe