tree: https://github.com/Kwiboo/linux-rockchip rockchip-5.1-v4l2-from-list-v5.1 head: c938ecee11ba338701cc348af5a58706fdd5c5d2 commit: ad850bb50945beb9f6e82e75093888deb07a267b [9/105] media: vb2: drop VB2_BUF_STATE_REQUEUEING config: riscv-allyesconfig (attached as .config) compiler: riscv64-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout ad850bb50945beb9f6e82e75093888deb07a267b # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=riscv If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/media//pci/cobalt/cobalt-irq.c: In function 'cobalt_dma_stream_queue_handler': >> drivers/media//pci/cobalt/cobalt-irq.c:131:4: error: 'VB2_BUF_STATE_REQUEUEING' undeclared (first use in this function); did you mean 'VB2_BUF_STATE_DEQUEUED'? VB2_BUF_STATE_REQUEUEING : VB2_BUF_STATE_DONE); ^~~~~~~~~~~~~~~~~~~~~~~~ VB2_BUF_STATE_DEQUEUED drivers/media//pci/cobalt/cobalt-irq.c:131:4: note: each undeclared identifier is reported only once for each function it appears in vim +131 drivers/media//pci/cobalt/cobalt-irq.c 85756a069 Hans Verkuil 2015-05-12 14 85756a069 Hans Verkuil 2015-05-12 15 static void cobalt_dma_stream_queue_handler(struct cobalt_stream *s) 85756a069 Hans Verkuil 2015-05-12 16 { 85756a069 Hans Verkuil 2015-05-12 17 struct cobalt *cobalt = s->cobalt; 85756a069 Hans Verkuil 2015-05-12 18 int rx = s->video_channel; c0ce6220a Hans Verkuil 2015-05-22 19 struct m00473_freewheel_regmap __iomem *fw = 85756a069 Hans Verkuil 2015-05-12 20 COBALT_CVI_FREEWHEEL(s->cobalt, rx); c0ce6220a Hans Verkuil 2015-05-22 21 struct m00233_video_measure_regmap __iomem *vmr = 85756a069 Hans Verkuil 2015-05-12 22 COBALT_CVI_VMR(s->cobalt, rx); c0ce6220a Hans Verkuil 2015-05-22 23 struct m00389_cvi_regmap __iomem *cvi = 85756a069 Hans Verkuil 2015-05-12 24 COBALT_CVI(s->cobalt, rx); c0ce6220a Hans Verkuil 2015-05-22 25 struct m00479_clk_loss_detector_regmap __iomem *clkloss = 85756a069 Hans Verkuil 2015-05-12 26 COBALT_CVI_CLK_LOSS(s->cobalt, rx); 85756a069 Hans Verkuil 2015-05-12 27 struct cobalt_buffer *cb; 85756a069 Hans Verkuil 2015-05-12 28 bool skip = false; 85756a069 Hans Verkuil 2015-05-12 29 85756a069 Hans Verkuil 2015-05-12 30 spin_lock(&s->irqlock); 85756a069 Hans Verkuil 2015-05-12 31 85756a069 Hans Verkuil 2015-05-12 32 if (list_empty(&s->bufs)) { 85756a069 Hans Verkuil 2015-05-12 33 pr_err("no buffers!\n"); 85756a069 Hans Verkuil 2015-05-12 34 spin_unlock(&s->irqlock); 85756a069 Hans Verkuil 2015-05-12 35 return; 85756a069 Hans Verkuil 2015-05-12 36 } 85756a069 Hans Verkuil 2015-05-12 37 85756a069 Hans Verkuil 2015-05-12 38 /* Give the fresh filled up buffer to the user. 85756a069 Hans Verkuil 2015-05-12 39 * Note that the interrupt is only sent if the DMA can continue 85756a069 Hans Verkuil 2015-05-12 40 * with a new buffer, so it is always safe to return this buffer 85756a069 Hans Verkuil 2015-05-12 41 * to userspace. */ 85756a069 Hans Verkuil 2015-05-12 42 cb = list_first_entry(&s->bufs, struct cobalt_buffer, list); 85756a069 Hans Verkuil 2015-05-12 43 list_del(&cb->list); 85756a069 Hans Verkuil 2015-05-12 44 spin_unlock(&s->irqlock); 85756a069 Hans Verkuil 2015-05-12 45 85756a069 Hans Verkuil 2015-05-12 46 if (s->is_audio || s->is_output) 85756a069 Hans Verkuil 2015-05-12 47 goto done; 85756a069 Hans Verkuil 2015-05-12 48 85756a069 Hans Verkuil 2015-05-12 49 if (s->unstable_frame) { c0ce6220a Hans Verkuil 2015-05-22 50 uint32_t stat = ioread32(&vmr->irq_status); 85756a069 Hans Verkuil 2015-05-12 51 c0ce6220a Hans Verkuil 2015-05-22 52 iowrite32(stat, &vmr->irq_status); c0ce6220a Hans Verkuil 2015-05-22 53 if (!(ioread32(&vmr->status) & c0ce6220a Hans Verkuil 2015-05-22 54 M00233_STATUS_BITMAP_INIT_DONE_MSK)) { 85756a069 Hans Verkuil 2015-05-12 55 cobalt_dbg(1, "!init_done\n"); 85756a069 Hans Verkuil 2015-05-12 56 if (s->enable_freewheel) 85756a069 Hans Verkuil 2015-05-12 57 goto restart_fw; 85756a069 Hans Verkuil 2015-05-12 58 goto done; 85756a069 Hans Verkuil 2015-05-12 59 } 85756a069 Hans Verkuil 2015-05-12 60 c0ce6220a Hans Verkuil 2015-05-22 61 if (ioread32(&clkloss->status) & c0ce6220a Hans Verkuil 2015-05-22 62 M00479_STATUS_BITMAP_CLOCK_MISSING_MSK) { c0ce6220a Hans Verkuil 2015-05-22 63 iowrite32(0, &clkloss->ctrl); c0ce6220a Hans Verkuil 2015-05-22 64 iowrite32(M00479_CTRL_BITMAP_ENABLE_MSK, &clkloss->ctrl); 85756a069 Hans Verkuil 2015-05-12 65 cobalt_dbg(1, "no clock\n"); 85756a069 Hans Verkuil 2015-05-12 66 if (s->enable_freewheel) 85756a069 Hans Verkuil 2015-05-12 67 goto restart_fw; 85756a069 Hans Verkuil 2015-05-12 68 goto done; 85756a069 Hans Verkuil 2015-05-12 69 } 85756a069 Hans Verkuil 2015-05-12 70 if ((stat & (M00233_IRQ_STATUS_BITMAP_VACTIVE_AREA_MSK | 85756a069 Hans Verkuil 2015-05-12 71 M00233_IRQ_STATUS_BITMAP_HACTIVE_AREA_MSK)) || c0ce6220a Hans Verkuil 2015-05-22 72 ioread32(&vmr->vactive_area) != s->timings.bt.height || c0ce6220a Hans Verkuil 2015-05-22 73 ioread32(&vmr->hactive_area) != s->timings.bt.width) { 85756a069 Hans Verkuil 2015-05-12 74 cobalt_dbg(1, "unstable\n"); 85756a069 Hans Verkuil 2015-05-12 75 if (s->enable_freewheel) 85756a069 Hans Verkuil 2015-05-12 76 goto restart_fw; 85756a069 Hans Verkuil 2015-05-12 77 goto done; 85756a069 Hans Verkuil 2015-05-12 78 } 85756a069 Hans Verkuil 2015-05-12 79 if (!s->enable_cvi) { 85756a069 Hans Verkuil 2015-05-12 80 s->enable_cvi = true; c0ce6220a Hans Verkuil 2015-05-22 81 iowrite32(M00389_CONTROL_BITMAP_ENABLE_MSK, &cvi->control); 85756a069 Hans Verkuil 2015-05-12 82 goto done; 85756a069 Hans Verkuil 2015-05-12 83 } c0ce6220a Hans Verkuil 2015-05-22 84 if (!(ioread32(&cvi->status) & M00389_STATUS_BITMAP_LOCK_MSK)) { 85756a069 Hans Verkuil 2015-05-12 85 cobalt_dbg(1, "cvi no lock\n"); 85756a069 Hans Verkuil 2015-05-12 86 if (s->enable_freewheel) 85756a069 Hans Verkuil 2015-05-12 87 goto restart_fw; 85756a069 Hans Verkuil 2015-05-12 88 goto done; 85756a069 Hans Verkuil 2015-05-12 89 } 85756a069 Hans Verkuil 2015-05-12 90 if (!s->enable_freewheel) { 85756a069 Hans Verkuil 2015-05-12 91 cobalt_dbg(1, "stable\n"); 85756a069 Hans Verkuil 2015-05-12 92 s->enable_freewheel = true; c0ce6220a Hans Verkuil 2015-05-22 93 iowrite32(0, &fw->ctrl); 85756a069 Hans Verkuil 2015-05-12 94 goto done; 85756a069 Hans Verkuil 2015-05-12 95 } 85756a069 Hans Verkuil 2015-05-12 96 cobalt_dbg(1, "enabled fw\n"); c0ce6220a Hans Verkuil 2015-05-22 97 iowrite32(M00233_CONTROL_BITMAP_ENABLE_MEASURE_MSK | c0ce6220a Hans Verkuil 2015-05-22 98 M00233_CONTROL_BITMAP_ENABLE_INTERRUPT_MSK, c0ce6220a Hans Verkuil 2015-05-22 99 &vmr->control); c0ce6220a Hans Verkuil 2015-05-22 100 iowrite32(M00473_CTRL_BITMAP_ENABLE_MSK, &fw->ctrl); 85756a069 Hans Verkuil 2015-05-12 101 s->enable_freewheel = false; 85756a069 Hans Verkuil 2015-05-12 102 s->unstable_frame = false; 85756a069 Hans Verkuil 2015-05-12 103 s->skip_first_frames = 2; 85756a069 Hans Verkuil 2015-05-12 104 skip = true; 85756a069 Hans Verkuil 2015-05-12 105 goto done; 85756a069 Hans Verkuil 2015-05-12 106 } c0ce6220a Hans Verkuil 2015-05-22 107 if (ioread32(&fw->status) & M00473_STATUS_BITMAP_FREEWHEEL_MODE_MSK) { 85756a069 Hans Verkuil 2015-05-12 108 restart_fw: 85756a069 Hans Verkuil 2015-05-12 109 cobalt_dbg(1, "lost lock\n"); c0ce6220a Hans Verkuil 2015-05-22 110 iowrite32(M00233_CONTROL_BITMAP_ENABLE_MEASURE_MSK, c0ce6220a Hans Verkuil 2015-05-22 111 &vmr->control); c0ce6220a Hans Verkuil 2015-05-22 112 iowrite32(M00473_CTRL_BITMAP_ENABLE_MSK | c0ce6220a Hans Verkuil 2015-05-22 113 M00473_CTRL_BITMAP_FORCE_FREEWHEEL_MODE_MSK, c0ce6220a Hans Verkuil 2015-05-22 114 &fw->ctrl); c0ce6220a Hans Verkuil 2015-05-22 115 iowrite32(0, &cvi->control); 85756a069 Hans Verkuil 2015-05-12 116 s->unstable_frame = true; 85756a069 Hans Verkuil 2015-05-12 117 s->enable_freewheel = false; 85756a069 Hans Verkuil 2015-05-12 118 s->enable_cvi = false; 85756a069 Hans Verkuil 2015-05-12 119 } 85756a069 Hans Verkuil 2015-05-12 120 done: 85756a069 Hans Verkuil 2015-05-12 121 if (s->skip_first_frames) { 85756a069 Hans Verkuil 2015-05-12 122 skip = true; 85756a069 Hans Verkuil 2015-05-12 123 s->skip_first_frames--; 85756a069 Hans Verkuil 2015-05-12 124 } d6dd645ea Junghak Sung 2015-11-03 125 cb->vb.vb2_buf.timestamp = ktime_get_ns(); 85756a069 Hans Verkuil 2015-05-12 126 /* TODO: the sequence number should be read from the FPGA so we 85756a069 Hans Verkuil 2015-05-12 127 also know about dropped frames. */ 2d7007153 Junghak Sung 2015-09-22 128 cb->vb.sequence = s->sequence++; 2d7007153 Junghak Sung 2015-09-22 129 vb2_buffer_done(&cb->vb.vb2_buf, 2d7007153 Junghak Sung 2015-09-22 130 (skip || s->unstable_frame) ? 6d058c564 Sakari Ailus 2015-07-03 @131 VB2_BUF_STATE_REQUEUEING : VB2_BUF_STATE_DONE); 85756a069 Hans Verkuil 2015-05-12 132 } 85756a069 Hans Verkuil 2015-05-12 133 :::::: The code at line 131 was first introduced by commit :::::: 6d058c5643e16779ae4c001d2e893c140940e48f [media] vb2: Only requeue buffers immediately once streaming is started :::::: TO: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> :::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip