Re: [PATCH v3 3/3] media: vcodec: rockchip: Add Rockchip VP8 decoder driver

From: kbuild test robot
Date: Tue Mar 01 2016 - 01:05:35 EST


Hi Jung,

[auto build test ERROR on sailus-media/master]
[also build test ERROR on v4.5-rc6 next-20160229]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Jung-Zhao/Add-Rockchip-VP8-Video-Decoder-Driver/20160301-103522
base: git://linuxtv.org/media_tree.git master
config: x86_64-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

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

drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_run_done':
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:184:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct vb2_buffer *src = &ctx->run.src->b.vb2_buf;
^
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:187:25: error: 'struct vb2_v4l2_buffer' has no member named 'timestamp'
to_vb2_v4l2_buffer(dst)->timestamp =
^
drivers/media/platform/rockchip-vpu/rockchip_vpu.c:188:26: error: 'struct vb2_v4l2_buffer' has no member named 'timestamp'
to_vb2_v4l2_buffer(src)->timestamp;
^
drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_ctrls_setup':
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:263:7: error: 'struct v4l2_ctrl_config' has no member named 'max_reqs'
cfg.max_reqs = controls[i].max_reqs;
^
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:314:28: error: 'V4L2_CTRL_FLAG_REQ_KEEP' undeclared (first use in this function)
ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_REQ_KEEP;
^
drivers/media/platform/rockchip-vpu/rockchip_vpu.c:314:28: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_open':
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:396:3: error: 'struct vb2_queue' has no member named 'v4l2_allow_requests'
q->v4l2_allow_requests = true;
^
drivers/media/platform/rockchip-vpu/rockchip_vpu.c:418:3: error: 'struct vb2_queue' has no member named 'v4l2_allow_requests'
q->v4l2_allow_requests = true;
^
drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_probe':
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:613:15: error: 'DMA_ATTR_ALLOC_SINGLE_PAGES' undeclared (first use in this function)
dma_set_attr(DMA_ATTR_ALLOC_SINGLE_PAGES, &attrs_novm);
^
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:616:19: error: implicit declaration of function 'vb2_dma_contig_init_ctx_attrs' [-Werror=implicit-function-declaration]
vpu->alloc_ctx = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
^
>> drivers/media/platform/rockchip-vpu/rockchip_vpu.c:616:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
vpu->alloc_ctx = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
^
drivers/media/platform/rockchip-vpu/rockchip_vpu.c:624:20: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
vpu->alloc_ctx_vm = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
^
cc1: some warnings being treated as errors
--
>> drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:938:17: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.queue_setup = rockchip_vpu_queue_setup,
^
drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:938:17: note: (near initialization for 'rockchip_vpu_dec_qops.queue_setup')
drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c: In function 'rockchip_vpu_dec_prepare_run':
>> drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:964:2: error: implicit declaration of function 'v4l2_ctrl_apply_request' [-Werror=implicit-function-declaration]
v4l2_ctrl_apply_request(&ctx->ctrl_handler, src->request);
^
>> drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:964:49: error: 'struct vb2_v4l2_buffer' has no member named 'request'
v4l2_ctrl_apply_request(&ctx->ctrl_handler, src->request);
^
cc1: some warnings being treated as errors
--
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/linux/list.h:8,
from include/linux/mm_types.h:7,
from include/media/videobuf2-core.h:15,
from drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.h:20,
from drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c:26:
drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c: In function 'rockchip_vp8d_dump_hdr':
>> include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
include/linux/printk.h:252:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
>> drivers/media/platform/rockchip-vpu/rockchip_vpu_common.h:354:4: note: in expansion of macro 'pr_err'
pr_err("%s:%d: " fmt, \
^
>> drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c:99:2: note: in expansion of macro 'vpu_debug'
vpu_debug(4, "Addresses: segmap=0x%x, probs=0x%x\n",
^
include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
include/linux/printk.h:252:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
>> drivers/media/platform/rockchip-vpu/rockchip_vpu_common.h:354:4: note: in expansion of macro 'pr_err'
pr_err("%s:%d: " fmt, \
^
>> drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c:99:2: note: in expansion of macro 'vpu_debug'
vpu_debug(4, "Addresses: segmap=0x%x, probs=0x%x\n",
^
--
/kbuild/src/sparse/include/linux/compiler.h:228:8: sparse: attribute 'no_sanitize_address': unknown attribute
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:187:32: sparse: no member 'timestamp' in struct vb2_v4l2_buffer
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:263:28: sparse: no member 'max_reqs' in struct v4l2_ctrl_config
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:314:49: sparse: undefined identifier 'V4L2_CTRL_FLAG_REQ_KEEP'
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:396:10: sparse: no member 'v4l2_allow_requests' in struct vb2_queue
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:418:10: sparse: no member 'v4l2_allow_requests' in struct vb2_queue
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:613:22: sparse: undefined identifier 'DMA_ATTR_ALLOC_SINGLE_PAGES'
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:616:26: sparse: undefined identifier 'vb2_dma_contig_init_ctx_attrs'
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:623:22: sparse: undefined identifier 'DMA_ATTR_ALLOC_SINGLE_PAGES'
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:624:29: sparse: undefined identifier 'vb2_dma_contig_init_ctx_attrs'
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_run_done':
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:184:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct vb2_buffer *src = &ctx->run.src->b.vb2_buf;
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:187:25: error: 'struct vb2_v4l2_buffer' has no member named 'timestamp'
to_vb2_v4l2_buffer(dst)->timestamp =
^
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:188:26: error: 'struct vb2_v4l2_buffer' has no member named 'timestamp'
to_vb2_v4l2_buffer(src)->timestamp;
^
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_ctrls_setup':
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:263:7: error: 'struct v4l2_ctrl_config' has no member named 'max_reqs'
cfg.max_reqs = controls[i].max_reqs;
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:314:28: error: 'V4L2_CTRL_FLAG_REQ_KEEP' undeclared (first use in this function)
ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_REQ_KEEP;
^
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:314:28: note: each undeclared identifier is reported only once for each function it appears in
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_open':
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:396:3: error: 'struct vb2_queue' has no member named 'v4l2_allow_requests'
q->v4l2_allow_requests = true;
^
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:418:3: error: 'struct vb2_queue' has no member named 'v4l2_allow_requests'
q->v4l2_allow_requests = true;
^
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c: In function 'rockchip_vpu_probe':
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:613:15: error: 'DMA_ATTR_ALLOC_SINGLE_PAGES' undeclared (first use in this function)
dma_set_attr(DMA_ATTR_ALLOC_SINGLE_PAGES, &attrs_novm);
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:616:19: error: implicit declaration of function 'vb2_dma_contig_init_ctx_attrs' [-Werror=implicit-function-declaration]
vpu->alloc_ctx = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:616:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
vpu->alloc_ctx = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
^
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu.c:624:20: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
vpu->alloc_ctx_vm = vb2_dma_contig_init_ctx_attrs(&pdev->dev,
^
cc1: some warnings being treated as errors
--
/kbuild/src/sparse/include/linux/compiler.h:228:8: sparse: attribute 'no_sanitize_address': unknown attribute
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:964:9: sparse: undefined identifier 'v4l2_ctrl_apply_request'
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:938:17: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.queue_setup = rockchip_vpu_queue_setup,
^
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:938:17: note: (near initialization for 'rockchip_vpu_dec_qops.queue_setup')
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c: In function 'rockchip_vpu_dec_prepare_run':
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:964:2: error: implicit declaration of function 'v4l2_ctrl_apply_request' [-Werror=implicit-function-declaration]
v4l2_ctrl_apply_request(&ctx->ctrl_handler, src->request);
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_dec.c:964:49: error: 'struct vb2_v4l2_buffer' has no member named 'request'
v4l2_ctrl_apply_request(&ctx->ctrl_handler, src->request);
^
cc1: some warnings being treated as errors
--
/kbuild/src/sparse/include/linux/compiler.h:228:8: sparse: attribute 'no_sanitize_address': unknown attribute
In file included from /kbuild/src/sparse/include/linux/printk.h:6:0,
from /kbuild/src/sparse/include/linux/kernel.h:13,
from /kbuild/src/sparse/include/linux/list.h:8,
from /kbuild/src/sparse/include/linux/mm_types.h:7,
from /kbuild/src/sparse/include/media/videobuf2-core.h:15,
from /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_hw.h:20,
from /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c:26:
/kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c: In function 'rockchip_vp8d_dump_hdr':
>> /kbuild/src/sparse/include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
/kbuild/src/sparse/include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
/kbuild/src/sparse/include/linux/printk.h:252:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_common.h:354:4: note: in expansion of macro 'pr_err'
pr_err("%s:%d: " fmt, \
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c:99:2: note: in expansion of macro 'vpu_debug'
vpu_debug(4, "Addresses: segmap=0x%x, probs=0x%x\n",
^
/kbuild/src/sparse/include/linux/kern_levels.h:4:18: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
/kbuild/src/sparse/include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
/kbuild/src/sparse/include/linux/printk.h:252:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rockchip_vpu_common.h:354:4: note: in expansion of macro 'pr_err'
pr_err("%s:%d: " fmt, \
^
>> /kbuild/src/sparse/drivers/media/platform/rockchip-vpu/rkvpu_hw_vp8d.c:99:2: note: in expansion of macro 'vpu_debug'
vpu_debug(4, "Addresses: segmap=0x%x, probs=0x%x\n",
^

vim +187 drivers/media/platform/rockchip-vpu/rockchip_vpu.c

178
179 vpu_debug_enter();
180
181 if (ctx->run_ops->run_done)
182 ctx->run_ops->run_done(ctx, result);
183
> 184 struct vb2_buffer *src = &ctx->run.src->b.vb2_buf;
185 struct vb2_buffer *dst = &ctx->run.dst->b.vb2_buf;
186
> 187 to_vb2_v4l2_buffer(dst)->timestamp =
> 188 to_vb2_v4l2_buffer(src)->timestamp;
189 vb2_buffer_done(&ctx->run.src->b.vb2_buf, result);
190 vb2_buffer_done(&ctx->run.dst->b.vb2_buf, result);
191
192 dev->current_ctx = NULL;
193 wake_up_all(&dev->run_wq);
194
195 spin_lock_irqsave(&dev->irqlock, flags);
196
197 __rockchip_vpu_try_context_locked(dev, ctx);
198 clear_bit(VPU_RUNNING, &dev->state);
199
200 spin_unlock_irqrestore(&dev->irqlock, flags);
201
202 /* Try scheduling another run to see if we have anything left to do. */
203 rockchip_vpu_try_run(dev);
204
205 vpu_debug_leave();
206 }
207
208 void rockchip_vpu_try_context(struct rockchip_vpu_dev *dev,
209 struct rockchip_vpu_ctx *ctx)
210 {
211 unsigned long flags;
212
213 vpu_debug_enter();
214
215 spin_lock_irqsave(&dev->irqlock, flags);
216
217 __rockchip_vpu_try_context_locked(dev, ctx);
218
219 spin_unlock_irqrestore(&dev->irqlock, flags);
220
221 rockchip_vpu_try_run(dev);
222
223 vpu_debug_enter();
224 }
225
226 /*
227 * Control registration.
228 */
229
230 #define IS_VPU_PRIV(x) ((V4L2_CTRL_ID2WHICH(x) == V4L2_CTRL_CLASS_MPEG) && \
231 V4L2_CTRL_DRIVER_PRIV(x))
232
233 int rockchip_vpu_ctrls_setup(struct rockchip_vpu_ctx *ctx,
234 const struct v4l2_ctrl_ops *ctrl_ops,
235 struct rockchip_vpu_control *controls,
236 unsigned num_ctrls,
237 const char* const* (*get_menu)(u32))
238 {
239 struct v4l2_ctrl_config cfg;
240 int i;
241
242 if (num_ctrls > ARRAY_SIZE(ctx->ctrls)) {
243 vpu_err("context control array not large enough\n");
244 return -ENOSPC;
245 }
246
247 v4l2_ctrl_handler_init(&ctx->ctrl_handler, num_ctrls);
248 if (ctx->ctrl_handler.error) {
249 vpu_err("v4l2_ctrl_handler_init failed\n");
250 return ctx->ctrl_handler.error;
251 }
252
253 for (i = 0; i < num_ctrls; i++) {
254 if (IS_VPU_PRIV(controls[i].id)
255 || controls[i].id >= V4L2_CID_CUSTOM_BASE
256 || controls[i].type == V4L2_CTRL_TYPE_PRIVATE) {
257 memset(&cfg, 0, sizeof(struct v4l2_ctrl_config));
258
259 cfg.ops = ctrl_ops;
260 cfg.id = controls[i].id;
261 cfg.min = controls[i].minimum;
262 cfg.max = controls[i].maximum;
> 263 cfg.max_reqs = controls[i].max_reqs;
264 cfg.def = controls[i].default_value;
265 cfg.name = controls[i].name;
266 cfg.type = controls[i].type;
267 cfg.elem_size = controls[i].elem_size;
268 memcpy(cfg.dims, controls[i].dims, sizeof(cfg.dims));
269
270 if (cfg.type == V4L2_CTRL_TYPE_MENU) {
271 cfg.menu_skip_mask = cfg.menu_skip_mask;
272 cfg.qmenu = get_menu(cfg.id);
273 } else {
274 cfg.step = controls[i].step;
275 }
276
277 ctx->ctrls[i] = v4l2_ctrl_new_custom(
278 &ctx->ctrl_handler,
279 &cfg, NULL);
280 } else {
281 if (controls[i].type == V4L2_CTRL_TYPE_MENU) {
282 ctx->ctrls[i] =
283 v4l2_ctrl_new_std_menu
284 (&ctx->ctrl_handler,
285 ctrl_ops,
286 controls[i].id,
287 controls[i].maximum,
288 0,
289 controls[i].
290 default_value);
291 } else {
292 ctx->ctrls[i] =
293 v4l2_ctrl_new_std(&ctx->ctrl_handler,
294 ctrl_ops,
295 controls[i].id,
296 controls[i].minimum,
297 controls[i].maximum,
298 controls[i].step,
299 controls[i].
300 default_value);
301 }
302 }
303
304 if (ctx->ctrl_handler.error) {
305 vpu_err("Adding control (%d) failed\n", i);
306 return ctx->ctrl_handler.error;
307 }
308
309 if (controls[i].is_volatile && ctx->ctrls[i])
310 ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_VOLATILE;
311 if (controls[i].is_read_only && ctx->ctrls[i])
312 ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_READ_ONLY;
313 if (controls[i].can_store && ctx->ctrls[i])
> 314 ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_REQ_KEEP;
315 }
316
317 v4l2_ctrl_handler_setup(&ctx->ctrl_handler);

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data