linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: sidraya.bj@pathpartnertech.com, gregkh@linuxfoundation.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, prashanth.ka@pathpartnertech.com,
	praneeth@ti.com, mchehab@kernel.org, linux-media@vger.kernel.org,
	praveen.ap@pathpartnertech.com,
	Sidraya <sidraya.bj@pathpartnertech.com>
Subject: Re: [PATCH 28/30] IMG DEC V4L2 Interface function implementations
Date: Thu, 19 Aug 2021 03:22:23 +0800	[thread overview]
Message-ID: <202108190344.r6sgymao-lkp@intel.com> (raw)
In-Reply-To: <20210818141037.19990-29-sidraya.bj@pathpartnertech.com>

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

Hi,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on staging/staging-testing driver-core/driver-core-testing linus/master v5.14-rc6 next-20210818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
base:   git://linuxtv.org/media_tree.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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
        # https://github.com/0day-ci/linux/commit/ed83bf9b395e58893b5d92675196aee8f619efc9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
        git checkout ed83bf9b395e58893b5d92675196aee8f619efc9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k 

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

All error/warnings (new ones prefixed by >>):

   drivers/staging/media/vxd/decoder/vxd_core.c: In function 'stream_worker':
>> drivers/staging/media/vxd/decoder/vxd_core.c:549:25: warning: variable 'vxd' set but not used [-Wunused-but-set-variable]
     549 |         struct vxd_dev *vxd = NULL;
         |                         ^~~
--
   drivers/staging/media/vxd/decoder/vxd_v4l2.c: In function 'vxd_dec_buf_prepare':
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:712:36: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
     712 |                         new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
         |                                    ^~~~~~~~~~~~
         |                                    pfn_to_page
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:712:34: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     712 |                         new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
         |                                  ^
>> drivers/staging/media/vxd/decoder/vxd_v4l2.c:618:13: warning: variable 'pages' set but not used [-Wunused-but-set-variable]
     618 |         int pages;
         |             ^~~~~
   In file included from drivers/staging/media/vxd/decoder/vxd_props.h:19,
                    from drivers/staging/media/vxd/decoder/decoder.h:29,
                    from drivers/staging/media/vxd/decoder/core.h:20,
                    from drivers/staging/media/vxd/decoder/vxd_v4l2.c:52:
   At top level:
   drivers/staging/media/vxd/common/imgmmu.h:65:28: warning: 'VIRT_DIR_IDX_MASK' defined but not used [-Wunused-const-variable=]
      65 | static const unsigned long VIRT_DIR_IDX_MASK = (~((1 << MMU_DIR_SHIFT) - 1));
         |                            ^~~~~~~~~~~~~~~~~
   drivers/staging/media/vxd/common/imgmmu.h:62:28: warning: 'VIRT_PAGE_TBL_MASK' defined but not used [-Wunused-const-variable=]
      62 | static const unsigned long VIRT_PAGE_TBL_MASK =
         |                            ^~~~~~~~~~~~~~~~~~
   drivers/staging/media/vxd/common/imgmmu.h:60:28: warning: 'VIRT_PAGE_OFF_MASK' defined but not used [-Wunused-const-variable=]
      60 | static const unsigned long VIRT_PAGE_OFF_MASK = ((1 << MMU_PAGE_SHIFT) - 1);
         |                            ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/staging/media/vxd/decoder/hevc_secure_parser.c: In function 'bspp_hevc_parse_vps':
>> drivers/staging/media/vxd/decoder/hevc_secure_parser.c:594:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     594 | }
         | ^


