From patchwork Wed Jul 22 11:23:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 27443 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 0C4F3BDE17 for ; Wed, 22 Jul 2026 11:25:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AB76167E9B; Wed, 22 Jul 2026 13:25:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="acNeNgF6"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 20344660AE for ; Wed, 22 Jul 2026 13:25:28 +0200 (CEST) Received: from mail.ideasonboard.com (unknown [IPv6:2401:4900:1c68:25d4:fa24:78d1:31:7a56]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AEE53227; Wed, 22 Jul 2026 13:24:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1784719468; bh=TOULqoRW+YD3yRnY6lxYfZvEO2iG56NsbGi9c2xw2ro=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=acNeNgF6vQE8COcI8vTIoJLWGTwmsCbHBhRSfOgE6riaI8846SUUFQ/vr/mk4OqHJ mtb8fQO0lNNWof/eRNudOXVxsGyYn8krIrci6F1RrVTfWcBkbjHH+hMNmv5OHV5ai8 KbCK79Ltmu7s1JeR4PIhL+oNFFabESISTs3LIJ3s= From: Jai Luthra Date: Wed, 22 Jul 2026 16:53:24 +0530 Subject: [PATCH v2 8/8] include: uapi: bcm2835-isp: Drop legacy V4L2 controls MIME-Version: 1.0 Message-Id: <20260722-pi4-upstream-v2-8-eb44d3c6fd92@ideasonboard.com> References: <20260722-pi4-upstream-v2-0-eb44d3c6fd92@ideasonboard.com> In-Reply-To: <20260722-pi4-upstream-v2-0-eb44d3c6fd92@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Daniel Scally , Jai Luthra X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=8103; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=TOULqoRW+YD3yRnY6lxYfZvEO2iG56NsbGi9c2xw2ro=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBqYKhurBsUj1C7GOqHeT4pXtt4b1JGxyV2im9s6 cxSAjIUgN+JAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCamCobgAKCRBD3pH5JJpx RXSrD/9NDpHFATeiZwotIN/y8A0/BeppW4or8RYuTmjPKyk9cZCAkzSAI0/5971awsze+8/YGyn bIwjmEAkqEzJLL7hd6boM+kijRff6V0OvZD+5Ne4OnMDIj2w3y5wJXYrEJlVULorJGQHEWMipxM QCtX8qkf7F7QJzb52fxFqptd1XE5/ZBr203OfmcVk+7nCvdsCVZj9eQZq4yLgEf19zokwAD5HBC eQqwDS9Q4+xI6sjkPxEDhagBXTttSoA7kiFwxJm3i5Xx3eRDjWZfubvY2viBix2pe2kFoe6+arB GuIywCj+WVeEU2fHZiYQa79efO2tXhMzfUvXZxcZIhLF2RJl5+UBB01GtQ4yAqIq00hW3RHa9l2 ECyTkS0PqKgYjaZX77MAXS0UNfFIh81kD1ptcHYovho9dwp1sOLi0N1BfO88Ag5gcR6cTtAiMz0 xemDL/vImAL+8DvSHO9duUWSUdLfwHudwfUrenDjzrExhrhwMVZyn9lFPQ0+eJlHfNS1Z/ydUZp +N0sYeGN4abM4/YLzDnjRkyrZwukVdLDyMgg4mKuJP0TDfj8IO+3AV0CrZ2hMVrduOjeZH4LVIl jrwzydJ19pESB2Xh0U6DGvndFF7rv4KZFSOzAe+cgY4N6sa9nuX6ltw8T9w0FfwnNcxBHS8OGmh gIpX0JijAgicMXg== X-Developer-Key: i=jai.luthra@ideasonboard.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 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" Now that the VC4 IPA and pipeline handler pass ISP configuration exclusively through parameter buffers, the V4L2_CID_USER_BCM2835_ISP_* custom controls are unused. Drop them, clean up the struct documentation that still referenced the controls, and fix the bcm2835_isp_params statistics fourcc comment to match the mainline kernel header. Signed-off-by: Jai Luthra --- include/linux/bcm2835-isp.h | 61 ++++++++++++------------------------------- include/linux/v4l2-controls.h | 3 --- include/linux/videodev2.h | 2 +- 3 files changed, 17 insertions(+), 49 deletions(-) diff --git a/include/linux/bcm2835-isp.h b/include/linux/bcm2835-isp.h index c49854cfa..0f3c1b4db 100644 --- a/include/linux/bcm2835-isp.h +++ b/include/linux/bcm2835-isp.h @@ -13,27 +13,8 @@ #ifndef __BCM2835_ISP_H_ #define __BCM2835_ISP_H_ -#include #include -#define V4L2_CID_USER_BCM2835_ISP_CC_MATRIX \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0001) -#define V4L2_CID_USER_BCM2835_ISP_LENS_SHADING \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0002) -#define V4L2_CID_USER_BCM2835_ISP_BLACK_LEVEL \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0003) -#define V4L2_CID_USER_BCM2835_ISP_GEQ \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0004) -#define V4L2_CID_USER_BCM2835_ISP_GAMMA \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0005) -#define V4L2_CID_USER_BCM2835_ISP_DENOISE \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0006) -#define V4L2_CID_USER_BCM2835_ISP_SHARPEN \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0007) -#define V4L2_CID_USER_BCM2835_ISP_DPC \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0008) -#define V4L2_CID_USER_BCM2835_ISP_CDN \ - (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0009) /* * All structs below are directly mapped onto the equivalent structs in * drivers/staging/vc04_services/vchiq-mmal/mmal-parameters.h @@ -63,8 +44,7 @@ struct bcm2835_isp_ccm { }; /** - * struct bcm2835_isp_custom_ccm - Custom CCM applied with the - * V4L2_CID_USER_BCM2835_ISP_CC_MATRIX ctrl. + * struct bcm2835_isp_custom_ccm - Custom CCM configuration. * * @enabled: Enable custom CCM. * @ccm: Custom CCM coefficients and offsets. @@ -76,8 +56,7 @@ struct bcm2835_isp_custom_ccm { /** * enum bcm2835_isp_gain_format - format of the gains in the lens shading - * tables used with the - * V4L2_CID_USER_BCM2835_ISP_LENS_SHADING ctrl. + * tables. * * @GAIN_FORMAT_U0P8_1: Gains are u0.8 format, starting at 1.0 * @GAIN_FORMAT_U1P7_0: Gains are u1.7 format, starting at 0.0 @@ -100,9 +79,7 @@ enum bcm2835_isp_gain_format { }; /** - * struct bcm2835_isp_lens_shading - Lens shading tables supplied with the - * V4L2_CID_USER_BCM2835_ISP_LENS_SHADING - * ctrl. + * struct bcm2835_isp_lens_shading - Lens shading tables. * * @enabled: Enable lens shading. * @grid_cell_size: Size of grid cells in samples (16, 32, 64, 128 or 256). @@ -129,13 +106,13 @@ struct bcm2835_isp_lens_shading { }; /** - * struct bcm2835_isp_black_level - Sensor black level set with the - * V4L2_CID_USER_BCM2835_ISP_BLACK_LEVEL ctrl. + * struct bcm2835_isp_black_level - Sensor black level configuration. * * @enabled: Enable black level. * @black_level_r: Black level for red channel. * @black_level_g: Black level for green channels. * @black_level_b: Black level for blue channel. + * @padding: Unused padding. */ struct bcm2835_isp_black_level { __u32 enabled; @@ -146,8 +123,7 @@ struct bcm2835_isp_black_level { }; /** - * struct bcm2835_isp_geq - Green equalisation parameters set with the - * V4L2_CID_USER_BCM2835_ISP_GEQ ctrl. + * struct bcm2835_isp_geq - Green equalisation parameters. * * @enabled: Enable green equalisation. * @offset: Fixed offset of the green equalisation threshold. @@ -162,13 +138,12 @@ struct bcm2835_isp_geq { #define BCM2835_NUM_GAMMA_PTS 33 /** - * struct bcm2835_isp_gamma - Gamma parameters set with the - * V4L2_CID_USER_BCM2835_ISP_GAMMA ctrl. + * struct bcm2835_isp_gamma - Gamma parameters. * * @enabled: Enable gamma adjustment. - * @X: X values of the points defining the gamma curve. + * @x: X values of the points defining the gamma curve. * Values should be scaled to 16 bits. - * @Y: Y values of the points defining the gamma curve. + * @y: Y values of the points defining the gamma curve. * Values should be scaled to 16 bits. */ struct bcm2835_isp_gamma { @@ -180,9 +155,9 @@ struct bcm2835_isp_gamma { /** * enum bcm2835_isp_cdn_mode - Mode of operation for colour denoise. * - * @CDN_MODE_FAST: Fast (but lower quality) colour denoise + * @CDN_MODE_FAST: Fast (but lower quality) colour denoise * algorithm, typically used for video recording. - * @CDN_HIGH_QUALITY: High quality (but slower) colour denoise + * @CDN_MODE_HIGH_QUALITY: High quality (but slower) colour denoise * algorithm, typically used for stills capture. */ enum bcm2835_isp_cdn_mode { @@ -191,11 +166,10 @@ enum bcm2835_isp_cdn_mode { }; /** - * struct bcm2835_isp_cdn - Colour denoise parameters set with the - * V4L2_CID_USER_BCM2835_ISP_CDN ctrl. + * struct bcm2835_isp_cdn - Colour denoise parameters. * * @enabled: Enable colour denoise. - * @cdn_mode: Colour denoise operating mode (see enum &bcm2835_isp_cdn_mode) + * @mode: Colour denoise operating mode (see enum &bcm2835_isp_cdn_mode) */ struct bcm2835_isp_cdn { __u32 enabled; @@ -203,8 +177,7 @@ struct bcm2835_isp_cdn { }; /** - * struct bcm2835_isp_denoise - Denoise parameters set with the - * V4L2_CID_USER_BCM2835_ISP_DENOISE ctrl. + * struct bcm2835_isp_denoise - Denoise parameters. * * @enabled: Enable denoise. * @constant: Fixed offset of the noise threshold. @@ -219,8 +192,7 @@ struct bcm2835_isp_denoise { }; /** - * struct bcm2835_isp_sharpen - Sharpen parameters set with the - * V4L2_CID_USER_BCM2835_ISP_SHARPEN ctrl. + * struct bcm2835_isp_sharpen - Sharpen parameters. * * @enabled: Enable sharpening. * @threshold: Threshold at which to start sharpening pixels. @@ -248,8 +220,7 @@ enum bcm2835_isp_dpc_mode { }; /** - * struct bcm2835_isp_dpc - Defective pixel correction (DPC) parameters set - * with the V4L2_CID_USER_BCM2835_ISP_DPC ctrl. + * struct bcm2835_isp_dpc - Defective pixel correction (DPC) parameters. * * @enabled: Enable DPC. * @strength: DPC strength (see enum &bcm2835_isp_dpc_mode). diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h index c0d9cab3c..aff5280b6 100644 --- a/include/linux/v4l2-controls.h +++ b/include/linux/v4l2-controls.h @@ -178,9 +178,6 @@ enum v4l2_colorfx { */ #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/videodev2.h b/include/linux/videodev2.h index 60133dcf9..e14c78ed5 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -844,7 +844,7 @@ struct v4l2_pix_format { #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 */ +#define V4L2_META_FMT_BCM2835_ISP_STATS v4l2_fourcc('B', 'S', 'T', 'A') /* BCM2835 ISP stats */ #define V4L2_META_FMT_BCM2835_ISP_PARAMS v4l2_fourcc('B', 'C', 'M', 'P') /* BCM2835 ISP params */ /* Vendor specific - used for RK_ISP1 camera sub-system */