This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: v4l-utils: sync with latest media kernel tree
Author:  Hans Verkuil <[email protected]>
Date:    Wed Sep 10 10:06:14 2025 +0200

No new features, just whitespace changes and some reordering
of code.

Signed-off-by: Hans Verkuil <[email protected]>

 contrib/freebsd/include/linux/v4l2-controls.h | 121 +++++++++++++------------
 contrib/freebsd/include/linux/videodev2.h     |  18 ++--
 include/linux/v4l2-controls.h                 | 121 +++++++++++++------------
 include/linux/v4l2-dv-timings.h               |   2 +-
 include/linux/videodev2.h                     |  18 ++--
 utils/v4l2-tracer/retrace-gen.cpp             | 124 +++++++++++++-------------
 utils/v4l2-tracer/retrace-gen.h               |   4 +-
 utils/v4l2-tracer/trace-gen.cpp               |  68 +++++++-------
 utils/v4l2-tracer/trace-gen.h                 |   4 +-
 utils/v4l2-tracer/v4l2-tracer-info-gen.h      |   6 +-
 10 files changed, 242 insertions(+), 244 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=add21b0ec041c2306428a86ea4935e12b810fd89
diff --git a/contrib/freebsd/include/linux/v4l2-controls.h 
b/contrib/freebsd/include/linux/v4l2-controls.h
index 3c57491d8e4a..f6854555f848 100644
--- a/contrib/freebsd/include/linux/v4l2-controls.h
+++ b/contrib/freebsd/include/linux/v4l2-controls.h
@@ -1193,7 +1193,7 @@ enum v4l2_flash_strobe_source {
 #define V4L2_CID_JPEG_CLASS_BASE               (V4L2_CTRL_CLASS_JPEG | 0x900)
 #define V4L2_CID_JPEG_CLASS                    (V4L2_CTRL_CLASS_JPEG | 1)
 
-#define        V4L2_CID_JPEG_CHROMA_SUBSAMPLING        
(V4L2_CID_JPEG_CLASS_BASE + 1)
+#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING       (V4L2_CID_JPEG_CLASS_BASE + 1)
 enum v4l2_jpeg_chroma_subsampling {
        V4L2_JPEG_CHROMA_SUBSAMPLING_444        = 0,
        V4L2_JPEG_CHROMA_SUBSAMPLING_422        = 1,
@@ -1202,15 +1202,15 @@ enum v4l2_jpeg_chroma_subsampling {
        V4L2_JPEG_CHROMA_SUBSAMPLING_410        = 4,
        V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY       = 5,
 };
-#define        V4L2_CID_JPEG_RESTART_INTERVAL          
(V4L2_CID_JPEG_CLASS_BASE + 2)
-#define        V4L2_CID_JPEG_COMPRESSION_QUALITY       
(V4L2_CID_JPEG_CLASS_BASE + 3)
+#define V4L2_CID_JPEG_RESTART_INTERVAL         (V4L2_CID_JPEG_CLASS_BASE + 2)
+#define V4L2_CID_JPEG_COMPRESSION_QUALITY      (V4L2_CID_JPEG_CLASS_BASE + 3)
 
-#define        V4L2_CID_JPEG_ACTIVE_MARKER             
(V4L2_CID_JPEG_CLASS_BASE + 4)
-#define        V4L2_JPEG_ACTIVE_MARKER_APP0            (1 << 0)
-#define        V4L2_JPEG_ACTIVE_MARKER_APP1            (1 << 1)
-#define        V4L2_JPEG_ACTIVE_MARKER_COM             (1 << 16)
-#define        V4L2_JPEG_ACTIVE_MARKER_DQT             (1 << 17)
-#define        V4L2_JPEG_ACTIVE_MARKER_DHT             (1 << 18)
+#define V4L2_CID_JPEG_ACTIVE_MARKER            (V4L2_CID_JPEG_CLASS_BASE + 4)
+#define V4L2_JPEG_ACTIVE_MARKER_APP0           (1 << 0)
+#define V4L2_JPEG_ACTIVE_MARKER_APP1           (1 << 1)
+#define V4L2_JPEG_ACTIVE_MARKER_COM            (1 << 16)
+#define V4L2_JPEG_ACTIVE_MARKER_DQT            (1 << 17)
+#define V4L2_JPEG_ACTIVE_MARKER_DHT            (1 << 18)
 
 
 /* Image source controls */
@@ -1243,10 +1243,10 @@ enum v4l2_jpeg_chroma_subsampling {
 #define V4L2_CID_DV_CLASS_BASE                 (V4L2_CTRL_CLASS_DV | 0x900)
 #define V4L2_CID_DV_CLASS                      (V4L2_CTRL_CLASS_DV | 1)
 
-#define        V4L2_CID_DV_TX_HOTPLUG                  (V4L2_CID_DV_CLASS_BASE 
+ 1)
-#define        V4L2_CID_DV_TX_RXSENSE                  (V4L2_CID_DV_CLASS_BASE 
+ 2)
-#define        V4L2_CID_DV_TX_EDID_PRESENT             (V4L2_CID_DV_CLASS_BASE 
+ 3)
-#define        V4L2_CID_DV_TX_MODE                     (V4L2_CID_DV_CLASS_BASE 
+ 4)
+#define V4L2_CID_DV_TX_HOTPLUG                 (V4L2_CID_DV_CLASS_BASE + 1)
+#define V4L2_CID_DV_TX_RXSENSE                 (V4L2_CID_DV_CLASS_BASE + 2)
+#define V4L2_CID_DV_TX_EDID_PRESENT            (V4L2_CID_DV_CLASS_BASE + 3)
+#define V4L2_CID_DV_TX_MODE                    (V4L2_CID_DV_CLASS_BASE + 4)
 enum v4l2_dv_tx_mode {
        V4L2_DV_TX_MODE_DVI_D   = 0,
        V4L2_DV_TX_MODE_HDMI    = 1,
@@ -1267,7 +1267,7 @@ enum v4l2_dv_it_content_type {
        V4L2_DV_IT_CONTENT_TYPE_NO_ITC    = 4,
 };
 
-#define        V4L2_CID_DV_RX_POWER_PRESENT            (V4L2_CID_DV_CLASS_BASE 
+ 100)
+#define V4L2_CID_DV_RX_POWER_PRESENT           (V4L2_CID_DV_CLASS_BASE + 100)
 #define V4L2_CID_DV_RX_RGB_RANGE               (V4L2_CID_DV_CLASS_BASE + 101)
 #define V4L2_CID_DV_RX_IT_CONTENT_TYPE         (V4L2_CID_DV_CLASS_BASE + 102)
 