vim +712 drivers/staging/media/vxd/decoder/vxd_v4l2.c

   604	
   605	static int vxd_dec_buf_prepare(struct vb2_buffer *vb)
   606	{
   607		struct vxd_dec_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
   608		struct device *dev = ctx->dev->dev;
   609		struct vxd_dec_q_data *q_data;
   610		void *sgt;
   611	#ifdef CAPTURE_CONTIG_ALLOC
   612		struct page *new_page;
   613	#else
   614		void *sgl;
   615	#endif
   616		struct sg_table *sgt_new;
   617		void *sgl_new;
 > 618		int pages;
   619		int nents = 0;
   620		int size = 0;
   621		int plane, num_planes, ret = 0;
   622		struct vxd_buffer *buf =
   623			container_of(vb, struct vxd_buffer, buffer.vb.vb2_buf);
   624	
   625		q_data = get_q_data(ctx, vb->vb2_queue->type);
   626		if (!q_data)
   627			return -EINVAL;
   628	
   629		num_planes = q_data->fmt->num_planes;
   630	
   631		for (plane = 0; plane < num_planes; plane++) {
   632			if (vb2_plane_size(vb, plane) < q_data->size_image[plane]) {
   633				dev_err(dev, "data will not fit into plane (%lu < %lu)\n",
   634					vb2_plane_size(vb, plane),
   635					(long)q_data->size_image[plane]);
   636				return -EINVAL;
   637			}
   638		}
   639	
   640		if (buf->mapped)
   641			return 0;
   642	
   643		buf->buf_info.cpu_linear_addr = vb2_plane_vaddr(vb, 0);
   644		buf->buf_info.buf_size = vb2_plane_size(vb, 0);
   645		buf->buf_info.fd = -1;
   646		sgt = vb2_dma_sg_plane_desc(vb, 0);
   647		if (!sgt) {
   648			dev_err(dev, "Could not get sg_table from plane 0\n");
   649			return -EINVAL;
   650		}
   651	
   652		if (V4L2_TYPE_IS_OUTPUT(vb->type)) {
   653			ret = core_stream_map_buf_sg(ctx->res_str_id,
   654						     VDEC_BUFTYPE_BITSTREAM,
   655						     &buf->buf_info, sgt,
   656						     &buf->buf_map_id);
   657			if (ret) {
   658				dev_err(dev, "OUTPUT core_stream_map_buf_sg failed\n");
   659				return ret;
   660			}
   661	
   662			buf->bstr_info.buf_size = q_data->size_image[0];
   663			buf->bstr_info.cpu_virt_addr = buf->buf_info.cpu_linear_addr;
   664			buf->bstr_info.mem_attrib =
   665				SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE |
   666				SYS_MEMATTRIB_INPUT | SYS_MEMATTRIB_CPU_WRITE;
   667			buf->bstr_info.bufmap_id = buf->buf_map_id;
   668			lst_init(&buf->seq_unit.bstr_seg_list);
   669			lst_init(&buf->pic_unit.bstr_seg_list);
   670			lst_init(&buf->end_unit.bstr_seg_list);
   671	
   672			list_add_tail(&buf->list, &ctx->out_buffers);
   673		} else {
   674			/* Create a single sgt from the plane(s) */
   675			sgt_new = kmalloc(sizeof(*sgt_new), GFP_KERNEL);
   676			if (!sgt_new)
   677				return -EINVAL;
   678	
   679			for (plane = 0; plane < num_planes; plane++) {
   680				size += ALIGN(vb2_plane_size(vb, plane), PAGE_SIZE);
   681				sgt = vb2_dma_sg_plane_desc(vb, plane);
   682				if (!sgt) {
   683					dev_err(dev, "Could not get sg_table from plane %d\n", plane);
   684					kfree(sgt_new);
   685					return -EINVAL;
   686				}
   687	#ifdef CAPTURE_CONTIG_ALLOC
   688				nents += 1;
   689	#else
   690				nents += sg_nents(img_mmu_get_sgl(sgt));
   691	#endif
   692			}
   693			buf->buf_info.buf_size = size;
   694	
   695			pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
   696			ret = sg_alloc_table(sgt_new, nents, GFP_KERNEL);
   697			if (ret) {
   698				kfree(sgt_new);
   699				return -EINVAL;
   700			}
   701			sgl_new = img_mmu_get_sgl(sgt_new);
   702	
   703			for (plane = 0; plane < num_planes; plane++) {
   704				sgt = vb2_dma_sg_plane_desc(vb, plane);
   705				if (!sgt) {
   706					dev_err(dev, "Could not get sg_table from plane %d\n", plane);
   707					sg_free_table(sgt_new);
   708					kfree(sgt_new);
   709					return -EINVAL;
   710				}
   711	#ifdef CAPTURE_CONTIG_ALLOC
 > 712				new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
   713				sg_set_page(sgl_new, new_page, ALIGN(vb2_plane_size(vb, plane),
   714								     PAGE_SIZE), 0);
   715				sgl_new = sg_next(sgl_new);
   716	#else
   717				sgl = img_mmu_get_sgl(sgt);
   718	
   719				while (sgl) {
   720					sg_set_page(sgl_new, sg_page(sgl), img_mmu_get_sgl_length(sgl), 0);
   721					sgl = sg_next(sgl);
   722					sgl_new = sg_next(sgl_new);
   723				}
   724	#endif
   725			}
   726	
   727			buf->buf_info.pictbuf_cfg = ctx->pict_bufcfg;
   728			ret = core_stream_map_buf_sg(ctx->res_str_id,
   729						     VDEC_BUFTYPE_PICTURE,
   730						     &buf->buf_info, sgt_new,
   731						     &buf->buf_map_id);
   732			sg_free_table(sgt_new);
   733			kfree(sgt_new);
   734			if (ret) {
   735				dev_err(dev, "CAPTURE core_stream_map_buf_sg failed\n");
   736				return ret;
   737			}
   738			list_add_tail(&buf->list, &ctx->cap_buffers);
   739		}
   740		buf->mapped = TRUE;
   741		buf->reuse = TRUE;
   742	
   743		return 0;
   744	}
   745	

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

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

  reply	other threads:[~2021-08-18 19:23 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 14:10 [PATCH 00/30] TI Video Decoder driver upstreaming to v5.14-rc6 kernel sidraya.bj
2021-08-18 14:10 ` [PATCH 01/30] dt-bindings: Add binding for img,d5500-vxd for DRA8x sidraya.bj
2021-08-18 14:10 ` [PATCH 02/30] v4l: vxd-dec: Create mmu programming helper library sidraya.bj
2021-08-18 14:37   ` Greg KH
2021-08-18 14:10 ` [PATCH 03/30] v4l: vxd-dec: Create vxd_dec Mem Manager " sidraya.bj
2021-08-24 13:34   ` Dan Carpenter
2021-09-14  3:40     ` Sidraya Jayagond
2021-09-14  4:35       ` Greg KH
2021-09-20 18:07         ` Sidraya Jayagond
2021-08-18 14:10 ` [PATCH 04/30] v4l: vxd-dec: Add vxd " sidraya.bj
2021-08-18 14:10 ` [PATCH 05/30] v4l: vxd-dec: Add IMG VXD Video Decoder mem to mem drive sidraya.bj
2021-08-18 14:10 ` [PATCH 06/30] v4l: vxd-dec: Add hardware control modules sidraya.bj
2021-08-18 14:10 ` [PATCH 07/30] v4l: vxd-dec: Add vxd core module sidraya.bj
2021-08-18 14:10 ` [PATCH 08/30] v4l: vxd-dec: Add translation control modules sidraya.bj
2021-08-18 14:10 ` [PATCH 09/30] v4l: vxd-dec: Add idgen api modules sidraya.bj
2021-08-24 14:00   ` Dan Carpenter
2021-09-14  4:24     ` Sidraya Jayagond
2021-08-18 14:10 ` [PATCH 10/30] v4l: vxd-dec: Add utility modules sidraya.bj
2021-08-18 14:10 ` [PATCH 11/30] v4l: vxd-dec: Add TALMMU module sidraya.bj
2021-08-18 14:10 ` [PATCH 12/30] v4l: vxd-dec: Add VDEC MMU wrapper sidraya.bj
2021-08-18 14:10 ` [PATCH 13/30] v4l: vxd-dec: Add Bistream Preparser (BSPP) module sidraya.bj
2021-08-18 14:10 ` [PATCH 14/30] v4l: vxd-dec: Add common headers sidraya.bj
2021-08-18 14:10 ` [PATCH 15/30] v4l: vxd-dec: Add firmware interface headers sidraya.bj
2021-08-18 14:10 ` [PATCH 16/30] v4l: vxd-dec: Add pool api modules sidraya.bj
2021-08-18 14:10 ` [PATCH 17/30] v4l: vxd-dec: This patch implements resource manage component sidraya.bj
2021-08-18 14:10 ` [PATCH 18/30] v4l: vxd-dec: This patch implements pixel processing library sidraya.bj
2021-08-18 14:10 ` [PATCH 19/30] v4l:vxd-dec:vdecdd utility library sidraya.bj
2021-08-18 14:10 ` [PATCH 20/30] v4l:vxd-dec:Decoder resource component sidraya.bj
2021-08-18 14:10 ` [PATCH 21/30] v4l:vxd-dec:Decoder Core Component sidraya.bj
2021-08-18 14:10 ` [PATCH 22/30] v4l:vxd-dec:vdecdd headers added sidraya.bj
2021-08-18 14:10 ` [PATCH 23/30] v4l:vxd-dec:Decoder Component sidraya.bj
2021-08-18 14:10 ` [PATCH 24/30] v4l:vxd-dec: Add resource manager sidraya.bj
2021-08-18 14:38   ` Greg KH
2021-08-18 14:10 ` [PATCH 25/30] v4l: videodev2: Add 10bit definitions for NV12 and NV16 color formats sidraya.bj
2021-08-24 16:14   ` Nicolas Dufresne
2021-08-18 14:10 ` [PATCH 26/30] media: Kconfig: Add Video decoder kconfig and Makefile entries sidraya.bj
2021-08-18 14:10 ` [PATCH 27/30] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile sidraya.bj
2021-08-18 18:24   ` kernel test robot
2021-08-19  5:59   ` kernel test robot
2021-08-18 14:10 ` [PATCH 28/30] IMG DEC V4L2 Interface function implementations sidraya.bj
2021-08-18 19:22   ` kernel test robot [this message]
2021-08-18 14:10 ` [PATCH 29/30] arm64: dts: dra82: Add v4l2 vxd_dec device node sidraya.bj
2021-08-18 16:44   ` Nishanth Menon
2021-08-18 14:10 ` [PATCH 30/30] ARM64: ti_sdk_arm64_release_defconfig: Enable d5520 video decoder driver sidraya.bj
2021-08-18 14:25   ` Bajjuri, Praneeth
2021-08-18 16:35   ` Nishanth Menon
2021-08-24 13:06 ` [PATCH 00/30] TI Video Decoder driver upstreaming to v5.14-rc6 kernel Hans Verkuil
2021-08-24 13:36 ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108190344.r6sgymao-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=praneeth@ti.com \
    --cc=prashanth.ka@pathpartnertech.com \
    --cc=praveen.ap@pathpartnertech.com \
    --cc=sidraya.bj@pathpartnertech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).