tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584
commit: 6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584 [1/1] CHROMIUM: media: align H.264
stateless interface with upstream
config:
arm64-chromiumos-arm64-customedconfig-chrome-os:chromeos-4.19:6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584
(attached as .config)
compiler: aarch64-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-4.19
git checkout 6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c: In function
'get_vdec_decode_parameters':
> drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:497:18:
error: variable 'dpb_fields' set but not used [-Werror=unused-but-set-variable]
497 | enum v4l2_field dpb_fields[V4L2_H264_NUM_DPB_ENTRIES];
| ^~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c: In function
'get_pic_info':
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:602:27: error: parameter
'pic' set but not used [-Werror=unused-but-set-parameter]
602 | struct vdec_pic_info *pic)
| ~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c: In function
'vdec_h264_slice_decode':
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:736:28: error: variable
'dst_buf_info' set but not used [-Werror=unused-but-set-variable]
736 | struct mtk_video_dec_buf *dst_buf_info;
| ^~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:735:28: error: variable
'src_buf_info' set but not used [-Werror=unused-but-set-variable]
735 | struct mtk_video_dec_buf *src_buf_info;
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/dpb_fields +497 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c
700c75679aed6f Alexandre Courbot 2019-11-14 482
31f9ea2329ceef Yunfei Dong 2019-05-17 483 static void
get_vdec_decode_parameters(struct vdec_h264_slice_inst *inst)
31f9ea2329ceef Yunfei Dong 2019-05-17 484 {
700c75679aed6f Alexandre Courbot 2019-11-14 485 const struct
v4l2_ctrl_h264_decode_params *dec_params =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 486 get_ctrl_ptr(inst->ctx,
V4L2_CID_STATELESS_H264_DECODE_PARAMS);
2533b049b95777 Alexandre Courbot 2021-02-19 487 const struct v4l2_ctrl_h264_sps *sps =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 488 get_ctrl_ptr(inst->ctx,
V4L2_CID_STATELESS_H264_SPS);
2533b049b95777 Alexandre Courbot 2021-02-19 489 const struct v4l2_ctrl_h264_pps *pps =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 490 get_ctrl_ptr(inst->ctx,
V4L2_CID_STATELESS_H264_PPS);
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 491 const struct
v4l2_ctrl_h264_scaling_matrix *scaling_matrix =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 492 get_ctrl_ptr(inst->ctx,
V4L2_CID_STATELESS_H264_SCALING_MATRIX);
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 493 struct mtk_h264_dec_slice_param
*slice_param = &inst->h264_slice_param;
700c75679aed6f Alexandre Courbot 2019-11-14 494 struct v4l2_ctrl_h264_decode_params
fixed_params = *dec_params;
2533b049b95777 Alexandre Courbot 2021-02-19 495 u8
translation_table[V4L2_H264_NUM_DPB_ENTRIES] = { 0x20, };
2533b049b95777 Alexandre Courbot 2021-02-19 496 struct v4l2_h264_reflist_builder
reflist_builder;
2533b049b95777 Alexandre Courbot 2021-02-19 @497 enum v4l2_field
dpb_fields[V4L2_H264_NUM_DPB_ENTRIES];
2533b049b95777 Alexandre Courbot 2021-02-19 498 u8 *p0_reflist =
slice_param->decode_params.ref_pic_list_p0;
2533b049b95777 Alexandre Courbot 2021-02-19 499 u8 *b0_reflist =
slice_param->decode_params.ref_pic_list_b0;
2533b049b95777 Alexandre Courbot 2021-02-19 500 u8 *b1_reflist =
slice_param->decode_params.ref_pic_list_b1;
2533b049b95777 Alexandre Courbot 2021-02-19 501 int i;
700c75679aed6f Alexandre Courbot 2019-11-14 502
700c75679aed6f Alexandre Courbot 2019-11-14 503 update_dpb(dec_params, inst->dpb,
translation_table);
700c75679aed6f Alexandre Courbot 2019-11-14 504 memcpy(fixed_params.dpb, inst->dpb,
sizeof(inst->dpb));
700c75679aed6f Alexandre Courbot 2019-11-14 505
2533b049b95777 Alexandre Courbot 2021-02-19 506
get_h264_sps_parameters(&slice_param->sps, sps);
2533b049b95777 Alexandre Courbot 2021-02-19 507
get_h264_pps_parameters(&slice_param->pps, pps);
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 508
get_h264_scaling_matrix(&slice_param->scaling_matrix, scaling_matrix);
700c75679aed6f Alexandre Courbot 2019-11-14 509
get_h264_decode_parameters(&slice_param->decode_params, &fixed_params);
17c95456b9a923 Alexandre Courbot 2019-10-11 510 get_h264_dpb_list(inst, slice_param);
17c95456b9a923 Alexandre Courbot 2019-10-11 511
2533b049b95777 Alexandre Courbot 2021-02-19 512 /* Prepare the fields for our reference
lists */
2533b049b95777 Alexandre Courbot 2021-02-19 513 for (i = 0; i <
V4L2_H264_NUM_DPB_ENTRIES; i++)
2533b049b95777 Alexandre Courbot 2021-02-19 514 dpb_fields[i] =
slice_param->h264_dpb_info[i].field;
2533b049b95777 Alexandre Courbot 2021-02-19 515 /* Build the reference lists */
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 516
v4l2_h264_init_reflist_builder(&reflist_builder, &fixed_params, sps,
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 517 dec_params->dpb);
2533b049b95777 Alexandre Courbot 2021-02-19 518
v4l2_h264_build_p_ref_list(&reflist_builder, p0_reflist);
2533b049b95777 Alexandre Courbot 2021-02-19 519
v4l2_h264_build_b_ref_lists(&reflist_builder, b0_reflist, b1_reflist);
2533b049b95777 Alexandre Courbot 2021-02-19 520 /* Adapt the built lists to the
firmware's expectations */
2533b049b95777 Alexandre Courbot 2021-02-19 521 fixup_ref_list(p0_reflist,
translation_table, reflist_builder.num_valid);
2533b049b95777 Alexandre Courbot 2021-02-19 522 fixup_ref_list(b0_reflist,
translation_table, reflist_builder.num_valid);
2533b049b95777 Alexandre Courbot 2021-02-19 523 fixup_ref_list(b1_reflist,
translation_table, reflist_builder.num_valid);
2533b049b95777 Alexandre Courbot 2021-02-19 524
cff93e7cfaa386 Alexandre Courbot 2020-02-10 525
memcpy(&inst->vsi_ctx.h264_slice_params, slice_param,
cff93e7cfaa386 Alexandre Courbot 2020-02-10 526
sizeof(inst->vsi_ctx.h264_slice_params));
31f9ea2329ceef Yunfei Dong 2019-05-17 527 }
31f9ea2329ceef Yunfei Dong 2019-05-17 528
:::::: The code at line 497 was first introduced by commit
:::::: 2533b049b957778892305d1efd59ce7dd749f2d0 CHROMIUM: media: mtk-vcodec: compute
P/B0/B1 reflists in-driver
:::::: TO: Alexandre Courbot <acourbot(a)chromium.org>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org