[WIP,RFC,05/26] include: uapi: videodev2: Add formats for unpacked RAW
diff mbox series

Message ID 20261023-b4-raw-model-v1-5-eadb9948901b@ideasonboard.com
State New
Headers show
Series
  • Support the new common raw sensor model
Related show

Commit Message

Jai Luthra Oct. 23, 2026, 10:58 a.m. UTC
The upstream series that introduced generic raw formats did not support
unpacked variants for RAW12, RAW14 etc. These were supported by the
old-style mbus codes, so add them in our header for now to prevent
breaking pipelines that use them.

Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
---
 include/linux/videodev2.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Sakari Ailus Oct. 23, 2026, 11:19 a.m. UTC | #1
Hi Jai,

On Fri, Oct 23, 2026 at 04:28:13PM +0530, Jai Luthra wrote:
> The upstream series that introduced generic raw formats did not support
> unpacked variants for RAW12, RAW14 etc. These were supported by the
> old-style mbus codes, so add them in our header for now to prevent
> breaking pipelines that use them.

Could you align this with what's in the metadata series? There's no
definition of 28-bit pixelformat, for instance. Updating the header later
on will be easier that way.

Also the appears to be some uncertainty of the memory layout of BPPs 16 and
higher. They're now found in different patches at the end of the series and
may be merged later than the rest and also in different form they are in
now.
Jai Luthra Oct. 23, 2026, 11:44 a.m. UTC | #2
Hi Sakari,

Quoting Sakari Ailus (2026-10-23 16:49:49)
> Hi Jai,
> 
> On Fri, Oct 23, 2026 at 04:28:13PM +0530, Jai Luthra wrote:
> > The upstream series that introduced generic raw formats did not support
> > unpacked variants for RAW12, RAW14 etc. These were supported by the
> > old-style mbus codes, so add them in our header for now to prevent
> > breaking pipelines that use them.
> 
> Could you align this with what's in the metadata series? There's no
> definition of 28-bit pixelformat, for instance. Updating the header later
> on will be easier that way.
> 

Oh I remember pulling that in my linux branch already, but forgot to sync
the headers with libcamera. Will do!

> Also the appears to be some uncertainty of the memory layout of BPPs 16 and
> higher. They're now found in different patches at the end of the series and
> may be merged later than the rest and also in different form they are in
> now.
> 

Ack!

Thanks,
    Jai
> -- 
> Regards,
> 
> Sakari Ailus

Patch
diff mbox series

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 129728c8bf89..05bd394b1a67 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -720,12 +720,17 @@  struct v4l2_pix_format {
 
 /* Generic CSI-2 packed raw pixel formats */
 #define V4L2_PIX_FMT_RAW_8 v4l2_fourcc('R', 'A', 'W', '8')
+#define V4L2_PIX_FMT_RAW_10 v4l2_fourcc('R', 'A', 'W', 'A')
+#define V4L2_PIX_FMT_RAW_12 v4l2_fourcc('R', 'A', 'W', 'C')
+#define V4L2_PIX_FMT_RAW_14 v4l2_fourcc('R', 'A', 'W', 'E')
+#define V4L2_PIX_FMT_RAW_16 v4l2_fourcc('R', 'A', 'W', 'G')
+#define V4L2_PIX_FMT_RAW_20 v4l2_fourcc('R', 'A', 'W', 'K')
+#define V4L2_PIX_FMT_RAW_24 v4l2_fourcc('R', 'A', 'W', 'O')
+#define V4L2_PIX_FMT_RAW_28 v4l2_fourcc('R', 'A', 'W', 'S')
 #define V4L2_PIX_FMT_RAW_CSI2_10 v4l2_fourcc('R', 'A', 'C', 'A')
 #define V4L2_PIX_FMT_RAW_CSI2_12 v4l2_fourcc('R', 'A', 'C', 'C')
 #define V4L2_PIX_FMT_RAW_CSI2_14 v4l2_fourcc('R', 'A', 'C', 'E')
-#define V4L2_PIX_FMT_RAW_16 v4l2_fourcc('R', 'A', 'W', 'G')
 #define V4L2_PIX_FMT_RAW_CSI2_20 v4l2_fourcc('R', 'A', 'C', 'K')
-#define V4L2_PIX_FMT_RAW_24 v4l2_fourcc('R', 'A', 'W', 'O')
 #define V4L2_PIX_FMT_RAW_CSI2_28 v4l2_fourcc('R', 'A', 'C', 'S')
 
 /* HSV formats */