Thread (49 messages) 49 messages, 7 authors, 2026-04-07

Re: [RFC v1 07/11] media: Add meta formats supported by NXP neoisp driver

From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Date: 2026-02-04 13:36:13
Also in: linux-devicetree, linux-media, lkml

Hi Antoine

On Wed, Feb 04, 2026 at 02:31:47PM +0100, Antoine Bouyer wrote:
Hi Jacopo

Le 03/02/2026 à 18:11, Jacopo Mondi a écrit :
quoted
Hi Antoine

On Fri, Jan 23, 2026 at 09:09:34AM +0100, Antoine Bouyer wrote:
quoted
This patch adds new v4l2 meta formats definitions and descriptions used by
neoisp driver for the parameters and statistics buffers:
  - `V4L2_META_FMT_NEO_ISP_PARAMS` used for the legacy fixed-size
parameters buffer structure.
  - `V4L2_META_FMT_NEO_ISP_EXT_PARAMS` used for the generic v4l2-isp
extensible parameters structure, supporting a non-fixed-size buffer and
changeable ISP configuration blocks.
  - `V4L2_META_FMT_NEO_ISP_STATS` used for the legacy fixed-size statistics
buffer structure.
  - `V4L2_META_FMT_NEO_ISP_EXT_STATS` used for the generic v4l2-isp
extensible statistics structure, supporting a non-fixed-size buffer
and changeable ISP statistics blocks.
Uh interesting, you have existing userspace that needs legacy formats ?
Yes we do have some available here (version with extensible formats will be
the next one):
https://github.com/nxp-imx/libcamera

Not in mainline, thought.
I see.

However I don't think the mainline driver should support both formats.

And looking at your libcamera branch, it seem it already supports the
extensible version.

BR
Antoine
quoted
quoted
Signed-off-by: Antoine Bouyer <redacted>
---
  drivers/media/v4l2-core/v4l2-ioctl.c | 4 ++++
  include/uapi/linux/videodev2.h       | 6 ++++++
  2 files changed, 10 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 37d33d4a363d..c797cf11be38 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1471,6 +1471,10 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
       case V4L2_META_FMT_C3ISP_STATS:         descr = "Amlogic C3 ISP Statistics"; break;
       case V4L2_META_FMT_MALI_C55_PARAMS:     descr = "ARM Mali-C55 ISP Parameters"; break;
       case V4L2_META_FMT_MALI_C55_STATS:      descr = "ARM Mali-C55 ISP 3A Statistics"; break;
+     case V4L2_META_FMT_NEO_ISP_PARAMS:      descr = "NXP Neo ISP 3A Parameters"; break;
+     case V4L2_META_FMT_NEO_ISP_EXT_PARAMS:  descr = "NXP Neo ISP ext 3A Parameters"; break;
+     case V4L2_META_FMT_NEO_ISP_STATS:       descr = "NXP Neo ISP 3A Statistics"; break;
+     case V4L2_META_FMT_NEO_ISP_EXT_STATS:   descr = "NXP Neo ISP ext 3A Statistics"; break;
       case V4L2_PIX_FMT_NV12_8L128:   descr = "NV12 (8x128 Linear)"; break;
       case V4L2_PIX_FMT_NV12M_8L128:  descr = "NV12M (8x128 Linear)"; break;
       case V4L2_PIX_FMT_NV12_10BE_8L128:      descr = "10-bit NV12 (8x128 Linear, BE)"; break;
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 848e86617d5c..5f4992452c66 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -889,6 +889,12 @@ 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 */

+/* Vendor specific - used for NXP NEOISP sub-system */
+#define V4L2_META_FMT_NEO_ISP_PARAMS         v4l2_fourcc('N', 'N', 'I', 'P') /* NXP NEOISP Parameters */
+#define V4L2_META_FMT_NEO_ISP_EXT_PARAMS     v4l2_fourcc('N', 'N', 'E', 'P') /* NXP NEOISP Ext Params */
+#define V4L2_META_FMT_NEO_ISP_STATS          v4l2_fourcc('N', 'N', 'I', 'S') /* NXP NEOISP Statistics */
+#define V4L2_META_FMT_NEO_ISP_EXT_STATS              v4l2_fourcc('N', 'N', 'E', 'S') /* NXP NEOISP Ext Stats */
+
  #ifdef __KERNEL__
  /*
   * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when
--
2.52.0
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help