Hi Yannick,

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.4-rc5 next-20151217]

url:    
https://github.com/0day-ci/linux/commits/Yannick-Fertre/Documentation-devicetree-add-STI-HVA-binding/20151218-184834
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/sti/hva/hva-v4l2.c: In function 'hva_open_encoder':
>> drivers/media/platform/sti/hva/hva-v4l2.c:164:15: warning: cast to pointer 
>> from integer of different size [-Wint-to-pointer-cast]
       ctx->name, (char *)pixelformat, (char *)streamformat);
                  ^
   drivers/media/platform/sti/hva/hva-v4l2.c:164:36: warning: cast to pointer 
from integer of different size [-Wint-to-pointer-cast]
       ctx->name, (char *)pixelformat, (char *)streamformat);
                                       ^
   drivers/media/platform/sti/hva/hva-v4l2.c: In function 'hva_querybuf':
>> drivers/media/platform/sti/hva/hva-v4l2.c:97:28: error: implicit declaration 
>> of function 'UL' [-Werror=implicit-function-declaration]
    #define MMAP_FRAME_OFFSET (UL(0x100000000) / 2)
                               ^
>> drivers/media/platform/sti/hva/hva-v4l2.c:589:18: note: in expansion of 
>> macro 'MMAP_FRAME_OFFSET'
      b->m.offset += MMAP_FRAME_OFFSET;
                     ^
   In file included from include/linux/printk.h:277:0,
                    from include/linux/kernel.h:13,
                    from include/linux/list.h:8,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:17,
                    from drivers/media/platform/sti/hva/hva-v4l2.c:8:
   drivers/media/platform/sti/hva/hva-v4l2.c: In function 
