All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.4 54/243] drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:388:27: sparse: sparse: non size-preserving pointer to integer cast
@ 2021-04-20 22:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-20 22:31 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   52d269f32500581166246e0e494b2b62d979dba6
commit: 0a438b290ea431bc87156be5819e9f85fa951240 [54/243] CHROMIUM: media: mtk-vcodec: Add h264 slice api driver for mt8192
config: nios2-randconfig-s032-20210420 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.4
        git checkout 0a438b290ea431bc87156be5819e9f85fa951240
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=nios2 

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


sparse warnings: (new ones prefixed by >>)
>> drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:388:27: sparse: sparse: non size-preserving pointer to integer cast

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_core_done_ctx(
   443			inst->ctx, MTK_INST_IRQ_RECEIVED, WAIT_INTR_TIMEOUT_MS);
   444		if (timeout)
   445			mtk_vcodec_err(inst, "core decode timeout: pic_%d",
   446				ctx->decoded_frame_cnt);
   447		inst->vsi_core->dec.timeout = !!timeout;
   448	
   449		vpu_dec_core_end(vpu);
   450	
   451		mtk_vcodec_debug(inst, "y_crc: 0x%x 0x%x 0x%x 0x%x",
   452			inst->vsi_core->dec.crc[0],
   453			inst->vsi_core->dec.crc[1],
   454			inst->vsi_core->dec.crc[2],
   455			inst->vsi_core->dec.crc[3]);
   456	
   457		mtk_vcodec_debug(inst, "c_crc: 0x%x 0x%x 0x%x 0x%x",
   458			inst->vsi_core->dec.crc[4],
   459			inst->vsi_core->dec.crc[5],
   460			inst->vsi_core->dec.crc[6],
   461			inst->vsi_core->dec.crc[7]);
   462	
   463	vdec_dec_end:
   464		vdec_msg_queue_update_ube_rptr(&lat_buf->ctx->msg_queue,
   465			inst->vsi_core->trans_end);
   466		ctx->dev->vdec_pdata->cap_to_disp(ctx, fb, dec_err);
   467		mtk_vcodec_debug(inst, "core decode done err=%d", err);
   468		ctx->decoded_frame_cnt++;
   469	
   470		return 0;
   471	}
   472	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29512 bytes --]

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

only message in thread, other threads:[~2021-04-20 22:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 22:31 [chrome-os:chromeos-5.4 54/243] drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_lat_if.c:388:27: sparse: sparse: non size-preserving pointer to integer cast 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.