diff mbox series

[v3,2/4] media: videodev2.h: add pixel format modifiers

Message ID 20221101100448.66712-3-randy.li@synaptics.com (mailing list archive)
State New, archived
Headers show
Series Add pixel formats used in Synatpics SoC | expand

Commit Message

Hsia-Jun Li Nov. 1, 2022, 10:04 a.m. UTC
From: "Hsia-Jun(Randy) Li" <randy.li@synaptics.com>

Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com>
---
 include/uapi/linux/videodev2.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

kernel test robot Nov. 1, 2022, 5:10 p.m. UTC | #1
Hi Hsia-Jun,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on media-tree/master]
[also build test ERROR on drm-misc/drm-misc-next drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-tip/drm-tip linus/master v6.1-rc3 next-20221101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hsia-Jun-Li/Add-pixel-formats-used-in-Synatpics-SoC/20221101-180905
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20221101100448.66712-3-randy.li%40synaptics.com
patch subject: [PATCH v3 2/4] media: videodev2.h: add pixel format modifiers
config: arm-randconfig-r002-20221101
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/58e89ab4bf39c7b8b8733c2e5129c0ceb19cd270
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hsia-Jun-Li/Add-pixel-formats-used-in-Synatpics-SoC/20221101-180905
        git checkout 58e89ab4bf39c7b8b8733c2e5129c0ceb19cd270
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/imx/ drivers/gpu/ipu-v3/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from drivers/gpu/ipu-v3/ipu-common.c:26:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:828:9: warning: 'fourcc_mod_is_vendor' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   include/uapi/drm/drm_fourcc.h:419:9: note: previous definition is here
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   In file included from drivers/gpu/ipu-v3/ipu-common.c:26:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:831:9: warning: 'fourcc_mod_code' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_code(vendor, val) \
           ^
   include/uapi/drm/drm_fourcc.h:422:9: note: previous definition is here
   #define fourcc_mod_code(vendor, val) \
           ^
   2 warnings generated.
--
   In file included from drivers/gpu/ipu-v3/ipu-pre.c:13:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:828:9: warning: 'fourcc_mod_is_vendor' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   include/uapi/drm/drm_fourcc.h:419:9: note: previous definition is here
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   In file included from drivers/gpu/ipu-v3/ipu-pre.c:13:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:831:9: warning: 'fourcc_mod_code' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_code(vendor, val) \
           ^
   include/uapi/drm/drm_fourcc.h:422:9: note: previous definition is here
   #define fourcc_mod_code(vendor, val) \
           ^
>> drivers/gpu/ipu-v3/ipu-pre.c:174:18: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           if (modifier == DRM_FORMAT_MOD_LINEAR)
                           ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:125:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   drivers/gpu/ipu-v3/ipu-pre.c:213:18: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           if (modifier != DRM_FORMAT_MOD_LINEAR) {
                           ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:126:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
>> drivers/gpu/ipu-v3/ipu-pre.c:216:19: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE'
                   if (modifier == DRM_FORMAT_MOD_VIVANTE_SUPER_TILED)
                                   ^
   include/uapi/drm/drm_fourcc.h:728:44: note: expanded from macro 'DRM_FORMAT_MOD_VIVANTE_SUPER_TILED'
   #define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED      fourcc_mod_code(VIVANTE, 2)
                                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:127:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_VIVANTE
   ^
   drivers/gpu/ipu-v3/ipu-pre.c:226:18: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           if (modifier == DRM_FORMAT_MOD_LINEAR)
                           ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:128:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   2 warnings and 4 errors generated.
--
   In file included from drivers/gpu/ipu-v3/ipu-prg.c:17:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:828:9: warning: 'fourcc_mod_is_vendor' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   include/uapi/drm/drm_fourcc.h:419:9: note: previous definition is here
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   In file included from drivers/gpu/ipu-v3/ipu-prg.c:17:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:831:9: warning: 'fourcc_mod_code' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_code(vendor, val) \
           ^
   include/uapi/drm/drm_fourcc.h:422:9: note: previous definition is here
   #define fourcc_mod_code(vendor, val) \
           ^
>> drivers/gpu/ipu-v3/ipu-prg.c:133:7: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           case DRM_FORMAT_MOD_LINEAR:
                ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:125:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
>> drivers/gpu/ipu-v3/ipu-prg.c:134:7: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE'
           case DRM_FORMAT_MOD_VIVANTE_TILED:
                ^
   include/uapi/drm/drm_fourcc.h:716:39: note: expanded from macro 'DRM_FORMAT_MOD_VIVANTE_TILED'
   #define DRM_FORMAT_MOD_VIVANTE_TILED            fourcc_mod_code(VIVANTE, 1)
                                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:126:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_VIVANTE
   ^
   drivers/gpu/ipu-v3/ipu-prg.c:135:7: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE'
           case DRM_FORMAT_MOD_VIVANTE_SUPER_TILED:
                ^
   include/uapi/drm/drm_fourcc.h:728:44: note: expanded from macro 'DRM_FORMAT_MOD_VIVANTE_SUPER_TILED'
   #define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED      fourcc_mod_code(VIVANTE, 2)
                                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:127:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_VIVANTE
   ^
   2 warnings and 3 errors generated.
--
   In file included from drivers/gpu/drm/imx/ipuv3-plane.c:18:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:828:9: warning: 'fourcc_mod_is_vendor' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   include/uapi/drm/drm_fourcc.h:419:9: note: previous definition is here
   #define fourcc_mod_is_vendor(modifier, vendor) \
           ^
   In file included from drivers/gpu/drm/imx/ipuv3-plane.c:18:
   In file included from include/video/imx-ipu-v3.h:16:
   In file included from include/linux/videodev2.h:61:
>> include/uapi/linux/videodev2.h:831:9: warning: 'fourcc_mod_code' macro redefined [-Wmacro-redefined]
   #define fourcc_mod_code(vendor, val) \
           ^
   include/uapi/drm/drm_fourcc.h:422:9: note: previous definition is here
   #define fourcc_mod_code(vendor, val) \
           ^
>> drivers/gpu/drm/imx/ipuv3-plane.c:107:2: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           DRM_FORMAT_MOD_LINEAR,
           ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:89:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:108:2: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           DRM_FORMAT_MOD_INVALID
           ^
   include/uapi/drm/drm_fourcc.h:465:32: note: expanded from macro 'DRM_FORMAT_MOD_INVALID'
   #define DRM_FORMAT_MOD_INVALID  fourcc_mod_code(NONE, DRM_FORMAT_RESERVED)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:90:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:112:2: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           DRM_FORMAT_MOD_LINEAR,
           ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:91:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
>> drivers/gpu/drm/imx/ipuv3-plane.c:113:2: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE'
           DRM_FORMAT_MOD_VIVANTE_TILED,
           ^
   include/uapi/drm/drm_fourcc.h:716:39: note: expanded from macro 'DRM_FORMAT_MOD_VIVANTE_TILED'
   #define DRM_FORMAT_MOD_VIVANTE_TILED            fourcc_mod_code(VIVANTE, 1)
                                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:92:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_VIVANTE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:114:2: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE'
           DRM_FORMAT_MOD_VIVANTE_SUPER_TILED,
           ^
   include/uapi/drm/drm_fourcc.h:728:44: note: expanded from macro 'DRM_FORMAT_MOD_VIVANTE_SUPER_TILED'
   #define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED      fourcc_mod_code(VIVANTE, 2)
                                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:93:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_VIVANTE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:115:2: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           DRM_FORMAT_MOD_INVALID
           ^
   include/uapi/drm/drm_fourcc.h:465:32: note: expanded from macro 'DRM_FORMAT_MOD_INVALID'
   #define DRM_FORMAT_MOD_INVALID  fourcc_mod_code(NONE, DRM_FORMAT_RESERVED)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:94:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:346:18: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
           if (modifier == DRM_FORMAT_MOD_LINEAR)
                           ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:114:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:834:36: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
                       plane_state->fb->modifier == DRM_FORMAT_MOD_LINEAR)
                                                    ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:151:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:859:36: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
                       plane_state->fb->modifier != DRM_FORMAT_MOD_LINEAR)
                                                    ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:152:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   drivers/gpu/drm/imx/ipuv3-plane.c:863:31: error: use of undeclared identifier 'V4L2_PIX_FMT_MOD_VENDOR_NONE'
                   plane_state->fb->modifier = DRM_FORMAT_MOD_LINEAR;
                                               ^
   include/uapi/drm/drm_fourcc.h:475:31: note: expanded from macro 'DRM_FORMAT_MOD_LINEAR'
   #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
                                   ^
   include/uapi/linux/videodev2.h:832:12: note: expanded from macro 'fourcc_mod_code'
           ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
                     ^
   <scratch space>:153:1: note: expanded from here
   V4L2_PIX_FMT_MOD_VENDOR_NONE
   ^
   2 warnings and 10 errors generated.


vim +/fourcc_mod_is_vendor +828 include/uapi/linux/videodev2.h

   824	
   825	#define fourcc_mod_get_vendor(modifier) \
   826		(((modifier) >> 56) & 0xff)
   827	
 > 828	#define fourcc_mod_is_vendor(modifier, vendor) \
   829		(fourcc_mod_get_vendor(modifier) == V4L2_PIX_FMT_MOD_VENDOR_## vendor)
   830	
 > 831	#define fourcc_mod_code(vendor, val) \
   832		((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
   833
kernel test robot Nov. 1, 2022, 7:01 p.m. UTC | #2
Hi Hsia-Jun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on drm-misc/drm-misc-next drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-tip/drm-tip linus/master v6.1-rc3 next-20221101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hsia-Jun-Li/Add-pixel-formats-used-in-Synatpics-SoC/20221101-180905
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20221101100448.66712-3-randy.li%40synaptics.com
patch subject: [PATCH v3 2/4] media: videodev2.h: add pixel format modifiers
config: parisc-randconfig-r022-20221101
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/58e89ab4bf39c7b8b8733c2e5129c0ceb19cd270
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hsia-Jun-Li/Add-pixel-formats-used-in-Synatpics-SoC/20221101-180905
        git checkout 58e89ab4bf39c7b8b8733c2e5129c0ceb19cd270
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/gpu/drm/imx/ drivers/gpu/ipu-v3/ drivers/rtc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/videodev2.h:61,
                    from include/video/imx-ipu-v3.h:16,
                    from drivers/gpu/ipu-v3/ipu-prv.h:16,
                    from drivers/gpu/ipu-v3/ipu-cpmem.c:11:
>> include/uapi/linux/videodev2.h:828: warning: "fourcc_mod_is_vendor" redefined
     828 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   In file included from include/drm/drm_fourcc.h:26,
                    from drivers/gpu/ipu-v3/ipu-cpmem.c:10:
   include/uapi/drm/drm_fourcc.h:419: note: this is the location of the previous definition
     419 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
>> include/uapi/linux/videodev2.h:831: warning: "fourcc_mod_code" redefined
     831 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/drm/drm_fourcc.h:422: note: this is the location of the previous definition
     422 | #define fourcc_mod_code(vendor, val) \
         | 
--
   In file included from include/linux/videodev2.h:61,
                    from include/video/imx-ipu-v3.h:16,
                    from drivers/gpu/ipu-v3/ipu-pre.c:13:
>> include/uapi/linux/videodev2.h:828: warning: "fourcc_mod_is_vendor" redefined
     828 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   In file included from include/drm/drm_fourcc.h:26,
                    from drivers/gpu/ipu-v3/ipu-pre.c:6:
   include/uapi/drm/drm_fourcc.h:419: note: this is the location of the previous definition
     419 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
>> include/uapi/linux/videodev2.h:831: warning: "fourcc_mod_code" redefined
     831 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/drm/drm_fourcc.h:422: note: this is the location of the previous definition
     422 | #define fourcc_mod_code(vendor, val) \
         | 
   drivers/gpu/ipu-v3/ipu-pre.c: In function 'ipu_pre_configure':
   include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_NONE' undeclared (first use in this function); did you mean 'V4L2_PIX_FMT_MOD_LINEAR'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-pre.c:174:25: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     174 |         if (modifier == DRM_FORMAT_MOD_LINEAR)
         |                         ^~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:832:19: note: each undeclared identifier is reported only once for each function it appears in
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-pre.c:174:25: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     174 |         if (modifier == DRM_FORMAT_MOD_LINEAR)
         |                         ^~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE' undeclared (first use in this function); did you mean 'DRM_FORMAT_MOD_VENDOR_VIVANTE'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:728:49: note: in expansion of macro 'fourcc_mod_code'
     728 | #define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED      fourcc_mod_code(VIVANTE, 2)
         |                                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-pre.c:216:33: note: in expansion of macro 'DRM_FORMAT_MOD_VIVANTE_SUPER_TILED'
     216 |                 if (modifier == DRM_FORMAT_MOD_VIVANTE_SUPER_TILED)
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/videodev2.h:61,
                    from include/video/imx-ipu-v3.h:16,
                    from drivers/gpu/ipu-v3/ipu-prg.c:17:
>> include/uapi/linux/videodev2.h:828: warning: "fourcc_mod_is_vendor" redefined
     828 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   In file included from include/drm/drm_fourcc.h:26,
                    from drivers/gpu/ipu-v3/ipu-prg.c:6:
   include/uapi/drm/drm_fourcc.h:419: note: this is the location of the previous definition
     419 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
>> include/uapi/linux/videodev2.h:831: warning: "fourcc_mod_code" redefined
     831 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/drm/drm_fourcc.h:422: note: this is the location of the previous definition
     422 | #define fourcc_mod_code(vendor, val) \
         | 
   drivers/gpu/ipu-v3/ipu-prg.c: In function 'ipu_prg_format_supported':
   include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_NONE' undeclared (first use in this function); did you mean 'V4L2_PIX_FMT_MOD_LINEAR'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-prg.c:133:14: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     133 |         case DRM_FORMAT_MOD_LINEAR:
         |              ^~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:832:19: note: each undeclared identifier is reported only once for each function it appears in
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-prg.c:133:14: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     133 |         case DRM_FORMAT_MOD_LINEAR:
         |              ^~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE' undeclared (first use in this function); did you mean 'DRM_FORMAT_MOD_VENDOR_VIVANTE'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:716:49: note: in expansion of macro 'fourcc_mod_code'
     716 | #define DRM_FORMAT_MOD_VIVANTE_TILED            fourcc_mod_code(VIVANTE, 1)
         |                                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-prg.c:134:14: note: in expansion of macro 'DRM_FORMAT_MOD_VIVANTE_TILED'
     134 |         case DRM_FORMAT_MOD_VIVANTE_TILED:
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/videodev2.h:61,
                    from include/video/imx-ipu-v3.h:16,
                    from drivers/gpu/drm/imx/ipuv3-plane.c:18:
>> include/uapi/linux/videodev2.h:828: warning: "fourcc_mod_is_vendor" redefined
     828 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   In file included from include/drm/drm_fourcc.h:26,
                    from drivers/gpu/drm/imx/ipuv3-plane.c:12:
   include/uapi/drm/drm_fourcc.h:419: note: this is the location of the previous definition
     419 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
>> include/uapi/linux/videodev2.h:831: warning: "fourcc_mod_code" redefined
     831 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/drm/drm_fourcc.h:422: note: this is the location of the previous definition
     422 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_NONE' undeclared here (not in a function); did you mean 'V4L2_PIX_FMT_MOD_LINEAR'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/ipuv3-plane.c:107:9: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     107 |         DRM_FORMAT_MOD_LINEAR,
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE' undeclared here (not in a function); did you mean 'DRM_FORMAT_MOD_VENDOR_VIVANTE'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:716:49: note: in expansion of macro 'fourcc_mod_code'
     716 | #define DRM_FORMAT_MOD_VIVANTE_TILED            fourcc_mod_code(VIVANTE, 1)
         |                                                 ^~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/ipuv3-plane.c:113:9: note: in expansion of macro 'DRM_FORMAT_MOD_VIVANTE_TILED'
     113 |         DRM_FORMAT_MOD_VIVANTE_TILED,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/fourcc_mod_is_vendor +828 include/uapi/linux/videodev2.h

   824	
   825	#define fourcc_mod_get_vendor(modifier) \
   826		(((modifier) >> 56) & 0xff)
   827	
 > 828	#define fourcc_mod_is_vendor(modifier, vendor) \
   829		(fourcc_mod_get_vendor(modifier) == V4L2_PIX_FMT_MOD_VENDOR_## vendor)
   830	
 > 831	#define fourcc_mod_code(vendor, val) \
   832		((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
   833
kernel test robot Nov. 2, 2022, 1:25 a.m. UTC | #3
Hi Hsia-Jun,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on media-tree/master]
[also build test ERROR on drm-misc/drm-misc-next drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-tip/drm-tip linus/master v6.1-rc3 next-20221101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hsia-Jun-Li/Add-pixel-formats-used-in-Synatpics-SoC/20221101-180905
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20221101100448.66712-3-randy.li%40synaptics.com
patch subject: [PATCH v3 2/4] media: videodev2.h: add pixel format modifiers
config: riscv-randconfig-r003-20221101
compiler: riscv64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/58e89ab4bf39c7b8b8733c2e5129c0ceb19cd270
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hsia-Jun-Li/Add-pixel-formats-used-in-Synatpics-SoC/20221101-180905
        git checkout 58e89ab4bf39c7b8b8733c2e5129c0ceb19cd270
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/videodev2.h:61,
                    from include/video/imx-ipu-v3.h:16,
                    from drivers/gpu/drm/imx/ipuv3-plane.c:18:
   include/uapi/linux/videodev2.h:828: warning: "fourcc_mod_is_vendor" redefined
     828 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   In file included from include/drm/drm_fourcc.h:26,
                    from drivers/gpu/drm/imx/ipuv3-plane.c:12:
   include/uapi/drm/drm_fourcc.h:419: note: this is the location of the previous definition
     419 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   include/uapi/linux/videodev2.h:831: warning: "fourcc_mod_code" redefined
     831 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/drm/drm_fourcc.h:422: note: this is the location of the previous definition
     422 | #define fourcc_mod_code(vendor, val) \
         | 
>> include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_NONE' undeclared here (not in a function); did you mean 'V4L2_PIX_FMT_MOD_LINEAR'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/ipuv3-plane.c:107:9: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     107 |         DRM_FORMAT_MOD_LINEAR,
         |         ^~~~~~~~~~~~~~~~~~~~~
>> include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE' undeclared here (not in a function); did you mean 'DRM_FORMAT_MOD_VENDOR_VIVANTE'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:716:49: note: in expansion of macro 'fourcc_mod_code'
     716 | #define DRM_FORMAT_MOD_VIVANTE_TILED            fourcc_mod_code(VIVANTE, 1)
         |                                                 ^~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/ipuv3-plane.c:113:9: note: in expansion of macro 'DRM_FORMAT_MOD_VIVANTE_TILED'
     113 |         DRM_FORMAT_MOD_VIVANTE_TILED,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/videodev2.h:61,
                    from include/video/imx-ipu-v3.h:16,
                    from drivers/gpu/ipu-v3/ipu-pre.c:13:
   include/uapi/linux/videodev2.h:828: warning: "fourcc_mod_is_vendor" redefined
     828 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   In file included from include/drm/drm_fourcc.h:26,
                    from drivers/gpu/ipu-v3/ipu-pre.c:6:
   include/uapi/drm/drm_fourcc.h:419: note: this is the location of the previous definition
     419 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   include/uapi/linux/videodev2.h:831: warning: "fourcc_mod_code" redefined
     831 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/drm/drm_fourcc.h:422: note: this is the location of the previous definition
     422 | #define fourcc_mod_code(vendor, val) \
         | 
   drivers/gpu/ipu-v3/ipu-pre.c: In function 'ipu_pre_configure':
>> include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_NONE' undeclared (first use in this function); did you mean 'V4L2_PIX_FMT_MOD_LINEAR'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-pre.c:174:25: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     174 |         if (modifier == DRM_FORMAT_MOD_LINEAR)
         |                         ^~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:832:19: note: each undeclared identifier is reported only once for each function it appears in
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-pre.c:174:25: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     174 |         if (modifier == DRM_FORMAT_MOD_LINEAR)
         |                         ^~~~~~~~~~~~~~~~~~~~~
>> include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE' undeclared (first use in this function); did you mean 'DRM_FORMAT_MOD_VENDOR_VIVANTE'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:728:49: note: in expansion of macro 'fourcc_mod_code'
     728 | #define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED      fourcc_mod_code(VIVANTE, 2)
         |                                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-pre.c:216:33: note: in expansion of macro 'DRM_FORMAT_MOD_VIVANTE_SUPER_TILED'
     216 |                 if (modifier == DRM_FORMAT_MOD_VIVANTE_SUPER_TILED)
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/videodev2.h:61,
                    from include/video/imx-ipu-v3.h:16,
                    from drivers/gpu/ipu-v3/ipu-prg.c:17:
   include/uapi/linux/videodev2.h:828: warning: "fourcc_mod_is_vendor" redefined
     828 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   In file included from include/drm/drm_fourcc.h:26,
                    from drivers/gpu/ipu-v3/ipu-prg.c:6:
   include/uapi/drm/drm_fourcc.h:419: note: this is the location of the previous definition
     419 | #define fourcc_mod_is_vendor(modifier, vendor) \
         | 
   include/uapi/linux/videodev2.h:831: warning: "fourcc_mod_code" redefined
     831 | #define fourcc_mod_code(vendor, val) \
         | 
   include/uapi/drm/drm_fourcc.h:422: note: this is the location of the previous definition
     422 | #define fourcc_mod_code(vendor, val) \
         | 
   drivers/gpu/ipu-v3/ipu-prg.c: In function 'ipu_prg_format_supported':
>> include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_NONE' undeclared (first use in this function); did you mean 'V4L2_PIX_FMT_MOD_LINEAR'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-prg.c:133:14: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     133 |         case DRM_FORMAT_MOD_LINEAR:
         |              ^~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:832:19: note: each undeclared identifier is reported only once for each function it appears in
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:475:33: note: in expansion of macro 'fourcc_mod_code'
     475 | #define DRM_FORMAT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
         |                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-prg.c:133:14: note: in expansion of macro 'DRM_FORMAT_MOD_LINEAR'
     133 |         case DRM_FORMAT_MOD_LINEAR:
         |              ^~~~~~~~~~~~~~~~~~~~~
>> include/uapi/linux/videodev2.h:832:19: error: 'V4L2_PIX_FMT_MOD_VENDOR_VIVANTE' undeclared (first use in this function); did you mean 'DRM_FORMAT_MOD_VENDOR_VIVANTE'?
     832 |         ((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/drm/drm_fourcc.h:716:49: note: in expansion of macro 'fourcc_mod_code'
     716 | #define DRM_FORMAT_MOD_VIVANTE_TILED            fourcc_mod_code(VIVANTE, 1)
         |                                                 ^~~~~~~~~~~~~~~
   drivers/gpu/ipu-v3/ipu-prg.c:134:14: note: in expansion of macro 'DRM_FORMAT_MOD_VIVANTE_TILED'
     134 |         case DRM_FORMAT_MOD_VIVANTE_TILED:
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +832 include/uapi/linux/videodev2.h

   824	
   825	#define fourcc_mod_get_vendor(modifier) \
   826		(((modifier) >> 56) & 0xff)
   827	
   828	#define fourcc_mod_is_vendor(modifier, vendor) \
   829		(fourcc_mod_get_vendor(modifier) == V4L2_PIX_FMT_MOD_VENDOR_## vendor)
   830	
   831	#define fourcc_mod_code(vendor, val) \
 > 832		((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
   833
diff mbox series

Patch

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 29da1f4b4578..d00b2e9c0c54 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -816,6 +816,26 @@  struct v4l2_pix_format {
 #define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA	0x00000001
 #define V4L2_PIX_FMT_FLAG_SET_CSC	0x00000002
 
+/*
+ *  F O R M A T   M O D I F I E S
+ */
+/* Vendor Ids: */
+#define V4L2_PIX_FMT_RESERVED           ((1ULL << 56) - 1)
+
+#define fourcc_mod_get_vendor(modifier) \
+	(((modifier) >> 56) & 0xff)
+
+#define fourcc_mod_is_vendor(modifier, vendor) \
+	(fourcc_mod_get_vendor(modifier) == V4L2_PIX_FMT_MOD_VENDOR_## vendor)
+
+#define fourcc_mod_code(vendor, val) \
+	((((__u64)V4L2_PIX_FMT_MOD_VENDOR_## vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
+
+/* Format Modifier tokens */
+#define V4L2_PIX_FMT_MOD_INVALID  fourcc_mod_code(NONE, V4L2_PIX_FMT_RESERVED)
+#define V4L2_PIX_FMT_MOD_LINEAR   fourcc_mod_code(NONE, 0)
+
+
 /*
  *	F O R M A T   E N U M E R A T I O N
  */