[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210221116.yH9ySLGz-lkp@intel.com>
Date: Sat, 22 Oct 2022 11:36:10 +0800
From: kernel test robot <lkp@...el.com>
To: Sebastian Fricke <sebastian.fricke@...labora.com>,
linux-media@...r.kernel.org
Cc: kbuild-all@...ts.01.org, kernel@...labora.com,
nas.chung@...psnmedia.com, hverkuil@...all.nl,
ezequiel@...guardiasur.com.ar, linux-kernel@...r.kernel.org,
nicolas.dufresne@...labora.com, p.zabel@...gutronix.de,
dafna@...tmail.com
Subject: Re: [PATCH v10 4/7] media: chips-media: wave5: Add the v4l2 layer
Hi Sebastian,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on media-tree/master]
[also build test WARNING on sailus-media-tree/streams linus/master pza/reset/next v6.1-rc1 next-20221021]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sebastian-Fricke/Wave5-codec-driver/20221022-081029
base: git://linuxtv.org/media_tree.git master
patch link: https://lore.kernel.org/r/20221022000506.221933-5-sebastian.fricke%40collabora.com
patch subject: [PATCH v10 4/7] media: chips-media: wave5: Add the v4l2 layer
config: sh-allmodconfig
compiler: sh4-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/7a420dd4b39333ac2d5f80326e3dd401a3f09ffb
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Sebastian-Fricke/Wave5-codec-driver/20221022-081029
git checkout 7a420dd4b39333ac2d5f80326e3dd401a3f09ffb
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/media/platform/chips-media/wave5/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/pci.h:37,
from include/media/media-device.h:16,
from include/media/media-request.h:20,
from include/media/v4l2-ctrls.h:14,
from drivers/media/platform/chips-media/wave5/wave5-vpu.h:10,
from drivers/media/platform/chips-media/wave5/wave5-helper.h:11,
from drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:8:
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c: In function 'wave5_handle_bitstream_buffer':
>> drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:126:34: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
126 | "remaining size: %ld < source size: %ld for src buf (%d)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
146 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:125:25: note: in expansion of macro 'dev_warn'
125 | dev_warn(inst->dev->dev,
| ^~~~~~~~
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:126:53: note: format string is defined here
126 | "remaining size: %ld < source size: %ld for src buf (%d)\n",
| ~~^
| |
| long int
| %d
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:126:34: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
126 | "remaining size: %ld < source size: %ld for src buf (%d)\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:146:61: note: in expansion of macro 'dev_fmt'
146 | dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:125:25: note: in expansion of macro 'dev_warn'
125 | dev_warn(inst->dev->dev,
| ^~~~~~~~
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:126:72: note: format string is defined here
126 | "remaining size: %ld < source size: %ld for src buf (%d)\n",
| ~~^
| |
| long int
| %d
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c: In function 'wave5_vpu_dec_stop_streaming':
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c:1151:21: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1151 | int ret;
| ^~~
--
In file included from include/linux/printk.h:566,
from include/linux/kernel.h:29,
from drivers/media/platform/chips-media/wave5/wave5-vpu.c:7:
drivers/media/platform/chips-media/wave5/wave5-vpu.c: In function 'wave5_vpu_probe':
>> drivers/media/platform/chips-media/wave5/wave5-vpu.c:227:37: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
227 | dev_dbg(&pdev->dev, "%s: sram daddr: %pad, size: 0x%lx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:223:29: note: in definition of macro '__dynamic_func_call_cls'
223 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls'
249 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:272:9: note: in expansion of macro '_dynamic_func_call'
272 | _dynamic_func_call(fmt, __dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/media/platform/chips-media/wave5/wave5-vpu.c:227:17: note: in expansion of macro 'dev_dbg'
227 | dev_dbg(&pdev->dev, "%s: sram daddr: %pad, size: 0x%lx\n",
| ^~~~~~~
drivers/media/platform/chips-media/wave5/wave5-vpu.c:227:70: note: format string is defined here
227 | dev_dbg(&pdev->dev, "%s: sram daddr: %pad, size: 0x%lx\n",
| ~~^
| |
| long unsigned int
| %x
vim +126 drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
88
89 static void wave5_handle_bitstream_buffer(struct vpu_instance *inst)
90 {
91 struct v4l2_m2m_buffer *buf, *n;
92 int ret;
93
94 v4l2_m2m_for_each_src_buf_safe(inst->v4l2_fh.m2m_ctx, buf, n) {
95 struct vb2_v4l2_buffer *vbuf = &buf->vb;
96 struct vpu_buffer *vpu_buf = wave5_to_vpu_buf(vbuf);
97 size_t src_size = vb2_get_plane_payload(&vbuf->vb2_buf, 0);
98 void *src_buf = vb2_plane_vaddr(&vbuf->vb2_buf, 0);
99 dma_addr_t rd_ptr = 0;
100 dma_addr_t wr_ptr = 0;
101 size_t remain_size = 0;
102 size_t offset;
103
104 if (vpu_buf->consumed) {
105 dev_dbg(inst->dev->dev, "already consumed src buf (%d)\n",
106 vbuf->vb2_buf.index);
107 continue;
108 }
109
110 if (!src_buf) {
111 dev_warn(inst->dev->dev,
112 "Acquiring kernel pointer to src buf (%d), fail\n",
113 vbuf->vb2_buf.index);
114 continue;
115 }
116
117 ret = wave5_vpu_dec_get_bitstream_buffer(inst, &rd_ptr, &wr_ptr, &remain_size);
118 if (ret) {
119 dev_err(inst->dev->dev, "Getting the bitstream buffer, fail: %d\n",
120 ret);
121 return;
122 }
123
124 if (remain_size < src_size) {
125 dev_warn(inst->dev->dev,
> 126 "remaining size: %ld < source size: %ld for src buf (%d)\n",
127 remain_size, src_size, vbuf->vb2_buf.index);
128 continue;
129 }
130
131 offset = wr_ptr - inst->bitstream_vbuf.daddr;
132 if (wr_ptr + src_size > inst->bitstream_vbuf.daddr + inst->bitstream_vbuf.size) {
133 size_t size;
134
135 size = inst->bitstream_vbuf.daddr + inst->bitstream_vbuf.size - wr_ptr;
136 ret = wave5_vdi_write_memory(inst->dev, &inst->bitstream_vbuf, offset,
137 (u8 *)src_buf, size, VDI_128BIT_LITTLE_ENDIAN);
138 if (ret < 0) {
139 dev_warn(inst->dev->dev,
140 "1/2: write src buf (%d) into bitstream buf, fail: %d\n",
141 vbuf->vb2_buf.index, ret);
142 continue;
143 }
144 ret = wave5_vdi_write_memory(inst->dev, &inst->bitstream_vbuf, 0,
145 (u8 *)src_buf + size, src_size - size,
146 VDI_128BIT_LITTLE_ENDIAN);
147 if (ret < 0) {
148 dev_warn(inst->dev->dev,
149 "2/2: write src buf (%d) into bitstream buf, fail: %d\n",
150 vbuf->vb2_buf.index, ret);
151 continue;
152 }
153 } else {
154 ret = wave5_vdi_write_memory(inst->dev, &inst->bitstream_vbuf, offset,
155 (u8 *)src_buf, src_size,
156 VDI_128BIT_LITTLE_ENDIAN);
157 if (ret < 0) {
158 dev_warn(inst->dev->dev,
159 "Write src buf (%d) into bitstream buf, fail: %d",
160 vbuf->vb2_buf.index, ret);
161 continue;
162 }
163 }
164
165 ret = wave5_vpu_dec_update_bitstream_buffer(inst, src_size);
166 if (ret) {
167 dev_dbg(inst->dev->dev,
168 "vpu_dec_update_bitstream_buffer fail: %d for src buf (%d)\n",
169 ret, vbuf->vb2_buf.index);
170 continue;
171 }
172
173 vpu_buf->consumed = true;
174 }
175 }
176
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (244097 bytes)
Powered by blists - more mailing lists