tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 52d269f32500581166246e0e494b2b62d979dba6
commit: dd9279c63081578b640d472001d58dfe30a53b6a [55/243] CHROMIUM: media: mtk-vcodec: Add
vp8 slice api driver for mt8192
config: csky-randconfig-r031-20210420 (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.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
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout dd9279c63081578b640d472001d58dfe30a53b6a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=csky
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 >>):
In file included from arch/csky/include/asm/bug.h:7,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_req_if.c:7:
include/asm-generic/fixmap.h: In function 'fix_to_virt':
include/asm-generic/fixmap.h:32:19: warning: comparison of unsigned expression >= 0
is always true [-Wtype-limits]
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~
include/linux/compiler.h:397:9: note: in definition of macro
'__compiletime_assert'
397 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:417:2: note: in expansion of macro
'_compiletime_assert'
417 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/asm-generic/fixmap.h:32:2: note: in expansion of macro 'BUILD_BUG_ON'
32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
| ^~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_req_if.c: In function
'vdec_vp8_slice_decode':
> drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_req_if.c:322:17:
warning: variable 'bs_va' set but not used [-Wunused-but-set-variable]
322 | unsigned char *bs_va;
| ^~~~~
vim +/bs_va +322 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_req_if.c
315
316 static int vdec_vp8_slice_decode(void *h_vdec, struct mtk_vcodec_mem *bs,
317 struct vdec_fb *fb, bool *res_chg)
318 {
319 struct vdec_vp8_slice_inst *inst = h_vdec;
320 struct vdec_vpu_inst *vpu = &inst->vpu;
321 struct mtk_video_dec_buf *src_buf_info, *dst_buf_info;
322 unsigned char *bs_va;
323 unsigned int data;
324 uint64_t y_fb_dma, c_fb_dma;
325 int err;
326
327 /* bs NULL means flush decoder */
328 if (!bs)
329 return vpu_dec_reset(vpu);
330
331 src_buf_info = container_of(bs, struct mtk_video_dec_buf, bs_buffer);
332
333 fb = inst->ctx->dev->vdec_pdata->get_cap_buffer(inst->ctx);
334 dst_buf_info = container_of(fb, struct mtk_video_dec_buf, frame_buffer);
335
336 y_fb_dma = fb ? (u64)fb->base_y.dma_addr : 0;
337 if (inst->ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes == 1)
338 c_fb_dma = y_fb_dma +
339 inst->ctx->picinfo.buf_w * inst->ctx->picinfo.buf_h;
340 else
341 c_fb_dma = fb ? (u64)fb->base_c.dma_addr : 0;
342
343 inst->vsi->dec.bs_dma = (unsigned long)bs->dma_addr;
344 inst->vsi->dec.bs_sz = bs->size;
345 inst->vsi->dec.cur_y_fb_dma = y_fb_dma;
346 inst->vsi->dec.cur_c_fb_dma = c_fb_dma;
347
348 mtk_vcodec_debug(inst, "frame[%d] bs(%d 0x%lx) y/c(0x%llx 0x%llx)",
349 inst->ctx->decoded_frame_cnt,
350 bs->size, (unsigned long)bs->dma_addr,
351 y_fb_dma, c_fb_dma);
352
353 bs_va = (unsigned char *)bs->va;
354 v4l2_m2m_buf_copy_metadata(&src_buf_info->m2m_buf.vb,
355 &dst_buf_info->m2m_buf.vb, true);
356
357 vdec_vp8_slice_get_decode_parameters(inst);
358 err = vpu_dec_start(vpu, &data, 1);
359 if (err) {
360 mtk_vcodec_debug(inst, "vp8 dec start err!");
361 goto error;
362 }
363
364 if (inst->vsi->dec.resolution_changed) {
365 mtk_vcodec_debug(inst, "- resolution_changed -");
366 *res_chg = true;
367 return 0;
368 }
369
370 /* wait decoder done interrupt */
371 err = mtk_vcodec_wait_for_core_done_ctx(inst->ctx,
372 MTK_INST_IRQ_RECEIVED, WAIT_INTR_TIMEOUT_MS);
373 if (err)
374 inst->vsi->dec.timeout = true;
375 else
376 inst->vsi->dec.timeout = false;
377
378 err = vpu_dec_end(vpu);
379 if (err || inst->vsi->dec.timeout)
380 goto error;
381
382 mtk_vcodec_debug(inst, "y_crc: 0x%x 0x%x 0x%x 0x%x",
383 inst->vsi->dec.crc[0],
384 inst->vsi->dec.crc[1],
385 inst->vsi->dec.crc[2],
386 inst->vsi->dec.crc[3]);
387
388 mtk_vcodec_debug(inst, "c_crc: 0x%x 0x%x 0x%x 0x%x",
389 inst->vsi->dec.crc[4],
390 inst->vsi->dec.crc[5],
391 inst->vsi->dec.crc[6],
392 inst->vsi->dec.crc[7]);
393
394 inst->ctx->dev->vdec_pdata->cap_to_disp(inst->ctx, fb, 0);
395 inst->ctx->decoded_frame_cnt++;
396 *res_chg = false;
397 return 0;
398
399 error:
400 mtk_vcodec_err(inst, "\n - FRAME[%d] timeout=%d err=%d\n",
401 inst->ctx->decoded_frame_cnt,
402 inst->vsi->dec.timeout, err);
403 return err;
404 }
405
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org