All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.10 145/147] drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:388:22: warning: cast from pointer to integer of different size
@ 2021-11-29 22:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-29 22:45 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6370 bytes --]

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head:   ed87340a6d1e040dd01d1d1ae1a12f1a7e504559
commit: 1b0df6099a9151195638c09e32147e9652b8d2cc [145/147] CHROMIUM: media: mtk-vcodec: Add h264 slice api driver for mt8192
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20211130/202111300619.7jqQ4VK4-lkp(a)intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.2.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.10
        git checkout 1b0df6099a9151195638c09e32147e9652b8d2cc
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/media/platform/mtk-vcodec/

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

All warnings (new ones prefixed by >>):

   drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c: In function 'vdec_h264_slice_core_decode':
>> drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:388:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     388 |         vdec_fb_va = (u64)fb;
         |                      ^
>> drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:375:35: warning: variable 'dst_buf_info' set but not used [-Wunused-but-set-variable]
     375 |         struct mtk_video_dec_buf *dst_buf_info;
         |                                   ^~~~~~~~~~~~


vim +388 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c

   367	
   368	static int vdec_h264_slice_core_decode(struct vdec_lat_buf *lat_buf)
   369	{
   370		struct vdec_fb *fb;
   371		uint64_t vdec_fb_va;
   372		uint64_t y_fb_dma, c_fb_dma;
   373		int err, timeout, i, dec_err;
   374		struct vdec_vpu_inst *vpu;
 > 375		struct mtk_video_dec_buf *dst_buf_info;
   376		struct mtk_vcodec_ctx *ctx = lat_buf->ctx;
   377		struct vdec_h264_slice_inst *inst = ctx->drv_handle;
   378		struct vb2_v4l2_buffer *vb2_v4l2;
   379		struct vdec_h264_slice_share_info *share_info = lat_buf->private_data;
   380		struct mtk_vcodec_mem *mem;
   381	
   382		mtk_vcodec_debug(inst, "[h264-core] vdec_h264 core decode");
   383		memcpy(&inst->vsi_core->h264_slice_params, &share_info->h264_slice_params,
   384			sizeof(share_info->h264_slice_params));
   385		fb = ctx->dev->vdec_pdata->get_cap_buffer(ctx);
   386		vpu = &inst->vpu;
   387		dst_buf_info = container_of(fb, struct mtk_video_dec_buf, frame_buffer);
 > 388		vdec_fb_va = (u64)fb;
   389		y_fb_dma = fb ? (u64)fb->base_y.dma_addr : 0;
   390	
   391		if (ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes == 1)
   392			c_fb_dma =
   393				y_fb_dma + inst->ctx->picinfo.buf_w * inst->ctx->picinfo.buf_h;
   394		else
   395			c_fb_dma = fb ? (u64)fb->base_c.dma_addr : 0;
   396	
   397		mtk_vcodec_debug(inst, "[h264-core] y/c addr = 0x%x 0x%x", y_fb_dma,
   398			c_fb_dma);
   399	
   400		inst->vsi_core->dec.y_fb_dma = y_fb_dma;
   401		inst->vsi_core->dec.c_fb_dma = c_fb_dma;
   402		inst->vsi_core->dec.vdec_fb_va = vdec_fb_va;
   403		inst->vsi_core->dec.nal_info = share_info->nal_info;
   404		inst->vsi_core->wdma_start_addr =
   405			lat_buf->ctx->msg_queue.wdma_addr.dma_addr;
   406		inst->vsi_core->wdma_end_addr =
   407			lat_buf->ctx->msg_queue.wdma_addr.dma_addr +
   408			lat_buf->ctx->msg_queue.wdma_addr.size;
   409		inst->vsi_core->wdma_err_addr = lat_buf->wdma_err_addr.dma_addr;
   410		inst->vsi_core->slice_bc_start_addr = lat_buf->slice_bc_addr.dma_addr;
   411		inst->vsi_core->slice_bc_end_addr = lat_buf->slice_bc_addr.dma_addr +
   412			lat_buf->slice_bc_addr.size;
   413		inst->vsi_core->trans_start = share_info->trans_start;
   414		inst->vsi_core->trans_end = share_info->trans_end;
   415		for (i = 0; i < H264_MAX_MV_NUM; i++) {
   416			mem = &inst->mv_buf[i];
   417			inst->vsi_core->mv_buf_dma[i] = mem->dma_addr;
   418		}
   419	
   420		vb2_v4l2 = v4l2_m2m_next_dst_buf(ctx->m2m_ctx);
   421	
   422		vb2_v4l2->vb2_buf.timestamp = lat_buf->ts_info.vb2_buf.timestamp;
   423		vb2_v4l2->timecode = lat_buf->ts_info.timecode;
   424		vb2_v4l2->field = lat_buf->ts_info.field;
   425		vb2_v4l2->flags = lat_buf->ts_info.flags;
   426		vb2_v4l2->vb2_buf.copied_timestamp =
   427			lat_buf->ts_info.vb2_buf.copied_timestamp;
   428	
   429		vdec_h264_slice_fill_decode_reflist(inst,
   430			&inst->vsi_core->h264_slice_params, share_info);
   431	
   432		err = vpu_dec_core(vpu);
   433		if (err) {
   434			dec_err = 1;
   435			mtk_vcodec_err(inst, "core decode err=%d", err);
   436			goto vdec_dec_end;
   437		} else {
   438			dec_err = 0;
   439		}
   440	
   441		/* wait decoder done interrupt */
   442		timeout = mtk_vcodec_wait_for_comp_done_ctx(
   443			inst->ctx, MTK_INST_IRQ_RECEIVED,
   444			WAIT_INTR_TIMEOUT_MS, MTK_VDEC_CORE);
   445		if (timeout)
   446			mtk_vcodec_err(inst, "core decode timeout: pic_%d",
   447				ctx->decoded_frame_cnt);
   448		inst->vsi_core->dec.timeout = !!timeout;
   449	
   450		vpu_dec_core_end(vpu);
   451	
   452		mtk_vcodec_debug(inst, "y_crc: 0x%x 0x%x 0x%x 0x%x",
   453			inst->vsi_core->dec.crc[0],
   454			inst->vsi_core->dec.crc[1],
   455			inst->vsi_core->dec.crc[2],
   456			inst->vsi_core->dec.crc[3]);
   457	
   458		mtk_vcodec_debug(inst, "c_crc: 0x%x 0x%x 0x%x 0x%x",
   459			inst->vsi_core->dec.crc[4],
   460			inst->vsi_core->dec.crc[5],
   461			inst->vsi_core->dec.crc[6],
   462			inst->vsi_core->dec.crc[7]);
   463	
   464	vdec_dec_end:
   465		vdec_msg_queue_update_ube_rptr(&lat_buf->ctx->msg_queue,
   466			inst->vsi_core->trans_end);
   467		ctx->dev->vdec_pdata->cap_to_disp(ctx, fb, dec_err);
   468		mtk_vcodec_debug(inst, "core decode done err=%d", err);
   469		ctx->decoded_frame_cnt++;
   470	
   471		return 0;
   472	}
   473	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-29 22:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 22:45 [chrome-os:chromeos-5.10 145/147] drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:388:22: warning: cast from pointer to integer of different size kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.