Hi Sidraya,
FYI, the error/warning still remains.
tree:
git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 52602e503dbacf8a5a30d8c8dde8a649210656bb
commit: 97dfdd999ba7266785579c99c40a3c65e63e864a [8683/9334] media: platform: vxd:
Kconfig: Add Video decoder Kconfig and Makefile
config: sh-allmodconfig
(
https://download.01.org/0day-ci/archive/20211217/202112172227.sgirAs67-lk...)
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 ti
git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 97dfdd999ba7266785579c99c40a3c65e63e864a
# 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/
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/vxe-vxd/decoder/vxd_v4l2.c: In function
'vxd_dec_buf_prepare':
> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:36: error:
implicit declaration of function 'phys_to_page'; did you mean
'pfn_to_page'? [-Werror=implicit-function-declaration]
714 |
new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^~~~~~~~~~~~
| pfn_to_page
drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:34: warning: assignment to
'struct page *' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
714 | new_page =
phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^
drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:620:13: warning: variable
'pages' set but not used [-Wunused-but-set-variable]
620 | int pages;
| ^~~~~
In file included from drivers/media/platform/vxe-vxd/decoder/vxd_props.h:19,
from drivers/media/platform/vxe-vxd/decoder/decoder.h:29,
from drivers/media/platform/vxe-vxd/decoder/core.h:20,
from drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:53:
At top level:
drivers/media/platform/vxe-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/media/platform/vxe-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/media/platform/vxe-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
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC &&
SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC
&& SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND &&
SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +714 drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c
cab68dd5406350 Sidraya 2021-11-02 606
cab68dd5406350 Sidraya 2021-11-02 607 static int vxd_dec_buf_prepare(struct vb2_buffer
*vb)
cab68dd5406350 Sidraya 2021-11-02 608 {
cab68dd5406350 Sidraya 2021-11-02 609 struct vxd_dec_ctx *ctx =
vb2_get_drv_priv(vb->vb2_queue);
cab68dd5406350 Sidraya 2021-11-02 610 struct device *dev = ctx->dev->dev;
cab68dd5406350 Sidraya 2021-11-02 611 struct vxd_dec_q_data *q_data;
cab68dd5406350 Sidraya 2021-11-02 612 void *sgt;
cab68dd5406350 Sidraya 2021-11-02 613 #ifdef CAPTURE_CONTIG_ALLOC
cab68dd5406350 Sidraya 2021-11-02 614 struct page *new_page;
cab68dd5406350 Sidraya 2021-11-02 615 #else
cab68dd5406350 Sidraya 2021-11-02 616 void *sgl;
cab68dd5406350 Sidraya 2021-11-02 617 #endif
cab68dd5406350 Sidraya 2021-11-02 618 struct sg_table *sgt_new;
cab68dd5406350 Sidraya 2021-11-02 619 void *sgl_new;
cab68dd5406350 Sidraya 2021-11-02 620 int pages;
cab68dd5406350 Sidraya 2021-11-02 621 int nents = 0;
cab68dd5406350 Sidraya 2021-11-02 622 int size = 0;
cab68dd5406350 Sidraya 2021-11-02 623 int plane, num_planes, ret = 0;
cab68dd5406350 Sidraya 2021-11-02 624 struct vxd_buffer *buf =
cab68dd5406350 Sidraya 2021-11-02 625 container_of(vb, struct vxd_buffer,
buffer.vb.vb2_buf);
cab68dd5406350 Sidraya 2021-11-02 626
cab68dd5406350 Sidraya 2021-11-02 627 q_data = get_q_data(ctx,
vb->vb2_queue->type);
cab68dd5406350 Sidraya 2021-11-02 628 if (!q_data)
cab68dd5406350 Sidraya 2021-11-02 629 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 630
cab68dd5406350 Sidraya 2021-11-02 631 num_planes = q_data->fmt->num_planes;
cab68dd5406350 Sidraya 2021-11-02 632
cab68dd5406350 Sidraya 2021-11-02 633 for (plane = 0; plane < num_planes; plane++)
{
cab68dd5406350 Sidraya 2021-11-02 634 if (vb2_plane_size(vb, plane) <
q_data->size_image[plane]) {
cab68dd5406350 Sidraya 2021-11-02 635 dev_err(dev, "data will not fit into plane
(%lu < %lu)\n",
cab68dd5406350 Sidraya 2021-11-02 636 vb2_plane_size(vb, plane),
cab68dd5406350 Sidraya 2021-11-02 637 (long)q_data->size_image[plane]);
cab68dd5406350 Sidraya 2021-11-02 638 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 639 }
cab68dd5406350 Sidraya 2021-11-02 640 }
cab68dd5406350 Sidraya 2021-11-02 641
cab68dd5406350 Sidraya 2021-11-02 642 if (buf->mapped)
cab68dd5406350 Sidraya 2021-11-02 643 return 0;
cab68dd5406350 Sidraya 2021-11-02 644
cab68dd5406350 Sidraya 2021-11-02 645 buf->buf_info.cpu_linear_addr =
vb2_plane_vaddr(vb, 0);
cab68dd5406350 Sidraya 2021-11-02 646 buf->buf_info.buf_size = vb2_plane_size(vb,
0);
cab68dd5406350 Sidraya 2021-11-02 647 buf->buf_info.fd = -1;
cab68dd5406350 Sidraya 2021-11-02 648 sgt = vb2_dma_sg_plane_desc(vb, 0);
cab68dd5406350 Sidraya 2021-11-02 649 if (!sgt) {
cab68dd5406350 Sidraya 2021-11-02 650 dev_err(dev, "Could not get sg_table from
plane 0\n");
cab68dd5406350 Sidraya 2021-11-02 651 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 652 }
cab68dd5406350 Sidraya 2021-11-02 653
cab68dd5406350 Sidraya 2021-11-02 654 if (V4L2_TYPE_IS_OUTPUT(vb->type)) {
cab68dd5406350 Sidraya 2021-11-02 655 ret =
core_stream_map_buf_sg(ctx->res_str_id,
cab68dd5406350 Sidraya 2021-11-02 656 VDEC_BUFTYPE_BITSTREAM,
cab68dd5406350 Sidraya 2021-11-02 657 &buf->buf_info, sgt,
cab68dd5406350 Sidraya 2021-11-02 658 &buf->buf_map_id);
cab68dd5406350 Sidraya 2021-11-02 659 if (ret) {
cab68dd5406350 Sidraya 2021-11-02 660 dev_err(dev, "OUTPUT
core_stream_map_buf_sg failed\n");
cab68dd5406350 Sidraya 2021-11-02 661 return ret;
cab68dd5406350 Sidraya 2021-11-02 662 }
cab68dd5406350 Sidraya 2021-11-02 663
cab68dd5406350 Sidraya 2021-11-02 664 buf->bstr_info.buf_size =
q_data->size_image[0];
cab68dd5406350 Sidraya 2021-11-02 665 buf->bstr_info.cpu_virt_addr =
buf->buf_info.cpu_linear_addr;
cab68dd5406350 Sidraya 2021-11-02 666 buf->bstr_info.mem_attrib =
cab68dd5406350 Sidraya 2021-11-02 667 SYS_MEMATTRIB_UNCACHED |
SYS_MEMATTRIB_WRITECOMBINE |
cab68dd5406350 Sidraya 2021-11-02 668 SYS_MEMATTRIB_INPUT | SYS_MEMATTRIB_CPU_WRITE;
cab68dd5406350 Sidraya 2021-11-02 669 buf->bstr_info.bufmap_id =
buf->buf_map_id;
cab68dd5406350 Sidraya 2021-11-02 670 lst_init(&buf->seq_unit.bstr_seg_list);
cab68dd5406350 Sidraya 2021-11-02 671 lst_init(&buf->pic_unit.bstr_seg_list);
cab68dd5406350 Sidraya 2021-11-02 672 lst_init(&buf->end_unit.bstr_seg_list);
cab68dd5406350 Sidraya 2021-11-02 673
cab68dd5406350 Sidraya 2021-11-02 674 list_add_tail(&buf->list,
&ctx->out_buffers);
cab68dd5406350 Sidraya 2021-11-02 675 } else {
cab68dd5406350 Sidraya 2021-11-02 676 /* Create a single sgt from the plane(s) */
cab68dd5406350 Sidraya 2021-11-02 677 sgt_new = kmalloc(sizeof(*sgt_new),
GFP_KERNEL);
cab68dd5406350 Sidraya 2021-11-02 678 if (!sgt_new)
cab68dd5406350 Sidraya 2021-11-02 679 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 680
cab68dd5406350 Sidraya 2021-11-02 681 for (plane = 0; plane < num_planes; plane++)
{
cab68dd5406350 Sidraya 2021-11-02 682 size += ALIGN(vb2_plane_size(vb, plane),
PAGE_SIZE);
cab68dd5406350 Sidraya 2021-11-02 683 sgt = vb2_dma_sg_plane_desc(vb, plane);
cab68dd5406350 Sidraya 2021-11-02 684 if (!sgt) {
cab68dd5406350 Sidraya 2021-11-02 685 dev_err(dev, "Could not get sg_table from
plane %d\n", plane);
cab68dd5406350 Sidraya 2021-11-02 686 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 687 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 688 }
cab68dd5406350 Sidraya 2021-11-02 689 #ifdef CAPTURE_CONTIG_ALLOC
cab68dd5406350 Sidraya 2021-11-02 690 nents += 1;
cab68dd5406350 Sidraya 2021-11-02 691 #else
cab68dd5406350 Sidraya 2021-11-02 692 nents += sg_nents(img_mmu_get_sgl(sgt));
cab68dd5406350 Sidraya 2021-11-02 693 #endif
cab68dd5406350 Sidraya 2021-11-02 694 }
cab68dd5406350 Sidraya 2021-11-02 695 buf->buf_info.buf_size = size;
cab68dd5406350 Sidraya 2021-11-02 696
cab68dd5406350 Sidraya 2021-11-02 697 pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
cab68dd5406350 Sidraya 2021-11-02 698 ret = sg_alloc_table(sgt_new, nents,
GFP_KERNEL);
cab68dd5406350 Sidraya 2021-11-02 699 if (ret) {
cab68dd5406350 Sidraya 2021-11-02 700 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 701 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 702 }
cab68dd5406350 Sidraya 2021-11-02 703 sgl_new = img_mmu_get_sgl(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 704
cab68dd5406350 Sidraya 2021-11-02 705 for (plane = 0; plane < num_planes; plane++)
{
cab68dd5406350 Sidraya 2021-11-02 706 sgt = vb2_dma_sg_plane_desc(vb, plane);
cab68dd5406350 Sidraya 2021-11-02 707 if (!sgt) {
cab68dd5406350 Sidraya 2021-11-02 708 dev_err(dev, "Could not get sg_table from
plane %d\n", plane);
cab68dd5406350 Sidraya 2021-11-02 709 sg_free_table(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 710 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 711 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 712 }
cab68dd5406350 Sidraya 2021-11-02 713 #ifdef CAPTURE_CONTIG_ALLOC
cab68dd5406350 Sidraya 2021-11-02 @714 new_page =
phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
cab68dd5406350 Sidraya 2021-11-02 715 sg_set_page(sgl_new, new_page,
ALIGN(vb2_plane_size(vb, plane),
cab68dd5406350 Sidraya 2021-11-02 716 PAGE_SIZE), 0);
cab68dd5406350 Sidraya 2021-11-02 717 sgl_new = sg_next(sgl_new);
cab68dd5406350 Sidraya 2021-11-02 718 #else
cab68dd5406350 Sidraya 2021-11-02 719 sgl = img_mmu_get_sgl(sgt);
cab68dd5406350 Sidraya 2021-11-02 720
cab68dd5406350 Sidraya 2021-11-02 721 while (sgl) {
cab68dd5406350 Sidraya 2021-11-02 722 sg_set_page(sgl_new, sg_page(sgl),
img_mmu_get_sgl_length(sgl), 0);
cab68dd5406350 Sidraya 2021-11-02 723 sgl = sg_next(sgl);
cab68dd5406350 Sidraya 2021-11-02 724 sgl_new = sg_next(sgl_new);
cab68dd5406350 Sidraya 2021-11-02 725 }
cab68dd5406350 Sidraya 2021-11-02 726 #endif
cab68dd5406350 Sidraya 2021-11-02 727 }
cab68dd5406350 Sidraya 2021-11-02 728
cab68dd5406350 Sidraya 2021-11-02 729 buf->buf_info.pictbuf_cfg =
ctx->pict_bufcfg;
cab68dd5406350 Sidraya 2021-11-02 730 ret =
core_stream_map_buf_sg(ctx->res_str_id,
cab68dd5406350 Sidraya 2021-11-02 731 VDEC_BUFTYPE_PICTURE,
cab68dd5406350 Sidraya 2021-11-02 732 &buf->buf_info, sgt_new,
cab68dd5406350 Sidraya 2021-11-02 733 &buf->buf_map_id);
cab68dd5406350 Sidraya 2021-11-02 734 sg_free_table(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 735 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 736 if (ret) {
cab68dd5406350 Sidraya 2021-11-02 737 dev_err(dev, "CAPTURE
core_stream_map_buf_sg failed\n");
cab68dd5406350 Sidraya 2021-11-02 738 return ret;
cab68dd5406350 Sidraya 2021-11-02 739 }
cab68dd5406350 Sidraya 2021-11-02 740 list_add_tail(&buf->list,
&ctx->cap_buffers);
cab68dd5406350 Sidraya 2021-11-02 741 }
cab68dd5406350 Sidraya 2021-11-02 742 buf->mapped = TRUE;
cab68dd5406350 Sidraya 2021-11-02 743 buf->reuse = TRUE;
cab68dd5406350 Sidraya 2021-11-02 744
cab68dd5406350 Sidraya 2021-11-02 745 return 0;
cab68dd5406350 Sidraya 2021-11-02 746 }
cab68dd5406350 Sidraya 2021-11-02 747
:::::: The code at line 714 was first introduced by commit
:::::: cab68dd5406350efd2567bed47586c0a82940f40 v4l: Add V4L2 Interface function
implementations
:::::: TO: Sidraya <sidraya.bj(a)pathpartnertech.com>
:::::: CC: Praneeth Bajjuri <praneeth(a)ti.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org