lkml.org 
[lkml]   [2020]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 04/11] media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder
    Hi "Mirela,

    Thank you for the patch! Perhaps something to improve:

    [auto build test WARNING on linuxtv-media/master]
    [also build test WARNING on shawnguo/for-next robh/for-next v5.10-rc2 next-20201104]
    [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]

    url: https://github.com/0day-ci/linux/commits/Mirela-Rabulea-OSS/Add-V4L2-driver-for-i-MX8-JPEG-Encoder-Decoder/20201102-111206
    base: git://linuxtv.org/media_tree.git master
    config: arm-randconfig-r026-20201104 (attached as .config)
    compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a6d15d40701ad38f29e4ff93703b3ffa7b204611)
    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
    # install arm cross compiling tool for clang build
    # apt-get install binutils-arm-linux-gnueabi
    # https://github.com/0day-ci/linux/commit/af8ab6e82327576589ff9521ea9c5538841b26b1
    git remote add linux-review https://github.com/0day-ci/linux
    git fetch --no-tags linux-review Mirela-Rabulea-OSS/Add-V4L2-driver-for-i-MX8-JPEG-Encoder-Decoder/20201102-111206
    git checkout af8ab6e82327576589ff9521ea9c5538841b26b1
    # save the attached .config to linux build tree
    COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

    If you fix the issue, kindly add following tag as appropriate
    Reported-by: kernel test robot <lkp@intel.com>

    All warnings (new ones prefixed by >>):

    >> drivers/media/platform/imx-jpeg/mxc-jpeg.c:912:45: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
    dev_dbg(jpeg->dev, "cfg_desc - 0x%llx:\n", cfg_desc_handle);
    ~~~~ ^~~~~~~~~~~~~~~
    %x
    include/linux/dev_printk.h:131:47: note: expanded from macro 'dev_dbg'
    dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
    ~~~ ^~~~~~~~~~~
    drivers/media/platform/imx-jpeg/mxc-jpeg.c:914:45: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
    dev_dbg(jpeg->dev, "enc desc - 0x%llx:\n", desc_handle);
    ~~~~ ^~~~~~~~~~~
    %x
    include/linux/dev_printk.h:131:47: note: expanded from macro 'dev_dbg'
    dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
    ~~~ ^~~~~~~~~~~
    drivers/media/platform/imx-jpeg/mxc-jpeg.c:1318:12: warning: result of comparison of constant -1 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
    if (byte == -1)
    ~~~~ ^ ~~
    drivers/media/platform/imx-jpeg/mxc-jpeg.c:1325:12: warning: result of comparison of constant -1 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
    if (byte == -1)
    ~~~~ ^ ~~
    4 warnings generated.

    vim +912 drivers/media/platform/imx-jpeg/mxc-jpeg.c

    861
    862 static void mxc_jpeg_config_enc_desc(struct vb2_buffer *out_buf,
    863 struct mxc_jpeg_ctx *ctx,
    864 struct vb2_buffer *src_buf,
    865 struct vb2_buffer *dst_buf)
    866 {
    867 struct mxc_jpeg_dev *jpeg = ctx->mxc_jpeg;
    868 void __iomem *reg = jpeg->base_reg;
    869 unsigned int slot = ctx->slot;
    870 struct mxc_jpeg_desc *desc = jpeg->slot_data[slot].desc;
    871 struct mxc_jpeg_desc *cfg_desc = jpeg->slot_data[slot].cfg_desc;
    872 dma_addr_t desc_handle = jpeg->slot_data[slot].desc_handle;
    873 dma_addr_t cfg_desc_handle = jpeg->slot_data[slot].cfg_desc_handle;
    874 void *cfg_stream_vaddr = jpeg->slot_data[slot].cfg_stream_vaddr;
    875 struct mxc_jpeg_q_data *q_data;
    876 enum mxc_jpeg_image_format img_fmt;
    877 int w, h;
    878
    879 q_data = mxc_jpeg_get_q_data(ctx, src_buf->vb2_queue->type);
    880
    881 jpeg->slot_data[slot].cfg_stream_size =
    882 mxc_jpeg_setup_cfg_stream(cfg_stream_vaddr,
    883 q_data->fmt->fourcc,
    884 q_data->w_adjusted,
    885 q_data->h_adjusted);
    886
    887 /* chain the config descriptor with the encoding descriptor */
    888 cfg_desc->next_descpt_ptr = desc_handle | MXC_NXT_DESCPT_EN;
    889
    890 cfg_desc->buf_base0 = jpeg->slot_data[slot].cfg_stream_handle;
    891 cfg_desc->buf_base1 = 0;
    892 cfg_desc->line_pitch = 0;
    893 cfg_desc->stm_bufbase = 0; /* no output expected */
    894 cfg_desc->stm_bufsize = 0x0;
    895 cfg_desc->imgsize = 0;
    896 cfg_desc->stm_ctrl = STM_CTRL_CONFIG_MOD(1);
    897
    898 desc->next_descpt_ptr = 0; /* end of chain */
    899
    900 /* use adjusted resolution for CAST IP job */
    901 w = q_data->w_adjusted;
    902 h = q_data->h_adjusted;
    903 mxc_jpeg_set_res(desc, w, h);
    904 mxc_jpeg_set_line_pitch(desc, w * (q_data->fmt->depth / 8));
    905 mxc_jpeg_set_bufsize(desc, desc->line_pitch * h);
    906 img_fmt = mxc_jpeg_fourcc_to_imgfmt(q_data->fmt->fourcc);
    907 if (img_fmt == MXC_JPEG_INVALID)
    908 dev_err(jpeg->dev, "No valid image format detected\n");
    909 desc->stm_ctrl = STM_CTRL_CONFIG_MOD(0) |
    910 STM_CTRL_IMAGE_FORMAT(img_fmt);
    911 mxc_jpeg_addrs(desc, src_buf, dst_buf, 0);
    > 912 dev_dbg(jpeg->dev, "cfg_desc - 0x%llx:\n", cfg_desc_handle);
    913 print_descriptor_info(jpeg->dev, cfg_desc);
    914 dev_dbg(jpeg->dev, "enc desc - 0x%llx:\n", desc_handle);
    915 print_descriptor_info(jpeg->dev, desc);
    916 print_wrapper_info(jpeg->dev, reg);
    917 print_cast_status(jpeg->dev, reg, MXC_JPEG_ENCODE);
    918
    919 /* validate the configuration descriptor */
    920 mxc_jpeg_set_desc(cfg_desc_handle, reg, slot);
    921 }
    922

    ---
    0-DAY CI Kernel Test Service, Intel Corporation
    https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
    [unhandled content-type:application/gzip]
    \
     
     \ /
      Last update: 2020-11-04 17:05    [W:3.970 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site