@@ -1537,15 +1537,6 @@ struct v4l2_ctrl_h264_pred_weights {
        struct v4l2_h264_weight_factors weight_factors[2];
 };
 
-#define V4L2_H264_SLICE_TYPE_P                         0
-#define V4L2_H264_SLICE_TYPE_B                         1
-#define V4L2_H264_SLICE_TYPE_I                         2
-#define V4L2_H264_SLICE_TYPE_SP                                3
-#define V4L2_H264_SLICE_TYPE_SI                                4
-
-#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED    0x01
-#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH             0x02
-
 #define V4L2_H264_TOP_FIELD_REF                                0x1
 #define V4L2_H264_BOTTOM_FIELD_REF                     0x2
 #define V4L2_H264_FRAME_REF                            0x3
@@ -1566,8 +1557,17 @@ struct v4l2_h264_reference {
  * Maximum DPB size, as specified by section 'A.3.1 Level limits
  * common to the Baseline, Main, and Extended profiles'.
  */
-#define V4L2_H264_NUM_DPB_ENTRIES 16
-#define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES)
+#define V4L2_H264_NUM_DPB_ENTRIES              16
+#define V4L2_H264_REF_LIST_LEN                 (2 * V4L2_H264_NUM_DPB_ENTRIES)
+
+#define V4L2_H264_SLICE_TYPE_P                         0
+#define V4L2_H264_SLICE_TYPE_B                         1
+#define V4L2_H264_SLICE_TYPE_I                         2
+#define V4L2_H264_SLICE_TYPE_SP                                3
+#define V4L2_H264_SLICE_TYPE_SI                                4
+
+#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED            0x01
+#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH                     0x02
 
 #define V4L2_CID_STATELESS_H264_SLICE_PARAMS   (V4L2_CID_CODEC_STATELESS_BASE 
+ 6)
 /**
@@ -1707,7 +1707,6 @@ struct v4l2_ctrl_h264_decode_params {
        __u32 flags;
 };
 
-
 /* Stateless FWHT control, used by the vicodec driver */
 
 /* Current FWHT version */
@@ -2549,44 +2548,10 @@ struct v4l2_ctrl_hevc_scaling_matrix {
        __u8    scaling_list_dc_coef_32x32[2];
 };
 
