From patchwork Tue Nov 17 16:11:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 28956 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id AA25DC3355 for ; Tue, 17 Nov 2026 16:12:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1675E6A89C; Tue, 17 Nov 2026 17:12:00 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ah7ZjMSX"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0519F6A896 for ; Tue, 17 Nov 2026 17:11:54 +0100 (CET) Received: from pb-laptop.local (185.221.140.49.nat.pool.zt.hu [185.221.140.49]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 615CE20F7 for ; Tue, 17 Nov 2026 17:09:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1794931766; bh=/KbFXfJC64Aupx4+xzl3VvzHwco0UKYWmcRVzTIpKwM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ah7ZjMSXHFAlrn9eDbU7kYzQskUmA3RbKPOrEJrbnvUEGNXiqpPwX/yd9If9dl0RU F9Ei/OAqVayMQCSk3mOxn6X/eyhyfmfEMEATui71NPZcWfHslr6D2mylgA2IJ6Ra1P as2C7ta4NOdbf7fU5sLcB4HoC9QAU4I1kuQqyxvs= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 3/3] include: linux: Move local changes to separate headers Date: Tue, 17 Nov 2026 17:11:49 +0100 Message-ID: <20261117161149.1423792-4-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261117161149.1423792-1-barnabas.pocze@ideasonboard.com> References: <20261117161149.1423792-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Mirror the "upstream" directory and create a header for each file that has local changes. Make those files contain the local changes and use `#include_next` to include the upstream headers. And undo the local changes from the "upstream" header files. The main advantage is that it is clear what is a local addition and what is an upstream thing. This should make it easier to update the headers and resolve potential conflicts. Signed-off-by: Barnabás Pőcze --- include/libcamera/meson.build | 3 +- include/linux/changes/linux/drm_fourcc.h | 123 ++++++++++++++++++ .../linux/changes/linux/media-bus-format.h | 12 ++ include/linux/changes/linux/media.h | 10 ++ include/linux/changes/linux/v4l2-controls.h | 12 ++ include/linux/changes/linux/v4l2-subdev.h | 14 ++ include/linux/changes/linux/videodev2.h | 23 ++++ include/linux/upstream/linux/drm_fourcc.h | 106 --------------- .../linux/upstream/linux/media-bus-format.h | 4 - include/linux/upstream/linux/media.h | 1 - include/linux/upstream/linux/v4l2-controls.h | 4 - include/linux/upstream/linux/v4l2-subdev.h | 5 - include/linux/upstream/linux/videodev2.h | 13 -- meson.build | 1 + 14 files changed, 197 insertions(+), 134 deletions(-) create mode 100644 include/linux/changes/linux/drm_fourcc.h create mode 100644 include/linux/changes/linux/media-bus-format.h create mode 100644 include/linux/changes/linux/media.h create mode 100644 include/linux/changes/linux/v4l2-controls.h create mode 100644 include/linux/changes/linux/v4l2-subdev.h create mode 100644 include/linux/changes/linux/videodev2.h diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index 4038ee1059..fd64f254f5 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -103,7 +103,8 @@ formats_h = custom_target('formats_h', input : files( '../../src/libcamera/formats.yaml', 'formats.h.in', - '../linux/upstream/linux/drm_fourcc.h' + '../linux/upstream/linux/drm_fourcc.h', + '../linux/changes/linux/drm_fourcc.h', ), output : 'formats.h', command : [gen_formats, '-o', '@OUTPUT@', '@INPUT@'], diff --git a/include/linux/changes/linux/drm_fourcc.h b/include/linux/changes/linux/drm_fourcc.h new file mode 100644 index 0000000000..69fd1c6014 --- /dev/null +++ b/include/linux/changes/linux/drm_fourcc.h @@ -0,0 +1,123 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas on Board Oy + */ + +#pragma once + +#include_next + +/* ========================================================================== */ +/* DRM formats */ + +/* Compressed formats */ +#define DRM_FORMAT_MJPEG fourcc_code('M', 'J', 'P', 'G') /* Motion-JPEG */ + +/* + * Bayer formats + * + * Bayer formats contain green, red and blue components, with alternating lines + * of red and green, and blue and green pixels in different orders. For each + * block of 2x2 pixels there is one pixel with a red filter, two with a green + * filter, and one with a blue filter. The filters can be arranged in different + * patterns. + * + * For example, RGGB: + * row0: RGRGRGRG... + * row1: GBGBGBGB... + * row3: RGRGRGRG... + * row4: GBGBGBGB... + * ... + * + * Vendors have different methods to pack the sampling formats to increase data + * density. For this reason the fourcc only describes pixel sample size and the + * filter pattern for each block of 2x2 pixels. A modifier is needed to + * describe the memory layout. + * + * In addition to vendor modifiers for memory layout DRM_FORMAT_MOD_LINEAR may + * be used to describe a layout where all samples are placed consecutively in + * memory. If the sample does not fit inside a single byte, the sample storage + * is extended to the minimum number of (little endian) bytes that can hold the + * sample and any unused most-significant bits are defined as padding. + * + * For example, SRGGB10: + * Each 10-bit sample is contained in 2 consecutive little endian bytes, where + * the 6 most-significant bits are unused. + */ + +/* 8-bit Bayer formats */ +#define DRM_FORMAT_SRGGB8 fourcc_code('R', 'G', 'G', 'B') +#define DRM_FORMAT_SGRBG8 fourcc_code('G', 'R', 'B', 'G') +#define DRM_FORMAT_SGBRG8 fourcc_code('G', 'B', 'R', 'G') +#define DRM_FORMAT_SBGGR8 fourcc_code('B', 'A', '8', '1') + +/* 10-bit Bayer formats */ +#define DRM_FORMAT_SRGGB10 fourcc_code('R', 'G', '1', '0') +#define DRM_FORMAT_SGRBG10 fourcc_code('B', 'A', '1', '0') +#define DRM_FORMAT_SGBRG10 fourcc_code('G', 'B', '1', '0') +#define DRM_FORMAT_SBGGR10 fourcc_code('B', 'G', '1', '0') + +/* 12-bit Bayer formats */ +#define DRM_FORMAT_SRGGB12 fourcc_code('R', 'G', '1', '2') +#define DRM_FORMAT_SGRBG12 fourcc_code('B', 'A', '1', '2') +#define DRM_FORMAT_SGBRG12 fourcc_code('G', 'B', '1', '2') +#define DRM_FORMAT_SBGGR12 fourcc_code('B', 'G', '1', '2') + +/* 14-bit Bayer formats */ +#define DRM_FORMAT_SRGGB14 fourcc_code('R', 'G', '1', '4') +#define DRM_FORMAT_SGRBG14 fourcc_code('B', 'A', '1', '4') +#define DRM_FORMAT_SGBRG14 fourcc_code('G', 'B', '1', '4') +#define DRM_FORMAT_SBGGR14 fourcc_code('B', 'G', '1', '4') + +/* 16-bit Bayer formats */ +#define DRM_FORMAT_SRGGB16 fourcc_code('R', 'G', 'B', '6') +#define DRM_FORMAT_SGRBG16 fourcc_code('G', 'R', '1', '6') +#define DRM_FORMAT_SGBRG16 fourcc_code('G', 'B', '1', '6') +#define DRM_FORMAT_SBGGR16 fourcc_code('B', 'Y', 'R', '2') + + +/* ========================================================================== */ +/* DRM format modifiers */ + +#define DRM_FORMAT_MOD_VENDOR_MIPI 0x0b +#define DRM_FORMAT_MOD_VENDOR_RPI 0x0c + +/* + * IPU3 Bayer packing layout + * + * The IPU3 raw Bayer formats use a custom packing layout where there are no + * gaps between each 10-bit sample. It packs 25 pixels into 32 bytes leaving + * the 6 most significant bits in the last byte unused. The format is little + * endian. + */ +#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13) + +/* Mobile Industry Processor Interface (MIPI) modifiers */ + +/* + * MIPI CSI-2 packing layout + * + * The CSI-2 RAW formats (for example Bayer) use a different packing layout + * depenindg on the sample size. + * + * - 10-bits per sample + * Every four consecutive samples are packed into 5 bytes. Each of the first 4 + * bytes contain the 8 high order bits of the pixels, and the 5th byte + * contains the 2 least-significant bits of each pixel, in the same order. + * + * - 12-bits per sample + * Every two consecutive samples are packed into three bytes. Each of the + * first two bytes contain the 8 high order bits of the pixels, and the third + * byte contains the four least-significant bits of each pixel, in the same + * order. + * + * - 14-bits per sample + * Every four consecutive samples are packed into seven bytes. Each of the + * first four bytes contain the eight high order bits of the pixels, and the + * three following bytes contains the six least-significant bits of each + * pixel, in the same order. + */ +#define MIPI_FORMAT_MOD_CSI2_PACKED fourcc_mod_code(MIPI, 1) + +#define PISP_FORMAT_MOD_COMPRESS_MODE1 fourcc_mod_code(RPI, 1) +#define PISP_FORMAT_MOD_COMPRESS_MODE2 fourcc_mod_code(RPI, 2) diff --git a/include/linux/changes/linux/media-bus-format.h b/include/linux/changes/linux/media-bus-format.h new file mode 100644 index 0000000000..3fefd5ee6f --- /dev/null +++ b/include/linux/changes/linux/media-bus-format.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas on Board Oy + */ + +#pragma once + +#include_next + +/* Specific metadata formats. Next is 0x9003. */ +#define MEDIA_BUS_FMT_CCS_EMBEDDED 0x9001 +#define MEDIA_BUS_FMT_OV2740_EMBEDDED 0x9002 diff --git a/include/linux/changes/linux/media.h b/include/linux/changes/linux/media.h new file mode 100644 index 0000000000..01495fad17 --- /dev/null +++ b/include/linux/changes/linux/media.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas on Board Oy + */ + +#pragma once + +#include_next + +#define MEDIA_PAD_FL_INTERNAL (1U << 3) diff --git a/include/linux/changes/linux/v4l2-controls.h b/include/linux/changes/linux/v4l2-controls.h new file mode 100644 index 0000000000..2dbfe23b74 --- /dev/null +++ b/include/linux/changes/linux/v4l2-controls.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas on Board Oy + */ + +#pragma once + +#include_next + +/* The base for the bcm2835-isp driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_BCM2835_ISP_BASE (V4L2_CID_USER_BASE + 0x10e0) diff --git a/include/linux/changes/linux/v4l2-subdev.h b/include/linux/changes/linux/v4l2-subdev.h new file mode 100644 index 0000000000..5f8c9e0700 --- /dev/null +++ b/include/linux/changes/linux/v4l2-subdev.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas on Board Oy + */ + +#pragma once + +#include_next + +/* + * Is the route immutable? The ACTIVE flag of an immutable route may not be + * unset. + */ +#define V4L2_SUBDEV_ROUTE_FL_IMMUTABLE (1U << 1) diff --git a/include/linux/changes/linux/videodev2.h b/include/linux/changes/linux/videodev2.h new file mode 100644 index 0000000000..5bb46e1318 --- /dev/null +++ b/include/linux/changes/linux/videodev2.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2026, Ideas on Board Oy + */ + +#pragma once + +#include_next + +#define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */ +#define V4L2_META_FMT_BCM2835_ISP_STATS v4l2_fourcc('B', 'S', 'T', 'A') /* BCM2835 ISP image statistics output */ + +/* + * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when + * adding new ones! + */ +#define V4L2_META_FMT_GENERIC_8 v4l2_fourcc('M', 'E', 'T', '8') /* Generic 8-bit metadata */ +#define V4L2_META_FMT_GENERIC_CSI2_10 v4l2_fourcc('M', 'C', '1', 'A') /* 10-bit CSI-2 packed 8-bit metadata */ +#define V4L2_META_FMT_GENERIC_CSI2_12 v4l2_fourcc('M', 'C', '1', 'C') /* 12-bit CSI-2 packed 8-bit metadata */ +#define V4L2_META_FMT_GENERIC_CSI2_14 v4l2_fourcc('M', 'C', '1', 'E') /* 14-bit CSI-2 packed 8-bit metadata */ +#define V4L2_META_FMT_GENERIC_CSI2_16 v4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit metadata */ +#define V4L2_META_FMT_GENERIC_CSI2_20 v4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit metadata */ +#define V4L2_META_FMT_GENERIC_CSI2_24 v4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit metadata */ diff --git a/include/linux/upstream/linux/drm_fourcc.h b/include/linux/upstream/linux/drm_fourcc.h index 8e2a6abae6..e34379dc91 100644 --- a/include/linux/upstream/linux/drm_fourcc.h +++ b/include/linux/upstream/linux/drm_fourcc.h @@ -433,70 +433,6 @@ extern "C" { #define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ #define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ -/* Compressed formats */ -#define DRM_FORMAT_MJPEG fourcc_code('M', 'J', 'P', 'G') /* Motion-JPEG */ - -/* - * Bayer formats - * - * Bayer formats contain green, red and blue components, with alternating lines - * of red and green, and blue and green pixels in different orders. For each - * block of 2x2 pixels there is one pixel with a red filter, two with a green - * filter, and one with a blue filter. The filters can be arranged in different - * patterns. - * - * For example, RGGB: - * row0: RGRGRGRG... - * row1: GBGBGBGB... - * row3: RGRGRGRG... - * row4: GBGBGBGB... - * ... - * - * Vendors have different methods to pack the sampling formats to increase data - * density. For this reason the fourcc only describes pixel sample size and the - * filter pattern for each block of 2x2 pixels. A modifier is needed to - * describe the memory layout. - * - * In addition to vendor modifiers for memory layout DRM_FORMAT_MOD_LINEAR may - * be used to describe a layout where all samples are placed consecutively in - * memory. If the sample does not fit inside a single byte, the sample storage - * is extended to the minimum number of (little endian) bytes that can hold the - * sample and any unused most-significant bits are defined as padding. - * - * For example, SRGGB10: - * Each 10-bit sample is contained in 2 consecutive little endian bytes, where - * the 6 most-significant bits are unused. - */ - -/* 8-bit Bayer formats */ -#define DRM_FORMAT_SRGGB8 fourcc_code('R', 'G', 'G', 'B') -#define DRM_FORMAT_SGRBG8 fourcc_code('G', 'R', 'B', 'G') -#define DRM_FORMAT_SGBRG8 fourcc_code('G', 'B', 'R', 'G') -#define DRM_FORMAT_SBGGR8 fourcc_code('B', 'A', '8', '1') - -/* 10-bit Bayer formats */ -#define DRM_FORMAT_SRGGB10 fourcc_code('R', 'G', '1', '0') -#define DRM_FORMAT_SGRBG10 fourcc_code('B', 'A', '1', '0') -#define DRM_FORMAT_SGBRG10 fourcc_code('G', 'B', '1', '0') -#define DRM_FORMAT_SBGGR10 fourcc_code('B', 'G', '1', '0') - -/* 12-bit Bayer formats */ -#define DRM_FORMAT_SRGGB12 fourcc_code('R', 'G', '1', '2') -#define DRM_FORMAT_SGRBG12 fourcc_code('B', 'A', '1', '2') -#define DRM_FORMAT_SGBRG12 fourcc_code('G', 'B', '1', '2') -#define DRM_FORMAT_SBGGR12 fourcc_code('B', 'G', '1', '2') - -/* 14-bit Bayer formats */ -#define DRM_FORMAT_SRGGB14 fourcc_code('R', 'G', '1', '4') -#define DRM_FORMAT_SGRBG14 fourcc_code('B', 'A', '1', '4') -#define DRM_FORMAT_SGBRG14 fourcc_code('G', 'B', '1', '4') -#define DRM_FORMAT_SBGGR14 fourcc_code('B', 'G', '1', '4') - -/* 16-bit Bayer formats */ -#define DRM_FORMAT_SRGGB16 fourcc_code('R', 'G', 'B', '6') -#define DRM_FORMAT_SGRBG16 fourcc_code('G', 'R', '1', '6') -#define DRM_FORMAT_SGBRG16 fourcc_code('G', 'B', '1', '6') -#define DRM_FORMAT_SBGGR16 fourcc_code('B', 'Y', 'R', '2') /* * Format Modifiers: @@ -523,8 +459,6 @@ extern "C" { #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a #define DRM_FORMAT_MOD_VENDOR_MTK 0x0b #define DRM_FORMAT_MOD_VENDOR_APPLE 0x0c -#define DRM_FORMAT_MOD_VENDOR_MIPI 0x0b -#define DRM_FORMAT_MOD_VENDOR_RPI 0x0c /* add more to the end as needed */ @@ -831,16 +765,6 @@ extern "C" { */ #define I915_FORMAT_MOD_4_TILED_BMG_CCS fourcc_mod_code(INTEL, 17) -/* - * IPU3 Bayer packing layout - * - * The IPU3 raw Bayer formats use a custom packing layout where there are no - * gaps between each 10-bit sample. It packs 25 pixels into 32 bytes leaving - * the 6 most significant bits in the last byte unused. The format is little - * endian. - */ -#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13) - /* * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks * @@ -1829,36 +1753,6 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) #define AMD_FMT_MOD_CLEAR(field) \ (~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT)) -/* Mobile Industry Processor Interface (MIPI) modifiers */ - -/* - * MIPI CSI-2 packing layout - * - * The CSI-2 RAW formats (for example Bayer) use a different packing layout - * depenindg on the sample size. - * - * - 10-bits per sample - * Every four consecutive samples are packed into 5 bytes. Each of the first 4 - * bytes contain the 8 high order bits of the pixels, and the 5th byte - * contains the 2 least-significant bits of each pixel, in the same order. - * - * - 12-bits per sample - * Every two consecutive samples are packed into three bytes. Each of the - * first two bytes contain the 8 high order bits of the pixels, and the third - * byte contains the four least-significant bits of each pixel, in the same - * order. - * - * - 14-bits per sample - * Every four consecutive samples are packed into seven bytes. Each of the - * first four bytes contain the eight high order bits of the pixels, and the - * three following bytes contains the six least-significant bits of each - * pixel, in the same order. - */ -#define MIPI_FORMAT_MOD_CSI2_PACKED fourcc_mod_code(MIPI, 1) - -#define PISP_FORMAT_MOD_COMPRESS_MODE1 fourcc_mod_code(RPI, 1) -#define PISP_FORMAT_MOD_COMPRESS_MODE2 fourcc_mod_code(RPI, 2) - #if defined(__cplusplus) } #endif diff --git a/include/linux/upstream/linux/media-bus-format.h b/include/linux/upstream/linux/media-bus-format.h index 3e1c867e90..6005f033e6 100644 --- a/include/linux/upstream/linux/media-bus-format.h +++ b/include/linux/upstream/linux/media-bus-format.h @@ -190,8 +190,4 @@ #define MEDIA_BUS_FMT_META_20 0x8006 #define MEDIA_BUS_FMT_META_24 0x8007 -/* Specific metadata formats. Next is 0x9003. */ -#define MEDIA_BUS_FMT_CCS_EMBEDDED 0x9001 -#define MEDIA_BUS_FMT_OV2740_EMBEDDED 0x9002 - #endif /* __LINUX_MEDIA_BUS_FORMAT_H */ diff --git a/include/linux/upstream/linux/media.h b/include/linux/upstream/linux/media.h index 4a733b9beb..b5a77bbf40 100644 --- a/include/linux/upstream/linux/media.h +++ b/include/linux/upstream/linux/media.h @@ -206,7 +206,6 @@ struct media_entity_desc { #define MEDIA_PAD_FL_SINK (1U << 0) #define MEDIA_PAD_FL_SOURCE (1U << 1) #define MEDIA_PAD_FL_MUST_CONNECT (1U << 2) -#define MEDIA_PAD_FL_INTERNAL (1U << 3) struct media_pad_desc { __u32 entity; /* entity ID */ diff --git a/include/linux/upstream/linux/v4l2-controls.h b/include/linux/upstream/linux/v4l2-controls.h index c0d9cab3c7..52d87b3308 100644 --- a/include/linux/upstream/linux/v4l2-controls.h +++ b/include/linux/upstream/linux/v4l2-controls.h @@ -177,10 +177,6 @@ enum v4l2_colorfx { * We reserve 128 controls for this driver. */ #define V4L2_CID_USER_CCS_BASE (V4L2_CID_USER_BASE + 0x10f0) - -/* The base for the bcm2835-isp driver controls. - * We reserve 16 controls for this driver. */ -#define V4L2_CID_USER_BCM2835_ISP_BASE (V4L2_CID_USER_BASE + 0x10e0) /* * The base for Allegro driver controls. * We reserve 16 controls for this driver. diff --git a/include/linux/upstream/linux/v4l2-subdev.h b/include/linux/upstream/linux/v4l2-subdev.h index 839b1329af..2347e266cf 100644 --- a/include/linux/upstream/linux/v4l2-subdev.h +++ b/include/linux/upstream/linux/v4l2-subdev.h @@ -204,11 +204,6 @@ struct v4l2_subdev_capability { * on a video node. */ #define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0) -/* - * Is the route immutable? The ACTIVE flag of an immutable route may not be - * unset. - */ -#define V4L2_SUBDEV_ROUTE_FL_IMMUTABLE (1U << 1) /** * struct v4l2_subdev_route - A route inside a subdev diff --git a/include/linux/upstream/linux/videodev2.h b/include/linux/upstream/linux/videodev2.h index 8bccad84ff..feb326686e 100644 --- a/include/linux/upstream/linux/videodev2.h +++ b/include/linux/upstream/linux/videodev2.h @@ -843,8 +843,6 @@ struct v4l2_pix_format { #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */ #define V4L2_META_FMT_UVC_MSXU_1_5 v4l2_fourcc('U', 'V', 'C', 'M') /* UVC MSXU metadata */ #define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */ -#define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */ -#define V4L2_META_FMT_BCM2835_ISP_STATS v4l2_fourcc('B', 'S', 'T', 'A') /* BCM2835 ISP image statistics output */ /* Vendor specific - used for RK_ISP1 camera sub-system */ #define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ @@ -864,17 +862,6 @@ struct v4l2_pix_format { #define V4L2_META_FMT_MALI_C55_PARAMS v4l2_fourcc('C', '5', '5', 'P') /* ARM Mali-C55 Parameters */ #define V4L2_META_FMT_MALI_C55_STATS v4l2_fourcc('C', '5', '5', 'S') /* ARM Mali-C55 3A Statistics */ -/* - * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when - * adding new ones! - */ -#define V4L2_META_FMT_GENERIC_8 v4l2_fourcc('M', 'E', 'T', '8') /* Generic 8-bit metadata */ -#define V4L2_META_FMT_GENERIC_CSI2_10 v4l2_fourcc('M', 'C', '1', 'A') /* 10-bit CSI-2 packed 8-bit metadata */ -#define V4L2_META_FMT_GENERIC_CSI2_12 v4l2_fourcc('M', 'C', '1', 'C') /* 12-bit CSI-2 packed 8-bit metadata */ -#define V4L2_META_FMT_GENERIC_CSI2_14 v4l2_fourcc('M', 'C', '1', 'E') /* 14-bit CSI-2 packed 8-bit metadata */ -#define V4L2_META_FMT_GENERIC_CSI2_16 v4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit metadata */ -#define V4L2_META_FMT_GENERIC_CSI2_20 v4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit metadata */ -#define V4L2_META_FMT_GENERIC_CSI2_24 v4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit metadata */ /* priv field value to indicates that subsequent fields are valid. */ #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe diff --git a/meson.build b/meson.build index e6c2987320..2aeb5eb7f9 100644 --- a/meson.build +++ b/meson.build @@ -202,6 +202,7 @@ add_project_link_arguments(cpp_arguments, language : 'cpp') libcamera_includes = include_directories( 'include', + 'include/linux/changes', 'include/linux/upstream', )