tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 62f6761889a59411f5673ba61d7ae465372ca9c6
commit: bc0b0ae994e6bb17b12bfd882c2eb837eb29c078 [56/237] CHROMIUM: media: mtk-vcodec: Add
vp9 slice api driver for mt8192
config: arm-randconfig-r024-20210416 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout bc0b0ae994e6bb17b12bfd882c2eb837eb29c078
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>
drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_req_lat_if.c:1107:4: warning: format
specifies type 'unsigned long' but the argument has type 'size_t' (aka
'unsigned int') [-Wformat]
bs->size, offset);
^~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/../mtk_vcodec_util.h:38:60: note: expanded from
macro 'mtk_vcodec_err'
((struct mtk_vcodec_ctx *)h->ctx)->id, __func__, ##args)
^~~~
include/linux/printk.h:299:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
1 warning generated.
vim +1107 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_req_lat_if.c
1059
1060 /*
1061 * parse tiles according to `6.4 Decode tiles syntax`
1062 * in "vp9-bitstream-specification"
1063 *
1064 * frame contains uncompress header, compressed header and several tiles.
1065 * this function parses tiles' position and size, stores them to tile buffer
1066 * for decoding.
1067 */
1068 static int vdec_vp9_slice_setup_tile_buffer(
1069 struct vdec_vp9_slice_instance *instance,
1070 struct vdec_vp9_slice_vsi * vsi,
1071 struct mtk_vcodec_mem *bs)
1072 {
1073 struct vdec_vp9_slice_uncompressed_header *uh;
1074 unsigned int rows_log2;
1075 unsigned int cols_log2;
1076 unsigned int rows;
1077 unsigned int cols;
1078 unsigned int mi_row;
1079 unsigned int mi_col;
1080 unsigned int offset;
1081 unsigned int pa;
1082 unsigned int size;
1083 struct vdec_vp9_slice_tiles *tiles;
1084 unsigned char *pos;
1085 unsigned char *end;
1086 unsigned char *va;
1087 unsigned int *tb;
1088 int i;
1089 int j;
1090
1091 uh = &vsi->frame.uh;
1092 rows_log2 = uh->tile_rows_log2;
1093 cols_log2 = uh->tile_cols_log2;
1094 rows = 1 << rows_log2;
1095 cols = 1 << cols_log2;
1096
1097 if (rows > 4 || cols > 64) {
1098 mtk_vcodec_err(instance, "tile_rows %u tile_cols %u\n",
1099 rows, cols);
1100 return -EINVAL;
1101 }
1102
1103 offset = uh->uncompressed_header_size +
1104 uh->header_size_in_bytes;
1105 if (bs->size <= offset) {
1106 mtk_vcodec_err(instance, "bs size %lu tile offset %u\n",
1107 bs->size, offset);
1108 return -EINVAL;
1109 }
1110
1111 tiles = &vsi->frame.tiles;
1112 /* setup tile buffer */
1113
1114 va = (unsigned char *)bs->va;
1115 pos = va + offset;
1116 end = va + bs->size;
1117 /* truncated */
1118 pa = (unsigned int)bs->dma_addr + offset;
1119 tb = instance->tile.va;
1120 for (i = 0; i < rows; i++) {
1121 for (j = 0; j < cols; j++) {
1122 if (i == rows - 1 &&
1123 j == cols - 1) {
1124 size = (unsigned int)(end - pos);
1125 } else {
1126 if (end - pos < 4) {
1127 mtk_vcodec_err(instance,
1128 "tile %px %px\n", end, pos);
1129 return -EINVAL;
1130 }
1131 size = (pos[0] << 24) | (pos[1] << 16) |
1132 (pos[2] << 8) | pos[3];
1133 pos += 4;
1134 pa += 4;
1135 offset += 4;
1136 if (end - pos < size) {
1137 mtk_vcodec_err(instance,
1138 "tile %px %px %u\n",
1139 end, pos, size);
1140 return -EINVAL;
1141 }
1142 }
1143 tiles->size[i][j] = size;
1144 if (tiles->mi_rows[i]) {
1145 *tb++ = (size << 3) + ((offset << 3) & 0x7f);
1146 *tb++ = pa &~0xf;
1147 *tb++ = (pa << 3) & 0x7f;
1148 mi_row = (tiles->mi_rows[i] - 1) & 0x1ff;
1149 mi_col = (tiles->mi_cols[j] - 1) & 0x3f;
1150 *tb++ = (mi_row << 6) + mi_col;
1151 }
1152 pos += size;
1153 pa += size;
1154 offset += size;
1155 }
1156 }
1157
1158 return 0;
1159 }
1160
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org