-#define V4L2_CID_COLORIMETRY_CLASS_BASE        (V4L2_CTRL_CLASS_COLORIMETRY | 
0x900)
-#define V4L2_CID_COLORIMETRY_CLASS     (V4L2_CTRL_CLASS_COLORIMETRY | 1)
-
-#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO    
(V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
-
-struct v4l2_ctrl_hdr10_cll_info {
-       __u16 max_content_light_level;
-       __u16 max_pic_average_light_level;
-};
-
-#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY   
(V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
-
-#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW   5
-#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH  37000
-#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW   5
-#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH  42000
-#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
-#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH        37000
-#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
-#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH        42000
-#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW      50000
-#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH     100000000
-#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW      1
-#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH     50000
-
-struct v4l2_ctrl_hdr10_mastering_display {
-       __u16 display_primaries_x[3];
-       __u16 display_primaries_y[3];
-       __u16 white_point_x;
-       __u16 white_point_y;
-       __u32 max_display_mastering_luminance;
-       __u32 min_display_mastering_luminance;
-};
-
 /* Stateless VP9 controls */
 
 #define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED        0x1
-#define        V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE  0x2
+#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2
 
 /**
  * struct v4l2_vp9_loop_filter - VP9 loop filter parameters
@@ -3513,4 +3478,38 @@ struct v4l2_ctrl_av1_film_grain {
 #define V4L2_CID_MPEG_CX2341X_BASE      V4L2_CID_CODEC_CX2341X_BASE
 #define V4L2_CID_MPEG_MFC51_BASE        V4L2_CID_CODEC_MFC51_BASE
 
+#define V4L2_CID_COLORIMETRY_CLASS_BASE        (V4L2_CTRL_CLASS_COLORIMETRY | 
0x900)
+#define V4L2_CID_COLORIMETRY_CLASS     (V4L2_CTRL_CLASS_COLORIMETRY | 1)
+
+#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO    
(V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
+
+struct v4l2_ctrl_hdr10_cll_info {
+       __u16 max_content_light_level;
+       __u16 max_pic_average_light_level;
+};
+
+#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY   
(V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
+
+#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW   5
+#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH  37000
+#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW   5
+#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH  42000
+#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
+#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH        37000
+#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
+#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH        42000
+#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW      50000
+#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH     100000000
+#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW      1
+#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH     50000
+
+struct v4l2_ctrl_hdr10_mastering_display {
+       __u16 display_primaries_x[3];
+       __u16 display_primaries_y[3];
+       __u16 white_point_x;
+       __u16 white_point_y;
+       __u32 max_display_mastering_luminance;
+       __u32 min_display_mastering_luminance;
+};
+
 #endif
diff --git a/contrib/freebsd/include/linux/videodev2.h 
b/contrib/freebsd/include/linux/videodev2.h
index 581da1fc8cdc..0b1465842b3f 100644
--- a/contrib/freebsd/include/linux/videodev2.h
+++ b/contrib/freebsd/include/linux/videodev2.h
@@ -1576,8 +1576,8 @@ struct v4l2_bt_timings {
 } __attribute__ ((packed));
 
 /* Interlaced or progressive format */
-#define        V4L2_DV_PROGRESSIVE     0
-#define        V4L2_DV_INTERLACED      1
+#define V4L2_DV_PROGRESSIVE    0
+#define V4L2_DV_INTERLACED     1
 
 /* Polarities. If bit is not set, it is assumed to be negative polarity */
 #define V4L2_DV_VSYNC_POS_POL  0x00000001
@@ -2749,15 +2749,15 @@ struct v4l2_remove_buffers {
  * Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
  * You must be root to use these ioctls. Never use these in applications!
  */
-#define        VIDIOC_DBG_S_REGISTER    _IOW('V', 79, struct v4l2_dbg_register)
-#define        VIDIOC_DBG_G_REGISTER   _IOWR('V', 80, struct v4l2_dbg_register)
+#define VIDIOC_DBG_S_REGISTER   _IOW('V', 79, struct v4l2_dbg_register)
+#define VIDIOC_DBG_G_REGISTER  _IOWR('V', 80, struct v4l2_dbg_register)
 
 #define VIDIOC_S_HW_FREQ_SEEK   _IOW('V', 82, struct v4l2_hw_freq_seek)
-#define        VIDIOC_S_DV_TIMINGS     _IOWR('V', 87, struct v4l2_dv_timings)
-#define        VIDIOC_G_DV_TIMINGS     _IOWR('V', 88, struct v4l2_dv_timings)
-#define        VIDIOC_DQEVENT           _IOR('V', 89, struct v4l2_event)
-#define        VIDIOC_SUBSCRIBE_EVENT   _IOW('V', 90, struct 
v4l2_event_subscription)
-#define        VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct 
v4l2_event_subscription)
+#define VIDIOC_S_DV_TIMINGS    _IOWR('V', 87, struct v4l2_dv_timings)
+#define VIDIOC_G_DV_TIMINGS    _IOWR('V', 88, struct v4l2_dv_timings)
+#define VIDIOC_DQEVENT          _IOR('V', 89, struct v4l2_event)
+#define VIDIOC_SUBSCRIBE_EVENT  _IOW('V', 90, struct v4l2_event_subscription)
+#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
 #define VIDIOC_CREATE_BUFS     _IOWR('V', 92, struct v4l2_create_buffers)
 #define VIDIOC_PREPARE_BUF     _IOWR('V', 93, struct v4l2_buffer)
 #define VIDIOC_G_SELECTION     _IOWR('V', 94, struct v4l2_selection)
diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
index 3c57491d8e4a..f6854555f848 100644
--- a/include/linux/v4l2-controls.h
+++ b/include/linux/v4l2-controls.h
@@ -1193,7 +1193,7 @@ enum v4l2_flash_strobe_source {
 #define V4L2_CID_JPEG_CLASS_BASE               (V4L2_CTRL_CLASS_JPEG | 0x900)
 #define V4L2_CID_JPEG_CLASS                    (V4L2_CTRL_CLASS_JPEG | 1)
 
-#define        V4L2_CID_JPEG_CHROMA_SUBSAMPLING        
(V4L2_CID_JPEG_CLASS_BASE + 1)
+#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING       (V4L2_CID_JPEG_CLASS_BASE + 1)
 enum v4l2_jpeg_chroma_subsampling {
        V4L2_JPEG_CHROMA_SUBSAMPLING_444        = 0,
        V4L2_JPEG_CHROMA_SUBSAMPLING_422        = 1,
@@ -1202,15 +1202,15 @@ enum v4l2_jpeg_chroma_subsampling {
        V4L2_JPEG_CHROMA_SUBSAMPLING_410        = 4,
        V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY       = 5,
 };
-#define        V4L2_CID_JPEG_RESTART_INTERVAL          
(V4L2_CID_JPEG_CLASS_BASE + 2)
-#define        V4L2_CID_JPEG_COMPRESSION_QUALITY       
(V4L2_CID_JPEG_CLASS_BASE + 3)
+#define V4L2_CID_JPEG_RESTART_INTERVAL         (V4L2_CID_JPEG_CLASS_BASE + 2)
+#define V4L2_CID_JPEG_COMPRESSION_QUALITY      (V4L2_CID_JPEG_CLASS_BASE + 3)
 
-#define        V4L2_CID_JPEG_ACTIVE_MARKER             
(V4L2_CID_JPEG_CLASS_BASE + 4)
-#define        V4L2_JPEG_ACTIVE_MARKER_APP0            (1 << 0)
-#define        V4L2_JPEG_ACTIVE_MARKER_APP1            (1 << 1)
-#define        V4L2_JPEG_ACTIVE_MARKER_COM             (1 << 16)
-#define        V4L2_JPEG_ACTIVE_MARKER_DQT             (1 << 17)
-#define        V4L2_JPEG_ACTIVE_MARKER_DHT             (1 << 18)
+#define V4L2_CID_JPEG_ACTIVE_MARKER            (V4L2_CID_JPEG_CLASS_BASE + 4)
+#define V4L2_JPEG_ACTIVE_MARKER_APP0           (1 << 0)
+#define V4L2_JPEG_ACTIVE_MARKER_APP1           (1 << 1)
+#define V4L2_JPEG_ACTIVE_MARKER_COM            (1 << 16)
+#define V4L2_JPEG_ACTIVE_MARKER_DQT            (1 << 17)
+#define V4L2_JPEG_ACTIVE_MARKER_DHT            (1 << 18)
 
 
 /* Image source controls */
@@ -1243,10 +1243,10 @@ enum v4l2_jpeg_chroma_subsampling {
 #define V4L2_CID_DV_CLASS_BASE                 (V4L2_CTRL_CLASS_DV | 0x900)
 #define V4L2_CID_DV_CLASS                      (V4L2_CTRL_CLASS_DV | 1)
 
-#define        V4L2_CID_DV_TX_HOTPLUG                  (V4L2_CID_DV_CLASS_BASE 
+ 1)
-#define        V4L2_CID_DV_TX_RXSENSE                  (V4L2_CID_DV_CLASS_BASE 
+ 2)
-#define        V4L2_CID_DV_TX_EDID_PRESENT             (V4L2_CID_DV_CLASS_BASE 
+ 3)
-#define        V4L2_CID_DV_TX_MODE                     (V4L2_CID_DV_CLASS_BASE 
+ 4)
+#define V4L2_CID_DV_TX_HOTPLUG                 (V4L2_CID_DV_CLASS_BASE + 1)
+#define V4L2_CID_DV_TX_RXSENSE                 (V4L2_CID_DV_CLASS_BASE + 2)
+#define V4L2_CID_DV_TX_EDID_PRESENT            (V4L2_CID_DV_CLASS_BASE + 3)
+#define V4L2_CID_DV_TX_MODE                    (V4L2_CID_DV_CLASS_BASE + 4)
 enum v4l2_dv_tx_mode {
        V4L2_DV_TX_MODE_DVI_D   = 0,
        V4L2_DV_TX_MODE_HDMI    = 1,
@@ -1267,7 +1267,7 @@ enum v4l2_dv_it_content_type {
        V4L2_DV_IT_CONTENT_TYPE_NO_ITC    = 4,
 };
 
-#define        V4L2_CID_DV_RX_POWER_PRESENT            (V4L2_CID_DV_CLASS_BASE 
+ 100)
+#define V4L2_CID_DV_RX_POWER_PRESENT           (V4L2_CID_DV_CLASS_BASE + 100)
 #define V4L2_CID_DV_RX_RGB_RANGE               (V4L2_CID_DV_CLASS_BASE + 101)
 #define V4L2_CID_DV_RX_IT_CONTENT_TYPE         (V4L2_CID_DV_CLASS_BASE + 102)
 
