Hi Gustavo,

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.12-rc5 next-20170616]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Gustavo-Padovan/vb2-add-explicit-fence-user-API/20170618-210740
base:   git://linuxtv.org/media_tree.git master
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

   drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c: In function 
'atomisp_qbuf':
>> drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c:1297:10: error: 
>> 'struct v4l2_buffer' has no member named 'reserved2'; did you mean 
>> 'reserved'?
         (buf->reserved2 & ATOMISP_BUFFER_HAS_PER_FRAME_SETTING)) {
             ^~
   drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c:1299:50: error: 
'struct v4l2_buffer' has no member named 'reserved2'; did you mean 'reserved'?
      pipe->frame_request_config_id[buf->index] = buf->reserved2 &
                                                     ^~
   drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c: In function 
'atomisp_dqbuf':
   drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c:1483:5: error: 
'struct v4l2_buffer' has no member named 'reserved2'; did you mean 'reserved'?
     buf->reserved2 = pipe->frame_config_id[buf->index];
        ^~
   In file included from include/linux/printk.h:329:0,
                    from include/linux/kernel.h:13,
                    from include/linux/delay.h:21,
                    from 
drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c:24:
   drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c:1488:6: error: 
'struct v4l2_buffer' has no member named 'reserved2'; did you mean 'reserved'?
      buf->reserved2);
         ^
   include/linux/dynamic_debug.h:135:9: note: in definition of macro 
'dynamic_dev_dbg'
          ##__VA_ARGS__);  \
            ^~~~~~~~~~~
>> drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c:1486:2: note: in 
>> expansion of macro 'dev_dbg'
     dev_dbg(isp->dev, "dqbuf buffer %d (%s) for asd%d with exp_id %d, 
isp_config_id %d\n",
     ^~~~~~~
   drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c: At top level:
>> cc1: warning: unrecognized command line option '-Wno-implicit-fallthrough'
--
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c: In function 
'atomisp_qbuf':
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:1297:10: error: 
'struct v4l2_buffer' has no member named 'reserved2'; did you mean 'reserved'?
         (buf->reserved2 & ATOMISP_BUFFER_HAS_PER_FRAME_SETTING)) {
             ^~
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:1299:50: error: 
'struct v4l2_buffer' has no member named 'reserved2'; did you mean 'reserved'?
      pipe->frame_request_config_id[buf->index] = buf->reserved2 &
                                                     ^~
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c: In function 
'atomisp_dqbuf':
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:1483:5: error: 
'struct v4l2_buffer' has no member named 'reserved2'; did you mean 'reserved'?
     buf->reserved2 = pipe->frame_config_id[buf->index];
        ^~
   In file included from include/linux/printk.h:329:0,
                    from include/linux/kernel.h:13,
                    from include/linux/delay.h:21,
                    from 
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:24:
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:1488:6: error: 
'struct v4l2_buffer' has no member named 'reserved2'; did you mean 'reserved'?
      buf->reserved2);
         ^
   include/linux/dynamic_debug.h:135:9: note: in definition of macro 