'hva_vb2_frame_prepare':
>> drivers/media/platform/sti/hva/hva-v4l2.c:875:16: warning: format '%x' 
>> expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t 
>> {aka long long unsigned int}' [-Wformat=]
      dev_dbg(dev, "%s frame[%d] prepared; virt=%p, phy=0x%x\n",
                   ^
   include/linux/dynamic_debug.h:86:39: note: in definition of macro 
'dynamic_dev_dbg'
      __dynamic_dev_dbg(&descriptor, dev, fmt, \
                                          ^
>> drivers/media/platform/sti/hva/hva-v4l2.c:875:3: note: in expansion of macro 
>> 'dev_dbg'
      dev_dbg(dev, "%s frame[%d] prepared; virt=%p, phy=0x%x\n",
      ^
   drivers/media/platform/sti/hva/hva-v4l2.c: In function 
'hva_vb2_stream_prepare':
   drivers/media/platform/sti/hva/hva-v4l2.c:999:16: warning: format '%x' 
expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t 
{aka long long unsigned int}' [-Wformat=]
      dev_dbg(dev, "%s stream[%d] prepared; virt=%p, phy=0x%x\n",
                   ^
   include/linux/dynamic_debug.h:86:39: note: in definition of macro 
'dynamic_dev_dbg'
      __dynamic_dev_dbg(&descriptor, dev, fmt, \
                                          ^
   drivers/media/platform/sti/hva/hva-v4l2.c:999:3: note: in expansion of macro 
'dev_dbg'
      dev_dbg(dev, "%s stream[%d] prepared; virt=%p, phy=0x%x\n",
      ^
   In file included from drivers/media/platform/sti/hva/hva-v4l2.c:8:0:
   drivers/media/platform/sti/hva/hva-v4l2.c: In function 'hva_probe':
   drivers/media/platform/sti/hva/hva-v4l2.c:1345:26: warning: cast to pointer 
from integer of different size [-Wint-to-pointer-cast]
       HVA_PREFIX, HVA_NAME, (void *)hva->esram_addr,
                             ^
   include/linux/device.h:1174:58: note: in definition of macro 'dev_info'
    #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
                                                             ^
   cc1: some warnings being treated as errors
--
   In file included from include/linux/printk.h:277:0,
                    from include/linux/kernel.h:13,
                    from include/linux/clk.h:16,
                    from drivers/media/platform/sti/hva/hva-hw.c:8:
   drivers/media/platform/sti/hva/hva-hw.c: In function 'hva_hw_execute_task':
>> drivers/media/platform/sti/hva/hva-hw.c:523:15: warning: format '%x' expects 
>> argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka 
>> long long unsigned int}' [-Wformat=]
     dev_dbg(dev, "%s     %s: Send task ( cmd:%d, task_desc:0x%x)\n",
                  ^
   include/linux/dynamic_debug.h:86:39: note: in definition of macro 
'dynamic_dev_dbg'
      __dynamic_dev_dbg(&descriptor, dev, fmt, \
                                          ^
>> drivers/media/platform/sti/hva/hva-hw.c:523:2: note: in expansion of macro 
>> 'dev_dbg'
     dev_dbg(dev, "%s     %s: Send task ( cmd:%d, task_desc:0x%x)\n",
     ^
--
   In file included from include/linux/printk.h:277:0,
                    from include/linux/kernel.h:13,
                    from include/linux/list.h:8,
                    from include/linux/preempt.h:10,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/ktime.h:24,
                    from include/linux/poll.h:6,
                    from include/media/v4l2-dev.h:12,
                    from include/media/v4l2-common.h:29,
                    from drivers/media/platform/sti/hva/hva.h:11,
                    from drivers/media/platform/sti/hva/hva-mem.c:8:
   drivers/media/platform/sti/hva/hva-mem.c: In function 'hva_mem_alloc':
>> drivers/media/platform/sti/hva/hva-mem.c:43:3: warning: format '%x' expects 
>> argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka 
>> long long unsigned int}' [-Wformat=]
      "%s allocate %d bytes of HW memory @(virt=%p, phy=0x%x): %s\n",
      ^
   include/linux/dynamic_debug.h:86:39: note: in definition of macro 
'dynamic_dev_dbg'
      __dynamic_dev_dbg(&descriptor, dev, fmt, \
                                          ^
>> drivers/media/platform/sti/hva/hva-mem.c:42:2: note: in expansion of macro 
>> 'dev_dbg'
     dev_dbg(dev,
     ^
   drivers/media/platform/sti/hva/hva-mem.c: In function 'hva_mem_free':
   drivers/media/platform/sti/hva/hva-mem.c:57:3: warning: format '%x' expects 
argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka long 
long unsigned int}' [-Wformat=]
      "%s free %d bytes of HW memory @(virt=%p, phy=0x%x): %s\n",
      ^
   include/linux/dynamic_debug.h:86:39: note: in definition of macro 
'dynamic_dev_dbg'
      __dynamic_dev_dbg(&descriptor, dev, fmt, \
                                          ^
   drivers/media/platform/sti/hva/hva-mem.c:56:2: note: in expansion of macro 
'dev_dbg'
     dev_dbg(dev,
     ^

vim +/UL +97 drivers/media/platform/sti/hva/hva-v4l2.c

     2   * Copyright (C) STMicroelectronics SA 2015
     3   * Authors: Yannick Fertre <yannick.fer...@st.com>
     4   *          Hugues Fruchet <hugues.fruc...@st.com>
     5   * License terms:  GNU General Public License (GPL), version 2
     6   */
     7  
   > 8  #include <linux/device.h>
     9  #include <linux/dma-mapping.h>
    10  #include <linux/module.h>
    11  #include <linux/platform_device.h>
    12  #include <linux/slab.h>
    13  #include <linux/version.h>
    14  #include <linux/of.h>
    15  #include <media/v4l2-ioctl.h>
    16  #include <media/videobuf2-dma-contig.h>
    17  #include "hva.h"
    18  #include "hva-hw.h"
    19  
    20  #define HVA_NAME "hva"
    21  
    22  /*
    23   * 1 frame at least for user
    24   * limit number of frames to 16
    25   */
    26  #define MAX_FRAMES      16
    27  #define MIN_FRAMES      1
    28  
    29  #define HVA_MIN_WIDTH   32
    30  #define HVA_MAX_WIDTH   1920
    31  #define HVA_MIN_HEIGHT  32
    32  #define HVA_MAX_HEIGHT  1080
    33  
    34  #define DFT_CFG_WIDTH           HVA_MIN_WIDTH
    35  #define DFT_CFG_HEIGHT          HVA_MIN_HEIGHT
    36  #define DFT_CFG_BITRATE_MODE    V4L2_MPEG_VIDEO_BITRATE_MODE_CBR
    37  #define DFT_CFG_GOP_SIZE        16
    38  #define DFT_CFG_INTRA_REFRESH   true
    39  #define DFT_CFG_FRAME_NUM       1
    40  #define DFT_CFG_FRAME_DEN       30
    41  #define DFT_CFG_QPMIN           5
    42  #define DFT_CFG_QPMAX           51
    43  #define DFT_CFG_DCT8X8          false
    44  #define DFT_CFG_COMP_QUALITY    85
    45  #define DFT_CFG_SAR_ENABLE      1
    46  #define DFT_CFG_BITRATE         (20000 * 1024)
    47  #define DFT_CFG_CPB_SIZE        (25000 * 1024)
    48  
    49  static const struct hva_frameinfo frame_dflt_fmt = {
    50          .fmt            = {
    51                                  .pixelformat    = V4L2_PIX_FMT_NV12,
    52                                  .nb_planes      = 2,
    53                                  .bpp            = 12,
    54                                  .bpp_plane0     = 8,
    55                                  .w_align        = 2,
    56                                  .h_align        = 2
    57                            },
    58          .width          = DFT_CFG_WIDTH,
    59          .height         = DFT_CFG_HEIGHT,
    60          .crop           = {0, 0, DFT_CFG_WIDTH, DFT_CFG_HEIGHT},
    61          .frame_width    = DFT_CFG_WIDTH,
    62          .frame_height   = DFT_CFG_HEIGHT
    63  };
    64  
    65  static const struct hva_streaminfo stream_dflt_fmt = {
    66          .width          = DFT_CFG_WIDTH,
    67          .height         = DFT_CFG_HEIGHT
    68  };
    69  
    70  /* list of stream formats supported by hva hardware */
    71  const u32 stream_fmt[] = {
    72  };
    73  
    74  /* list of pixel formats supported by hva hardware */
    75  static const struct hva_frame_fmt frame_fmts[] = {
    76          /* NV12. YUV420SP - 1 plane for Y + 1 plane for (CbCr) */
    77          {
    78                  .pixelformat    = V4L2_PIX_FMT_NV12,
    79                  .nb_planes      = 2,
    80                  .bpp            = 12,
    81                  .bpp_plane0     = 8,
    82                  .w_align        = 2,
    83                  .h_align        = 2
    84          },
    85          /* NV21. YUV420SP - 1 plane for Y + 1 plane for (CbCr) */
    86          {
    87                  .pixelformat    = V4L2_PIX_FMT_NV21,
    88                  .nb_planes      = 2,
    89                  .bpp            = 12,
    90                  .bpp_plane0     = 8,
    91                  .w_align        = 2,
    92                  .h_align        = 2
    93          },
    94  };
    95  
    96  /* offset to differentiate OUTPUT/CAPTURE @mmap */
  > 97  #define MMAP_FRAME_OFFSET (UL(0x100000000) / 2)
    98  
    99  /* registry of available encoders */
   100  const struct hva_encoder *hva_encoders[] = {
   101  };
   102  
   103  static const struct hva_frame_fmt *hva_find_frame_fmt(u32 pixelformat)
   104  {
   105          const struct hva_frame_fmt *fmt;
   106          unsigned int i;
   107  
   108          for (i = 0; i < ARRAY_SIZE(frame_fmts); i++) {
   109                  fmt = &frame_fmts[i];
   110                  if (fmt->pixelformat == pixelformat)
   111                          return fmt;
   112          }
   113  
   114          return NULL;
   115  }
   116  
   117  static void register_encoder(struct hva_device *hva,
   118                               const struct hva_encoder *enc)
   119  {
   120          if (hva->nb_of_encoders >= HVA_MAX_ENCODERS) {
   121                  dev_warn(hva->dev,
   122                           "%s can' t register encoder (max nb (%d) is 
reached!)\n",
   123                           enc->name, HVA_MAX_ENCODERS);
   124                  return;
   125          }
   126  
   127          /* those encoder ops are mandatory */
   128          WARN_ON(!enc->open);
   129          WARN_ON(!enc->close);
   130          WARN_ON(!enc->encode);
   131  
   132          hva->encoders[hva->nb_of_encoders] = enc;
   133          hva->nb_of_encoders++;
   134          dev_info(hva->dev, "%s encoder registered\n", enc->name);
   135  }
   136  
   137  static void register_all(struct hva_device *hva)
   138  {
   139          unsigned int i;
   140  
   141          for (i = 0; i < ARRAY_SIZE(hva_encoders); i++)
   142                  register_encoder(hva, hva_encoders[i]);
   143  }
   144  
   145  static int hva_open_encoder(struct hva_ctx *ctx, u32 streamformat,
   146                              u32 pixelformat, struct hva_encoder **penc)
   147  {
   148          struct hva_device *hva = ctx_to_hdev(ctx);
   149          struct device *dev = ctx_to_dev(ctx);
   150          struct hva_encoder *enc;
   151          unsigned int i;
   152          int ret;
   153  
   154          /* find an encoder which can deal with these formats */
   155          for (i = 0; i < hva->nb_of_encoders; i++) {
   156                  enc = (struct hva_encoder *)hva->encoders[i];
   157                  if ((enc->streamformat == streamformat) &&
   158                      (enc->pixelformat == pixelformat))
   159                          break;  /* found */
   160          }
   161  
   162          if (i == hva->nb_of_encoders) {
   163                  dev_err(dev, "%s no encoder found matching %4.4s => 
%4.4s\n",
 > 164                          ctx->name, (char *)pixelformat, (char 
 > *)streamformat);
   165                  return -EINVAL;
   166          }
   167  

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

Attachment: .config.gz
Description: Binary data

Reply via email to