@@ -1537,15 +1537,6 @@ struct v4l2_ctrl_h264_pred_weights {
        struct v4l2_h264_weight_factors weight_factors[2];
 };
 
-#define V4L2_H264_SLICE_TYPE_P                         0
-#define V4L2_H264_SLICE_TYPE_B                         1
-#define V4L2_H264_SLICE_TYPE_I                         2
-#define V4L2_H264_SLICE_TYPE_SP                                3
-#define V4L2_H264_SLICE_TYPE_SI                                4
-
-#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED    0x01
-#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH             0x02
-
 #define V4L2_H264_TOP_FIELD_REF                                0x1
 #define V4L2_H264_BOTTOM_FIELD_REF                     0x2
 #define V4L2_H264_FRAME_REF                            0x3
@@ -1566,8 +1557,17 @@ struct v4l2_h264_reference {
  * Maximum DPB size, as specified by section 'A.3.1 Level limits
  * common to the Baseline, Main, and Extended profiles'.
  */
-#define V4L2_H264_NUM_DPB_ENTRIES 16
-#define V4L2_H264_REF_LIST_LEN (2 * V4L2_H264_NUM_DPB_ENTRIES)
+#define V4L2_H264_NUM_DPB_ENTRIES              16
+#define V4L2_H264_REF_LIST_LEN                 (2 * V4L2_H264_NUM_DPB_ENTRIES)
+
+#define V4L2_H264_SLICE_TYPE_P                         0
+#define V4L2_H264_SLICE_TYPE_B                         1
+#define V4L2_H264_SLICE_TYPE_I                         2
+#define V4L2_H264_SLICE_TYPE_SP                                3
+#define V4L2_H264_SLICE_TYPE_SI                                4
+
+#define V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED            0x01
+#define V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH                     0x02
 
 #define V4L2_CID_STATELESS_H264_SLICE_PARAMS   (V4L2_CID_CODEC_STATELESS_BASE 
+ 6)
 /**
@@ -1707,7 +1707,6 @@ struct v4l2_ctrl_h264_decode_params {
        __u32 flags;
 };
 
-
 /* Stateless FWHT control, used by the vicodec driver */
 
 /* Current FWHT version */
@@ -2549,44 +2548,10 @@ struct v4l2_ctrl_hevc_scaling_matrix {
        __u8    scaling_list_dc_coef_32x32[2];
 };
 