'dynamic_dev_dbg'
          ##__VA_ARGS__);  \
            ^~~~~~~~~~~
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:1486:2: note: in 
expansion of macro 'dev_dbg'
     dev_dbg(isp->dev, "dqbuf buffer %d (%s) for asd%d with exp_id %d, 
isp_config_id %d\n",
     ^~~~~~~
   drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c: At top level:
>> cc1: warning: unrecognized command line option '-Wno-implicit-fallthrough'

vim +1297 drivers/staging/media//atomisp/pci/atomisp2/atomisp_ioctl.c

a49d2536 Alan Cox 2017-02-17  1291  
a49d2536 Alan Cox 2017-02-17  1292  done:
a49d2536 Alan Cox 2017-02-17  1293      if (!((buf->flags & NOFLUSH_FLAGS) == 
NOFLUSH_FLAGS))
a49d2536 Alan Cox 2017-02-17  1294              wbinvd();
a49d2536 Alan Cox 2017-02-17  1295  
a49d2536 Alan Cox 2017-02-17  1296      if (!atomisp_is_vf_pipe(pipe) &&
a49d2536 Alan Cox 2017-02-17 @1297          (buf->reserved2 & 
ATOMISP_BUFFER_HAS_PER_FRAME_SETTING)) {
a49d2536 Alan Cox 2017-02-17  1298              /* this buffer will have a 
per-frame parameter */
a49d2536 Alan Cox 2017-02-17  1299              
pipe->frame_request_config_id[buf->index] = buf->reserved2 &
a49d2536 Alan Cox 2017-02-17  1300                                      
~ATOMISP_BUFFER_HAS_PER_FRAME_SETTING;
a49d2536 Alan Cox 2017-02-17  1301              dev_dbg(isp->dev, "This buffer 
requires per_frame setting which has isp_config_id %d\n",
a49d2536 Alan Cox 2017-02-17  1302                      
pipe->frame_request_config_id[buf->index]);
a49d2536 Alan Cox 2017-02-17  1303      } else {
a49d2536 Alan Cox 2017-02-17  1304              
pipe->frame_request_config_id[buf->index] = 0;
a49d2536 Alan Cox 2017-02-17  1305      }
a49d2536 Alan Cox 2017-02-17  1306  
a49d2536 Alan Cox 2017-02-17  1307      pipe->frame_params[buf->index] = NULL;
a49d2536 Alan Cox 2017-02-17  1308  
a49d2536 Alan Cox 2017-02-17  1309      rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1310  
a49d2536 Alan Cox 2017-02-17  1311      ret = videobuf_qbuf(&pipe->capq, buf);
a49d2536 Alan Cox 2017-02-17  1312      rt_mutex_lock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1313      if (ret)
a49d2536 Alan Cox 2017-02-17  1314              goto error;
a49d2536 Alan Cox 2017-02-17  1315  
a49d2536 Alan Cox 2017-02-17  1316      /* TODO: do this better, not best way 
to queue to css */
a49d2536 Alan Cox 2017-02-17  1317      if (asd->streaming == 
ATOMISP_DEVICE_STREAMING_ENABLED) {
a49d2536 Alan Cox 2017-02-17  1318              if 
(!list_empty(&pipe->buffers_waiting_for_param)) {
a49d2536 Alan Cox 2017-02-17  1319                      
atomisp_handle_parameter_and_buffer(pipe);
a49d2536 Alan Cox 2017-02-17  1320              } else {
a49d2536 Alan Cox 2017-02-17  1321                      
atomisp_qbuffers_to_css(asd);
a49d2536 Alan Cox 2017-02-17  1322  
a49d2536 Alan Cox 2017-02-17  1323  #ifndef ISP2401
a49d2536 Alan Cox 2017-02-17  1324                      if 
(!atomisp_is_wdt_running(asd) && atomisp_buffers_queued(asd))
a49d2536 Alan Cox 2017-02-17  1325                              
atomisp_wdt_start(asd);
a49d2536 Alan Cox 2017-02-17  1326  #else
a49d2536 Alan Cox 2017-02-17  1327                      if 
(!atomisp_is_wdt_running(pipe) &&
a49d2536 Alan Cox 2017-02-17  1328                              
atomisp_buffers_queued_pipe(pipe))
a49d2536 Alan Cox 2017-02-17  1329                              
atomisp_wdt_start(pipe);
a49d2536 Alan Cox 2017-02-17  1330  #endif
a49d2536 Alan Cox 2017-02-17  1331              }
a49d2536 Alan Cox 2017-02-17  1332      }
a49d2536 Alan Cox 2017-02-17  1333  
a49d2536 Alan Cox 2017-02-17  1334      /* Workaround: Due to the design of 
HALv3,
a49d2536 Alan Cox 2017-02-17  1335       * sometimes in ZSL or SDV mode HAL 
needs to
a49d2536 Alan Cox 2017-02-17  1336       * capture multiple images within one 
streaming cycle.
a49d2536 Alan Cox 2017-02-17  1337       * But the capture number cannot be 
determined by HAL.
a49d2536 Alan Cox 2017-02-17  1338       * So HAL only sets the capture number 
to be 1 and queue multiple
a49d2536 Alan Cox 2017-02-17  1339       * buffers. Atomisp driver needs to 
check this case and re-trigger
a49d2536 Alan Cox 2017-02-17  1340       * CSS to do capture when new buffer is 
queued. */
a49d2536 Alan Cox 2017-02-17  1341      if (asd->continuous_mode->val &&
a49d2536 Alan Cox 2017-02-17  1342          atomisp_subdev_source_pad(vdev)
a49d2536 Alan Cox 2017-02-17  1343          == 
ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE &&
a49d2536 Alan Cox 2017-02-17  1344          pipe->capq.streaming &&
a49d2536 Alan Cox 2017-02-17  1345          !asd->enable_raw_buffer_lock->val &&
a49d2536 Alan Cox 2017-02-17  1346          
asd->params.offline_parm.num_captures == 1) {
a49d2536 Alan Cox 2017-02-17  1347  #ifndef ISP2401
a49d2536 Alan Cox 2017-02-17  1348              asd->pending_capture_request++;
a49d2536 Alan Cox 2017-02-17  1349              dev_dbg(isp->dev, "Add one 
pending capture request.\n");
a49d2536 Alan Cox 2017-02-17  1350  #else
a49d2536 Alan Cox 2017-02-17  1351          if (asd->re_trigger_capture) {
a49d2536 Alan Cox 2017-02-17  1352                      ret = 
atomisp_css_offline_capture_configure(asd,
a49d2536 Alan Cox 2017-02-17  1353                              
asd->params.offline_parm.num_captures,
a49d2536 Alan Cox 2017-02-17  1354                              
asd->params.offline_parm.skip_frames,
a49d2536 Alan Cox 2017-02-17  1355                              
asd->params.offline_parm.offset);
a49d2536 Alan Cox 2017-02-17  1356                      asd->re_trigger_capture 
= false;
a49d2536 Alan Cox 2017-02-17  1357                      dev_dbg(isp->dev, "%s 
Trigger capture again ret=%d\n",
a49d2536 Alan Cox 2017-02-17  1358                              __func__, ret);
a49d2536 Alan Cox 2017-02-17  1359  
a49d2536 Alan Cox 2017-02-17  1360          } else {
a49d2536 Alan Cox 2017-02-17  1361                      
asd->pending_capture_request++;
a49d2536 Alan Cox 2017-02-17  1362                      asd->re_trigger_capture 
= false;
a49d2536 Alan Cox 2017-02-17  1363                      dev_dbg(isp->dev, "Add 
one pending capture request.\n");
a49d2536 Alan Cox 2017-02-17  1364          }
a49d2536 Alan Cox 2017-02-17  1365  #endif
a49d2536 Alan Cox 2017-02-17  1366      }
a49d2536 Alan Cox 2017-02-17  1367      rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1368  
a49d2536 Alan Cox 2017-02-17  1369      dev_dbg(isp->dev, "qbuf buffer %d (%s) 
for asd%d\n", buf->index,
a49d2536 Alan Cox 2017-02-17  1370              vdev->name, asd->index);
a49d2536 Alan Cox 2017-02-17  1371  
a49d2536 Alan Cox 2017-02-17  1372      return ret;
a49d2536 Alan Cox 2017-02-17  1373  
a49d2536 Alan Cox 2017-02-17  1374  error:
a49d2536 Alan Cox 2017-02-17  1375      rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1376      return ret;
a49d2536 Alan Cox 2017-02-17  1377  }
a49d2536 Alan Cox 2017-02-17  1378  
a49d2536 Alan Cox 2017-02-17  1379  static int atomisp_qbuf_file(struct file 
*file, void *fh,
a49d2536 Alan Cox 2017-02-17  1380                                      struct 
v4l2_buffer *buf)
a49d2536 Alan Cox 2017-02-17  1381  {
a49d2536 Alan Cox 2017-02-17  1382      struct video_device *vdev = 
video_devdata(file);
a49d2536 Alan Cox 2017-02-17  1383      struct atomisp_device *isp = 
video_get_drvdata(vdev);
a49d2536 Alan Cox 2017-02-17  1384      struct atomisp_video_pipe *pipe = 
atomisp_to_video_pipe(vdev);
a49d2536 Alan Cox 2017-02-17  1385      int ret;
a49d2536 Alan Cox 2017-02-17  1386  
a49d2536 Alan Cox 2017-02-17  1387      rt_mutex_lock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1388      if (isp->isp_fatal_error) {
a49d2536 Alan Cox 2017-02-17  1389              ret = -EIO;
a49d2536 Alan Cox 2017-02-17  1390              goto error;
a49d2536 Alan Cox 2017-02-17  1391      }
a49d2536 Alan Cox 2017-02-17  1392  
a49d2536 Alan Cox 2017-02-17  1393      if (!buf || buf->index >= 
VIDEO_MAX_FRAME ||
a49d2536 Alan Cox 2017-02-17  1394              !pipe->outq.bufs[buf->index]) {
a49d2536 Alan Cox 2017-02-17  1395              dev_err(isp->dev, "Invalid 
index for qbuf.\n");
a49d2536 Alan Cox 2017-02-17  1396              ret = -EINVAL;
a49d2536 Alan Cox 2017-02-17  1397              goto error;
a49d2536 Alan Cox 2017-02-17  1398      }
a49d2536 Alan Cox 2017-02-17  1399  
a49d2536 Alan Cox 2017-02-17  1400      if (buf->memory != V4L2_MEMORY_MMAP) {
a49d2536 Alan Cox 2017-02-17  1401              dev_err(isp->dev, "Unsupported 
memory method\n");
a49d2536 Alan Cox 2017-02-17  1402              ret = -EINVAL;
a49d2536 Alan Cox 2017-02-17  1403              goto error;
a49d2536 Alan Cox 2017-02-17  1404      }
a49d2536 Alan Cox 2017-02-17  1405  
a49d2536 Alan Cox 2017-02-17  1406      if (buf->type != 
V4L2_BUF_TYPE_VIDEO_OUTPUT) {
a49d2536 Alan Cox 2017-02-17  1407              dev_err(isp->dev, "Unsupported 
buffer type\n");
a49d2536 Alan Cox 2017-02-17  1408              ret = -EINVAL;
a49d2536 Alan Cox 2017-02-17  1409              goto error;
a49d2536 Alan Cox 2017-02-17  1410      }
a49d2536 Alan Cox 2017-02-17  1411      rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1412  
a49d2536 Alan Cox 2017-02-17  1413      return videobuf_qbuf(&pipe->outq, buf);
a49d2536 Alan Cox 2017-02-17  1414  
a49d2536 Alan Cox 2017-02-17  1415  error:
a49d2536 Alan Cox 2017-02-17  1416      rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1417  
a49d2536 Alan Cox 2017-02-17  1418      return ret;
a49d2536 Alan Cox 2017-02-17  1419  }
a49d2536 Alan Cox 2017-02-17  1420  
a49d2536 Alan Cox 2017-02-17  1421  static int __get_frame_exp_id(struct 
atomisp_video_pipe *pipe,
a49d2536 Alan Cox 2017-02-17  1422              struct v4l2_buffer *buf)
a49d2536 Alan Cox 2017-02-17  1423  {
a49d2536 Alan Cox 2017-02-17  1424      struct videobuf_vmalloc_memory *vm_mem;
a49d2536 Alan Cox 2017-02-17  1425      struct atomisp_css_frame *handle;
a49d2536 Alan Cox 2017-02-17  1426      int i;
a49d2536 Alan Cox 2017-02-17  1427  
a49d2536 Alan Cox 2017-02-17  1428      for (i = 0; pipe->capq.bufs[i]; i++) {
a49d2536 Alan Cox 2017-02-17  1429              vm_mem = 
pipe->capq.bufs[i]->priv;
a49d2536 Alan Cox 2017-02-17  1430              handle = vm_mem->vaddr;
a49d2536 Alan Cox 2017-02-17  1431              if (buf->index == 
pipe->capq.bufs[i]->i && handle)
a49d2536 Alan Cox 2017-02-17  1432                      return handle->exp_id;
a49d2536 Alan Cox 2017-02-17  1433      }
a49d2536 Alan Cox 2017-02-17  1434      return -EINVAL;
a49d2536 Alan Cox 2017-02-17  1435  }
a49d2536 Alan Cox 2017-02-17  1436  
a49d2536 Alan Cox 2017-02-17  1437  /*
a49d2536 Alan Cox 2017-02-17  1438   * Applications call the VIDIOC_DQBUF ioctl 
to dequeue a filled (capturing) or
a49d2536 Alan Cox 2017-02-17  1439   * displayed (output buffer)from the 
driver's outgoing queue
a49d2536 Alan Cox 2017-02-17  1440   */
a49d2536 Alan Cox 2017-02-17  1441  static int atomisp_dqbuf(struct file *file, 
void *fh, struct v4l2_buffer *buf)
a49d2536 Alan Cox 2017-02-17  1442  {
a49d2536 Alan Cox 2017-02-17  1443      struct video_device *vdev = 
video_devdata(file);
a49d2536 Alan Cox 2017-02-17  1444      struct atomisp_video_pipe *pipe = 
atomisp_to_video_pipe(vdev);
a49d2536 Alan Cox 2017-02-17  1445      struct atomisp_sub_device *asd = 
pipe->asd;
a49d2536 Alan Cox 2017-02-17  1446      struct atomisp_device *isp = 
video_get_drvdata(vdev);
a49d2536 Alan Cox 2017-02-17  1447      int ret = 0;
a49d2536 Alan Cox 2017-02-17  1448  
a49d2536 Alan Cox 2017-02-17  1449      rt_mutex_lock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1450  
a49d2536 Alan Cox 2017-02-17  1451      if (isp->isp_fatal_error) {
a49d2536 Alan Cox 2017-02-17  1452              rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1453              return -EIO;
a49d2536 Alan Cox 2017-02-17  1454      }
a49d2536 Alan Cox 2017-02-17  1455  
a49d2536 Alan Cox 2017-02-17  1456      if (asd->streaming == 
ATOMISP_DEVICE_STREAMING_STOPPING) {
a49d2536 Alan Cox 2017-02-17  1457              rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1458              dev_err(isp->dev, "%s: reject, 
as ISP at stopping.\n",
a49d2536 Alan Cox 2017-02-17  1459                              __func__);
a49d2536 Alan Cox 2017-02-17  1460              return -EIO;
a49d2536 Alan Cox 2017-02-17  1461      }
a49d2536 Alan Cox 2017-02-17  1462  
a49d2536 Alan Cox 2017-02-17  1463      rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1464  
a49d2536 Alan Cox 2017-02-17  1465      ret = videobuf_dqbuf(&pipe->capq, buf, 
file->f_flags & O_NONBLOCK);
a49d2536 Alan Cox 2017-02-17  1466      if (ret) {
a49d2536 Alan Cox 2017-02-17  1467              dev_dbg(isp->dev, "<%s: %d\n", 
__func__, ret);
a49d2536 Alan Cox 2017-02-17  1468              return ret;
a49d2536 Alan Cox 2017-02-17  1469      }
a49d2536 Alan Cox 2017-02-17  1470      rt_mutex_lock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1471      buf->bytesused = pipe->pix.sizeimage;
a49d2536 Alan Cox 2017-02-17  1472      buf->reserved = 
asd->frame_status[buf->index];
a49d2536 Alan Cox 2017-02-17  1473  
a49d2536 Alan Cox 2017-02-17  1474      /*
a49d2536 Alan Cox 2017-02-17  1475       * Hack:
a49d2536 Alan Cox 2017-02-17  1476       * Currently frame_status in the enum 
type which takes no more lower
a49d2536 Alan Cox 2017-02-17  1477       * 8 bit.
a49d2536 Alan Cox 2017-02-17  1478       * use bit[31:16] for exp_id as it is 
only in the range of 1~255
a49d2536 Alan Cox 2017-02-17  1479       */
a49d2536 Alan Cox 2017-02-17  1480      buf->reserved &= 0x0000ffff;
a49d2536 Alan Cox 2017-02-17  1481      if (!(buf->flags & V4L2_BUF_FLAG_ERROR))
a49d2536 Alan Cox 2017-02-17  1482              buf->reserved |= 
__get_frame_exp_id(pipe, buf) << 16;
a49d2536 Alan Cox 2017-02-17  1483      buf->reserved2 = 
pipe->frame_config_id[buf->index];
a49d2536 Alan Cox 2017-02-17  1484      rt_mutex_unlock(&isp->mutex);
a49d2536 Alan Cox 2017-02-17  1485  
a49d2536 Alan Cox 2017-02-17 @1486      dev_dbg(isp->dev, "dqbuf buffer %d (%s) 
for asd%d with exp_id %d, isp_config_id %d\n",
a49d2536 Alan Cox 2017-02-17  1487              buf->index, vdev->name, 
asd->index, buf->reserved >> 16,
a49d2536 Alan Cox 2017-02-17  1488              buf->reserved2);
a49d2536 Alan Cox 2017-02-17  1489      return 0;

:::::: The code at line 1297 was first introduced by commit
:::::: a49d25364dfb9f8a64037488a39ab1f56c5fa419 staging/atomisp: Add support 
for the Intel IPU v2

:::::: TO: Alan Cox <[email protected]>
:::::: CC: Greg Kroah-Hartman <[email protected]>

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

Attachment: .config.gz
Description: application/gzip

Reply via email to