Re: [PATCH 3/3] drm/udl: Switch to SHMEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc5 next-20191029]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/drm-udl-Convert-to-SHMEM/20191030-065855
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 23fdb198ae81f47a574296dab5167c5e136a02ba
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-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
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/udl/udl_gem.c: In function 'udl_gem_object_mmap':
   drivers/gpu/drm/udl/udl_gem.c:41:27: error: passing argument 1 of 'drm_gem_shmem_mmap' from incompatible pointer type [-Werror=incompatible-pointer-types]
     ret = drm_gem_shmem_mmap(obj, vma);
                              ^~~
   In file included from drivers/gpu/drm/udl/udl_gem.c:10:
   include/drm/drm_gem_shmem_helper.h:146:37: note: expected 'struct file *' but argument is of type 'struct drm_gem_object *'
    int drm_gem_shmem_mmap(struct file *filp, struct vm_area_struct *vma);
                           ~~~~~~~~~~~~~^~~~
   drivers/gpu/drm/udl/udl_gem.c: At top level:
   drivers/gpu/drm/udl/udl_gem.c:61:3: error: 'const struct drm_gem_object_funcs' has no member named 'mmap'; did you mean 'vmap'?
     .mmap = udl_gem_object_mmap,
      ^~~~
      vmap
>> drivers/gpu/drm/udl/udl_gem.c:61:10: error: initialization of 'const struct vm_operations_struct *' from incompatible pointer type 'int (*)(struct drm_gem_object *, struct vm_area_struct *)' [-Werror=incompatible-pointer-types]
     .mmap = udl_gem_object_mmap,
             ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/udl/udl_gem.c:61:10: note: (near initialization for 'udl_gem_object_funcs.vm_ops')
   cc1: some warnings being treated as errors

vim +61 drivers/gpu/drm/udl/udl_gem.c

     8	
     9	#include <drm/drm_drv.h>
  > 10	#include <drm/drm_gem_shmem_helper.h>
    11	#include <drm/drm_mode.h>
    12	#include <drm/drm_prime.h>
    13	
    14	#include "udl_drv.h"
    15	
    16	/*
    17	 * GEM object funcs
    18	 */
    19	
    20	static void udl_gem_object_free_object(struct drm_gem_object *obj)
    21	{
    22		struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
    23	
    24		/* Fbdev emulation vmaps the buffer. Unmap it here for consistency
    25		 * with the original udl GEM code.
    26		 *
    27		 * TODO: Switch to generic fbdev emulation and release the
    28		 *       GEM object with drm_gem_shmem_free_object().
    29		 */
    30		if (shmem->vaddr)
    31			drm_gem_shmem_vunmap(obj, shmem->vaddr);
    32	
    33		drm_gem_shmem_free_object(obj);
    34	}
    35	
    36	static int udl_gem_object_mmap(struct drm_gem_object *obj,
    37				       struct vm_area_struct *vma)
    38	{
    39		int ret;
    40	
    41		ret = drm_gem_shmem_mmap(obj, vma);
    42		if (ret)
    43			return ret;
    44	
    45		vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
    46		if (obj->import_attach)
    47			vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
    48		vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
    49	
    50		return 0;
    51	}
    52	
    53	static const struct drm_gem_object_funcs udl_gem_object_funcs = {
    54		.free = udl_gem_object_free_object,
    55		.print_info = drm_gem_shmem_print_info,
    56		.pin = drm_gem_shmem_pin,
    57		.unpin = drm_gem_shmem_unpin,
    58		.get_sg_table = drm_gem_shmem_get_sg_table,
    59		.vmap = drm_gem_shmem_vmap,
    60		.vunmap = drm_gem_shmem_vunmap,
  > 61		.mmap = udl_gem_object_mmap,
    62	};
    63	

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux