Message ID | 20221101100448.66712-3-randy.li@synaptics.com |
---|---|
State | New |
Headers | show |
Series | Add pixel formats used in Synatpics SoC | expand |
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 --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 */