-#define V4L2_CID_COLORIMETRY_CLASS_BASE        (V4L2_CTRL_CLASS_COLORIMETRY | 
0x900)
-#define V4L2_CID_COLORIMETRY_CLASS     (V4L2_CTRL_CLASS_COLORIMETRY | 1)
-
-#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO    
(V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
-
-struct v4l2_ctrl_hdr10_cll_info {
-       __u16 max_content_light_level;
-       __u16 max_pic_average_light_level;
-};
-
-#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY   
(V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
-
-#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW   5
-#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH  37000
-#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW   5
-#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH  42000
-#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
-#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH        37000
-#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
-#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH        42000
-#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW      50000
-#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH     100000000
-#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW      1
-#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH     50000
-
-struct v4l2_ctrl_hdr10_mastering_display {
-       __u16 display_primaries_x[3];
-       __u16 display_primaries_y[3];
-       __u16 white_point_x;
-       __u16 white_point_y;
-       __u32 max_display_mastering_luminance;
-       __u32 min_display_mastering_luminance;
-};
-
 /* Stateless VP9 controls */
 
 #define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED        0x1
-#define        V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE  0x2
+#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE 0x2
 
 /**
  * struct v4l2_vp9_loop_filter - VP9 loop filter parameters
@@ -3513,4 +3478,38 @@ struct v4l2_ctrl_av1_film_grain {
 #define V4L2_CID_MPEG_CX2341X_BASE      V4L2_CID_CODEC_CX2341X_BASE
 #define V4L2_CID_MPEG_MFC51_BASE        V4L2_CID_CODEC_MFC51_BASE
 
+#define V4L2_CID_COLORIMETRY_CLASS_BASE        (V4L2_CTRL_CLASS_COLORIMETRY | 
0x900)
+#define V4L2_CID_COLORIMETRY_CLASS     (V4L2_CTRL_CLASS_COLORIMETRY | 1)
+
+#define V4L2_CID_COLORIMETRY_HDR10_CLL_INFO    
(V4L2_CID_COLORIMETRY_CLASS_BASE + 0)
+
+struct v4l2_ctrl_hdr10_cll_info {
+       __u16 max_content_light_level;
+       __u16 max_pic_average_light_level;
+};
+
+#define V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY   
(V4L2_CID_COLORIMETRY_CLASS_BASE + 1)
+
+#define V4L2_HDR10_MASTERING_PRIMARIES_X_LOW   5
+#define V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH  37000
+#define V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW   5
+#define V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH  42000
+#define V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW 5
+#define V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH        37000
+#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW 5
+#define V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH        42000
+#define V4L2_HDR10_MASTERING_MAX_LUMA_LOW      50000
+#define V4L2_HDR10_MASTERING_MAX_LUMA_HIGH     100000000
+#define V4L2_HDR10_MASTERING_MIN_LUMA_LOW      1
+#define V4L2_HDR10_MASTERING_MIN_LUMA_HIGH     50000
+
+struct v4l2_ctrl_hdr10_mastering_display {
+       __u16 display_primaries_x[3];
+       __u16 display_primaries_y[3];
+       __u16 white_point_x;
+       __u16 white_point_y;
+       __u32 max_display_mastering_luminance;
+       __u32 min_display_mastering_luminance;
+};
+
 #endif
diff --git a/include/linux/v4l2-dv-timings.h b/include/linux/v4l2-dv-timings.h
index 44a16e0e5a12..58f478f98a35 100644
--- a/include/linux/v4l2-dv-timings.h
+++ b/include/linux/v4l2-dv-timings.h
@@ -2,7 +2,7 @@
 /*
  * V4L2 DV timings header.
  *
- * Copyright (C) 2012-2016  Hans Verkuil <[email protected]>
+ * Copyright (C) 2012-2016  Hans Verkuil <[email protected]>
  */
 
 #ifndef _V4L2_DV_TIMINGS_H
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 08c5ed63626f..a1f30e038291 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1542,8 +1542,8 @@ struct v4l2_bt_timings {
 } __attribute__ ((packed));
 
 /* Interlaced or progressive format */
-#define        V4L2_DV_PROGRESSIVE     0
-#define        V4L2_DV_INTERLACED      1
+#define V4L2_DV_PROGRESSIVE    0
+#define V4L2_DV_INTERLACED     1
 
 /* Polarities. If bit is not set, it is assumed to be negative polarity */
 #define V4L2_DV_VSYNC_POS_POL  0x00000001
@@ -2715,15 +2715,15 @@ struct v4l2_remove_buffers {
  * Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
  * You must be root to use these ioctls. Never use these in applications!
  */
-#define        VIDIOC_DBG_S_REGISTER    _IOW('V', 79, struct v4l2_dbg_register)
-#define        VIDIOC_DBG_G_REGISTER   _IOWR('V', 80, struct v4l2_dbg_register)
+#define VIDIOC_DBG_S_REGISTER   _IOW('V', 79, struct v4l2_dbg_register)
+#define VIDIOC_DBG_G_REGISTER  _IOWR('V', 80, struct v4l2_dbg_register)
 
 #define VIDIOC_S_HW_FREQ_SEEK   _IOW('V', 82, struct v4l2_hw_freq_seek)
-#define        VIDIOC_S_DV_TIMINGS     _IOWR('V', 87, struct v4l2_dv_timings)
-#define        VIDIOC_G_DV_TIMINGS     _IOWR('V', 88, struct v4l2_dv_timings)
-#define        VIDIOC_DQEVENT           _IOR('V', 89, struct v4l2_event)
-#define        VIDIOC_SUBSCRIBE_EVENT   _IOW('V', 90, struct 
v4l2_event_subscription)
-#define        VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct 
v4l2_event_subscription)
+#define VIDIOC_S_DV_TIMINGS    _IOWR('V', 87, struct v4l2_dv_timings)
+#define VIDIOC_G_DV_TIMINGS    _IOWR('V', 88, struct v4l2_dv_timings)
+#define VIDIOC_DQEVENT          _IOR('V', 89, struct v4l2_event)
+#define VIDIOC_SUBSCRIBE_EVENT  _IOW('V', 90, struct v4l2_event_subscription)
+#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
 #define VIDIOC_CREATE_BUFS     _IOWR('V', 92, struct v4l2_create_buffers)
 #define VIDIOC_PREPARE_BUF     _IOWR('V', 93, struct v4l2_buffer)
 #define VIDIOC_G_SELECTION     _IOWR('V', 94, struct v4l2_selection)
diff --git a/utils/v4l2-tracer/retrace-gen.cpp 
b/utils/v4l2-tracer/retrace-gen.cpp
index 8554dbb74d58..181a16742ede 100644
--- a/utils/v4l2-tracer/retrace-gen.cpp
+++ b/utils/v4l2-tracer/retrace-gen.cpp
@@ -1606,68 +1606,6 @@ struct v4l2_ctrl_hevc_scaling_matrix 
*retrace_v4l2_ctrl_hevc_scaling_matrix_gen(
        return p;
 }
 
-struct v4l2_ctrl_hdr10_cll_info 
*retrace_v4l2_ctrl_hdr10_cll_info_gen(json_object *ctrl_obj)
-{
-       struct v4l2_ctrl_hdr10_cll_info *p = (struct v4l2_ctrl_hdr10_cll_info 
*) calloc(1, sizeof(v4l2_ctrl_hdr10_cll_info));
-       json_object *v4l2_ctrl_hdr10_cll_info_obj;
-       if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hdr10_cll_info", 
&v4l2_ctrl_hdr10_cll_info_obj))
-               v4l2_ctrl_hdr10_cll_info_obj = ctrl_obj;
-
-       json_object *max_content_light_level_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_cll_info_obj, 
"max_content_light_level", &max_content_light_level_obj))
-               p->max_content_light_level = (__u16) 
json_object_get_int(max_content_light_level_obj);
-
-       json_object *max_pic_average_light_level_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_cll_info_obj, 
"max_pic_average_light_level", &max_pic_average_light_level_obj))
-               p->max_pic_average_light_level = (__u16) 
json_object_get_int(max_pic_average_light_level_obj);
-
-       return p;
-}
-
-struct v4l2_ctrl_hdr10_mastering_display 
*retrace_v4l2_ctrl_hdr10_mastering_display_gen(json_object *ctrl_obj)
-{
-       struct v4l2_ctrl_hdr10_mastering_display *p = (struct 
v4l2_ctrl_hdr10_mastering_display *) calloc(1, 
sizeof(v4l2_ctrl_hdr10_mastering_display));
-       json_object *v4l2_ctrl_hdr10_mastering_display_obj;
-       if (!json_object_object_get_ex(ctrl_obj, 
"v4l2_ctrl_hdr10_mastering_display", &v4l2_ctrl_hdr10_mastering_display_obj))
-               v4l2_ctrl_hdr10_mastering_display_obj = ctrl_obj;
-
-       /* __u16 display_primaries_x[3] */
-       json_object *display_primaries_x_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_x", &display_primaries_x_obj)) {
-               for (size_t i = 0; i < 3; i++) {
-                       if (json_object_array_get_idx(display_primaries_x_obj, 
i))
-                               p->display_primaries_x[i] = (__u16) 
json_object_get_int(json_object_array_get_idx(display_primaries_x_obj, i));
-               }
-       }
-
-       /* __u16 display_primaries_y[3] */
-       json_object *display_primaries_y_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_y", &display_primaries_y_obj)) {
-               for (size_t i = 0; i < 3; i++) {
-                       if (json_object_array_get_idx(display_primaries_y_obj, 
i))
-                               p->display_primaries_y[i] = (__u16) 
json_object_get_int(json_object_array_get_idx(display_primaries_y_obj, i));
-               }
-       }
-
-       json_object *white_point_x_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_x", &white_point_x_obj))
-               p->white_point_x = (__u16) 
json_object_get_int(white_point_x_obj);
-
-       json_object *white_point_y_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_y", &white_point_y_obj))
-               p->white_point_y = (__u16) 
json_object_get_int(white_point_y_obj);
-
-       json_object *max_display_mastering_luminance_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"max_display_mastering_luminance", &max_display_mastering_luminance_obj))
-               p->max_display_mastering_luminance = (__u32) 
json_object_get_int64(max_display_mastering_luminance_obj);
-
-       json_object *min_display_mastering_luminance_obj;
-       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"min_display_mastering_luminance", &min_display_mastering_luminance_obj))
-               p->min_display_mastering_luminance = (__u32) 
json_object_get_int64(min_display_mastering_luminance_obj);
-
-       return p;
-}
-
 struct v4l2_vp9_loop_filter *retrace_v4l2_vp9_loop_filter_gen(json_object 
*ctrl_obj)
 {
        struct v4l2_vp9_loop_filter *p = (struct v4l2_vp9_loop_filter *) 
calloc(1, sizeof(v4l2_vp9_loop_filter));
@@ -2916,6 +2854,68 @@ struct v4l2_ctrl_av1_film_grain 
*retrace_v4l2_ctrl_av1_film_grain_gen(json_objec
        return p;
 }
 
+struct v4l2_ctrl_hdr10_cll_info 
*retrace_v4l2_ctrl_hdr10_cll_info_gen(json_object *ctrl_obj)
+{
+       struct v4l2_ctrl_hdr10_cll_info *p = (struct v4l2_ctrl_hdr10_cll_info 
*) calloc(1, sizeof(v4l2_ctrl_hdr10_cll_info));
+       json_object *v4l2_ctrl_hdr10_cll_info_obj;
+       if (!json_object_object_get_ex(ctrl_obj, "v4l2_ctrl_hdr10_cll_info", 
&v4l2_ctrl_hdr10_cll_info_obj))
+               v4l2_ctrl_hdr10_cll_info_obj = ctrl_obj;
+
+       json_object *max_content_light_level_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_cll_info_obj, 
"max_content_light_level", &max_content_light_level_obj))
+               p->max_content_light_level = (__u16) 
json_object_get_int(max_content_light_level_obj);
+
+       json_object *max_pic_average_light_level_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_cll_info_obj, 
"max_pic_average_light_level", &max_pic_average_light_level_obj))
+               p->max_pic_average_light_level = (__u16) 
json_object_get_int(max_pic_average_light_level_obj);
+
+       return p;
+}
+
+struct v4l2_ctrl_hdr10_mastering_display 
*retrace_v4l2_ctrl_hdr10_mastering_display_gen(json_object *ctrl_obj)
+{
+       struct v4l2_ctrl_hdr10_mastering_display *p = (struct 
v4l2_ctrl_hdr10_mastering_display *) calloc(1, 
sizeof(v4l2_ctrl_hdr10_mastering_display));
+       json_object *v4l2_ctrl_hdr10_mastering_display_obj;
+       if (!json_object_object_get_ex(ctrl_obj, 
"v4l2_ctrl_hdr10_mastering_display", &v4l2_ctrl_hdr10_mastering_display_obj))
+               v4l2_ctrl_hdr10_mastering_display_obj = ctrl_obj;
+
+       /* __u16 display_primaries_x[3] */
+       json_object *display_primaries_x_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_x", &display_primaries_x_obj)) {
+               for (size_t i = 0; i < 3; i++) {
+                       if (json_object_array_get_idx(display_primaries_x_obj, 
i))
+                               p->display_primaries_x[i] = (__u16) 
json_object_get_int(json_object_array_get_idx(display_primaries_x_obj, i));
+               }
+       }
+
+       /* __u16 display_primaries_y[3] */
+       json_object *display_primaries_y_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_y", &display_primaries_y_obj)) {
+               for (size_t i = 0; i < 3; i++) {
+                       if (json_object_array_get_idx(display_primaries_y_obj, 
i))
+                               p->display_primaries_y[i] = (__u16) 
json_object_get_int(json_object_array_get_idx(display_primaries_y_obj, i));
+               }
+       }
+
+       json_object *white_point_x_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_x", &white_point_x_obj))
+               p->white_point_x = (__u16) 
json_object_get_int(white_point_x_obj);
+
+       json_object *white_point_y_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_y", &white_point_y_obj))
+               p->white_point_y = (__u16) 
json_object_get_int(white_point_y_obj);
+
+       json_object *max_display_mastering_luminance_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"max_display_mastering_luminance", &max_display_mastering_luminance_obj))
+               p->max_display_mastering_luminance = (__u32) 
json_object_get_int64(max_display_mastering_luminance_obj);
+
+       json_object *min_display_mastering_luminance_obj;
+       if (json_object_object_get_ex(v4l2_ctrl_hdr10_mastering_display_obj, 
"min_display_mastering_luminance", &min_display_mastering_luminance_obj))
+               p->min_display_mastering_luminance = (__u32) 
json_object_get_int64(min_display_mastering_luminance_obj);
+
+       return p;
+}
+
 struct v4l2_rect *retrace_v4l2_rect_gen(json_object *parent_obj, std::string 
key_name = "")
 {
        struct v4l2_rect *p = (struct v4l2_rect *) calloc(1, sizeof(v4l2_rect));
diff --git a/utils/v4l2-tracer/retrace-gen.h b/utils/v4l2-tracer/retrace-gen.h
index 618651c929c7..3f5501546f11 100644
--- a/utils/v4l2-tracer/retrace-gen.h
+++ b/utils/v4l2-tracer/retrace-gen.h
@@ -34,8 +34,6 @@ struct v4l2_hevc_pred_weight_table 
*retrace_v4l2_hevc_pred_weight_table_gen(json
 struct v4l2_ctrl_hevc_slice_params 
*retrace_v4l2_ctrl_hevc_slice_params_gen(json_object *ctrl_obj);
 struct v4l2_ctrl_hevc_decode_params 
*retrace_v4l2_ctrl_hevc_decode_params_gen(json_object *ctrl_obj);
 struct v4l2_ctrl_hevc_scaling_matrix 
*retrace_v4l2_ctrl_hevc_scaling_matrix_gen(json_object *ctrl_obj);
-struct v4l2_ctrl_hdr10_cll_info 
*retrace_v4l2_ctrl_hdr10_cll_info_gen(json_object *ctrl_obj);
-struct v4l2_ctrl_hdr10_mastering_display 
*retrace_v4l2_ctrl_hdr10_mastering_display_gen(json_object *ctrl_obj);
 struct v4l2_vp9_loop_filter *retrace_v4l2_vp9_loop_filter_gen(json_object 
*ctrl_obj);
 struct v4l2_vp9_quantization *retrace_v4l2_vp9_quantization_gen(json_object 
*ctrl_obj);
 struct v4l2_vp9_segmentation *retrace_v4l2_vp9_segmentation_gen(json_object 
*ctrl_obj);
@@ -53,6 +51,8 @@ struct v4l2_av1_quantization 
*retrace_v4l2_av1_quantization_gen(json_object *ctr
 struct v4l2_av1_tile_info *retrace_v4l2_av1_tile_info_gen(json_object 
*ctrl_obj);
 struct v4l2_ctrl_av1_frame *retrace_v4l2_ctrl_av1_frame_gen(json_object 
*ctrl_obj);
 struct v4l2_ctrl_av1_film_grain 
*retrace_v4l2_ctrl_av1_film_grain_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hdr10_cll_info 
*retrace_v4l2_ctrl_hdr10_cll_info_gen(json_object *ctrl_obj);
+struct v4l2_ctrl_hdr10_mastering_display 
*retrace_v4l2_ctrl_hdr10_mastering_display_gen(json_object *ctrl_obj);
 struct v4l2_rect *retrace_v4l2_rect_gen(json_object *parent_obj, std::string 
key_name = "");
 struct v4l2_fract *retrace_v4l2_fract_gen(json_object *parent_obj, std::string 
key_name = "");
 struct v4l2_area *retrace_v4l2_area_gen(json_object *parent_obj, std::string 
key_name = "");
diff --git a/utils/v4l2-tracer/trace-gen.cpp b/utils/v4l2-tracer/trace-gen.cpp
index cf7c840e9006..11fe8c305817 100644
--- a/utils/v4l2-tracer/trace-gen.cpp
+++ b/utils/v4l2-tracer/trace-gen.cpp
@@ -797,40 +797,6 @@ void trace_v4l2_ctrl_hevc_scaling_matrix_gen(void *ptr, 
json_object *parent_obj)
        json_object_object_add(parent_obj, "v4l2_ctrl_hevc_scaling_matrix", 
v4l2_ctrl_hevc_scaling_matrix_obj);
 }
 
-void trace_v4l2_ctrl_hdr10_cll_info_gen(void *ptr, json_object *parent_obj)
-{
-       json_object *v4l2_ctrl_hdr10_cll_info_obj = json_object_new_object();
-       struct v4l2_ctrl_hdr10_cll_info *p = static_cast<struct 
v4l2_ctrl_hdr10_cll_info*>(ptr);
-       json_object_object_add(v4l2_ctrl_hdr10_cll_info_obj, 
"max_content_light_level", json_object_new_int(p->max_content_light_level));
-       json_object_object_add(v4l2_ctrl_hdr10_cll_info_obj, 
"max_pic_average_light_level", 
json_object_new_int(p->max_pic_average_light_level));
-       json_object_object_add(parent_obj, "v4l2_ctrl_hdr10_cll_info", 
v4l2_ctrl_hdr10_cll_info_obj);
-}
-
-void trace_v4l2_ctrl_hdr10_mastering_display_gen(void *ptr, json_object 
*parent_obj)
-{
-       json_object *v4l2_ctrl_hdr10_mastering_display_obj = 
json_object_new_object();
-       struct v4l2_ctrl_hdr10_mastering_display *p = static_cast<struct 
v4l2_ctrl_hdr10_mastering_display*>(ptr);
-       /* __u16 display_primaries_x[3] */
-       json_object *display_primaries_x_obj = json_object_new_array();
-       for (size_t i = 0; i < 3; i++) {
-               json_object_array_add(display_primaries_x_obj, 
json_object_new_int(p->display_primaries_x[i]));
-       }
-       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_x", display_primaries_x_obj);
-
-       /* __u16 display_primaries_y[3] */
-       json_object *display_primaries_y_obj = json_object_new_array();
-       for (size_t i = 0; i < 3; i++) {
-               json_object_array_add(display_primaries_y_obj, 
json_object_new_int(p->display_primaries_y[i]));
-       }
-       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_y", display_primaries_y_obj);
-
-       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_x", json_object_new_int(p->white_point_x));
-       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_y", json_object_new_int(p->white_point_y));
-       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"max_display_mastering_luminance", 
json_object_new_int64(p->max_display_mastering_luminance));
-       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"min_display_mastering_luminance", 
json_object_new_int64(p->min_display_mastering_luminance));
-       json_object_object_add(parent_obj, "v4l2_ctrl_hdr10_mastering_display", 
v4l2_ctrl_hdr10_mastering_display_obj);
-}
-
 void trace_v4l2_vp9_loop_filter_gen(void *ptr, json_object *parent_obj)
 {
        json_object *v4l2_vp9_loop_filter_obj = json_object_new_object();
@@ -1538,6 +1504,40 @@ void trace_v4l2_ctrl_av1_film_grain_gen(void *ptr, 
json_object *parent_obj)
        json_object_object_add(parent_obj, "v4l2_ctrl_av1_film_grain", 
v4l2_ctrl_av1_film_grain_obj);
 }
 
+void trace_v4l2_ctrl_hdr10_cll_info_gen(void *ptr, json_object *parent_obj)
+{
+       json_object *v4l2_ctrl_hdr10_cll_info_obj = json_object_new_object();
+       struct v4l2_ctrl_hdr10_cll_info *p = static_cast<struct 
v4l2_ctrl_hdr10_cll_info*>(ptr);
+       json_object_object_add(v4l2_ctrl_hdr10_cll_info_obj, 
"max_content_light_level", json_object_new_int(p->max_content_light_level));
+       json_object_object_add(v4l2_ctrl_hdr10_cll_info_obj, 
"max_pic_average_light_level", 
json_object_new_int(p->max_pic_average_light_level));
+       json_object_object_add(parent_obj, "v4l2_ctrl_hdr10_cll_info", 
v4l2_ctrl_hdr10_cll_info_obj);
+}
+
+void trace_v4l2_ctrl_hdr10_mastering_display_gen(void *ptr, json_object 
*parent_obj)
+{
+       json_object *v4l2_ctrl_hdr10_mastering_display_obj = 
json_object_new_object();
+       struct v4l2_ctrl_hdr10_mastering_display *p = static_cast<struct 
v4l2_ctrl_hdr10_mastering_display*>(ptr);
+       /* __u16 display_primaries_x[3] */
+       json_object *display_primaries_x_obj = json_object_new_array();
+       for (size_t i = 0; i < 3; i++) {
+               json_object_array_add(display_primaries_x_obj, 
json_object_new_int(p->display_primaries_x[i]));
+       }
+       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_x", display_primaries_x_obj);
+
+       /* __u16 display_primaries_y[3] */
+       json_object *display_primaries_y_obj = json_object_new_array();
+       for (size_t i = 0; i < 3; i++) {
+               json_object_array_add(display_primaries_y_obj, 
json_object_new_int(p->display_primaries_y[i]));
+       }
+       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"display_primaries_y", display_primaries_y_obj);
+
+       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_x", json_object_new_int(p->white_point_x));
+       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"white_point_y", json_object_new_int(p->white_point_y));
+       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"max_display_mastering_luminance", 
json_object_new_int64(p->max_display_mastering_luminance));
+       json_object_object_add(v4l2_ctrl_hdr10_mastering_display_obj, 
"min_display_mastering_luminance", 
json_object_new_int64(p->min_display_mastering_luminance));
+       json_object_object_add(parent_obj, "v4l2_ctrl_hdr10_mastering_display", 
v4l2_ctrl_hdr10_mastering_display_obj);
+}
+
 void trace_v4l2_rect_gen(void *arg, json_object *parent_obj, std::string 
key_name = "")
 {
        json_object *v4l2_rect_obj = json_object_new_object();
diff --git a/utils/v4l2-tracer/trace-gen.h b/utils/v4l2-tracer/trace-gen.h
index c6b3a1859461..2b7d308a1f3f 100644
--- a/utils/v4l2-tracer/trace-gen.h
+++ b/utils/v4l2-tracer/trace-gen.h
@@ -34,8 +34,6 @@ void trace_v4l2_hevc_pred_weight_table_gen(void *ptr, 
json_object *parent_obj);
 void trace_v4l2_ctrl_hevc_slice_params_gen(void *ptr, json_object *parent_obj);
 void trace_v4l2_ctrl_hevc_decode_params_gen(void *ptr, json_object 
*parent_obj);
 void trace_v4l2_ctrl_hevc_scaling_matrix_gen(void *ptr, json_object 
*parent_obj);
-void trace_v4l2_ctrl_hdr10_cll_info_gen(void *ptr, json_object *parent_obj);
-void trace_v4l2_ctrl_hdr10_mastering_display_gen(void *ptr, json_object 
*parent_obj);
 void trace_v4l2_vp9_loop_filter_gen(void *ptr, json_object *parent_obj);
 void trace_v4l2_vp9_quantization_gen(void *ptr, json_object *parent_obj);
 void trace_v4l2_vp9_segmentation_gen(void *ptr, json_object *parent_obj);
@@ -53,6 +51,8 @@ void trace_v4l2_av1_quantization_gen(void *ptr, json_object 
*parent_obj);
 void trace_v4l2_av1_tile_info_gen(void *ptr, json_object *parent_obj);
 void trace_v4l2_ctrl_av1_frame_gen(void *ptr, json_object *parent_obj);
 void trace_v4l2_ctrl_av1_film_grain_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hdr10_cll_info_gen(void *ptr, json_object *parent_obj);
+void trace_v4l2_ctrl_hdr10_mastering_display_gen(void *ptr, json_object 
*parent_obj);
 void trace_v4l2_rect_gen(void *arg, json_object *parent_obj, std::string 
key_name = "");
 void trace_v4l2_fract_gen(void *arg, json_object *parent_obj, std::string 
key_name = "");
 void trace_v4l2_area_gen(void *arg, json_object *parent_obj, std::string 
key_name = "");
diff --git a/utils/v4l2-tracer/v4l2-tracer-info-gen.h 
b/utils/v4l2-tracer/v4l2-tracer-info-gen.h
index f9b5d48c6239..b54ee579166c 100644
--- a/utils/v4l2-tracer/v4l2-tracer-info-gen.h
+++ b/utils/v4l2-tracer/v4l2-tracer-info-gen.h
@@ -2323,9 +2323,6 @@ constexpr val_def control_val_def[] = {
        { V4L2_CID_STATELESS_HEVC_DECODE_MODE,  
"V4L2_CID_STATELESS_HEVC_DECODE_MODE" },
        { V4L2_CID_STATELESS_HEVC_START_CODE,   
"V4L2_CID_STATELESS_HEVC_START_CODE" },
        { V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS,  
"V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS" },
-       { V4L2_CID_COLORIMETRY_CLASS,   "V4L2_CID_COLORIMETRY_CLASS" },
-       { V4L2_CID_COLORIMETRY_HDR10_CLL_INFO,  
"V4L2_CID_COLORIMETRY_HDR10_CLL_INFO" },
-       { V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY, 
"V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY" },
        { V4L2_CID_STATELESS_VP9_FRAME, "V4L2_CID_STATELESS_VP9_FRAME" },
        { V4L2_CID_STATELESS_VP9_COMPRESSED_HDR,        
"V4L2_CID_STATELESS_VP9_COMPRESSED_HDR" },
        { V4L2_CID_STATELESS_AV1_SEQUENCE,      
"V4L2_CID_STATELESS_AV1_SEQUENCE" },
@@ -2333,6 +2330,9 @@ constexpr val_def control_val_def[] = {
        { V4L2_CID_STATELESS_AV1_FRAME, "V4L2_CID_STATELESS_AV1_FRAME" },
        { V4L2_CID_STATELESS_AV1_FILM_GRAIN,    
"V4L2_CID_STATELESS_AV1_FILM_GRAIN" },
        { V4L2_CID_MPEG_CLASS,  "V4L2_CID_MPEG_CLASS" },
+       { V4L2_CID_COLORIMETRY_CLASS,   "V4L2_CID_COLORIMETRY_CLASS" },
+       { V4L2_CID_COLORIMETRY_HDR10_CLL_INFO,  
"V4L2_CID_COLORIMETRY_HDR10_CLL_INFO" },
+       { V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY, 
"V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY" },
        { V4L2_CID_MAX_CTRLS,   "V4L2_CID_MAX_CTRLS" },
        { -1, "" }
 };

Reply via email to