[Lima] [PATCH v8] drm/lima: driver for ARM Mali4xx GPUs

kbuild test robot lkp at intel.com
Sun Mar 10 01:01:04 UTC 2019


Hi Qiang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0 next-20190306]
[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/Qiang-Yu/drm-lima-driver-for-ARM-Mali4xx-GPUs/20190310-073206
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.2.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.2.0 make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/lima/lima_object.c:8:
   drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c:37:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create_struct':
>> drivers/gpu/drm/lima/lima_object.c:50:10: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
     bo->gem.resv = resv;
             ^~~~
             dev
   drivers/gpu/drm/lima/lima_object.c: At top level:
   drivers/gpu/drm/lima/lima_object.c:63:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/lima/lima_object.c:61:17: error: conflicting types for 'lima_bo_create'
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/lima/lima_object.c:8:
   drivers/gpu/drm/lima/lima_object.h:29:17: note: previous declaration of 'lima_bo_create' was here
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create':
>> drivers/gpu/drm/lima/lima_object.c:69:47: error: passing argument 4 of 'lima_bo_create_struct' from incompatible pointer type [-Werror=incompatible-pointer-types]
     bo = lima_bo_create_struct(dev, size, flags, resv);
                                                  ^~~~
   drivers/gpu/drm/lima/lima_object.c:37:38: note: expected 'struct reservation_object *' but argument is of type 'struct reservation_object *'
              struct reservation_object *resv)
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   cc1: some warnings being treated as errors
--
   In file included from drivers/gpu/drm/lima/lima_gem.c:17:
   drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_sync_bo':
>> drivers/gpu/drm/lima/lima_gem.c:138:9: error: implicit declaration of function 'reservation_object_reserve_shared' [-Werror=implicit-function-declaration]
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/lima/lima_gem.c:138:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
                                                      ^~~~
                                                      dev
>> drivers/gpu/drm/lima/lima_gem.c:153:9: error: implicit declaration of function 'reservation_object_get_fences_rcu' [-Werror=implicit-function-declaration]
      err = reservation_object_get_fences_rcu(
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:154:12: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       bo->gem.resv, NULL, &nr_fences, &fences);
               ^~~~
               dev
>> drivers/gpu/drm/lima/lima_gem.c:168:3: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
      kfree(fences);
      ^~~~~
      kvfree
>> drivers/gpu/drm/lima/lima_gem.c:172:11: error: implicit declaration of function 'reservation_object_get_excl_rcu' [-Werror=implicit-function-declaration]
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:172:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
                                                      ^~~~
                                                      dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_lock_bos':
   drivers/gpu/drm/lima/lima_gem.c:188:24: error: 'reservation_ww_class' undeclared (first use in this function)
     ww_acquire_init(ctx, &reservation_ww_class);
                           ^~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:188:24: note: each undeclared identifier is reported only once for each function it appears in
   drivers/gpu/drm/lima/lima_gem.c:197:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ret = ww_mutex_lock_interruptible(&bos[i]->gem.resv->lock, ctx);
                                                     ^~~~
                                                     dev
   drivers/gpu/drm/lima/lima_gem.c:209:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c:212:42: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[slow_locked]->gem.resv->lock);
                                             ^~~~
                                             dev
   drivers/gpu/drm/lima/lima_gem.c:217:25: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       &bos[contended]->gem.resv->lock, ctx);
                            ^~~~
                            dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_unlock_bos':
   drivers/gpu/drm/lima/lima_gem.c:234:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_submit':
>> drivers/gpu/drm/lima/lima_gem.c:331:4: error: implicit declaration of function 'reservation_object_add_excl_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:331:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
                                                     ^~~~
                                                     dev
>> drivers/gpu/drm/lima/lima_gem.c:333:4: error: implicit declaration of function 'reservation_object_add_shared_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:333:52: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
                                                       ^~~~
                                                       dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_wait':
>> drivers/gpu/drm/lima/lima_gem.c:374:12: error: implicit declaration of function 'drm_timeout_abs_to_jiffies'; did you mean 'timeval_to_jiffies'? [-Werror=implicit-function-declaration]
     timeout = drm_timeout_abs_to_jiffies(timeout_ns);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
               timeval_to_jiffies
>> drivers/gpu/drm/lima/lima_gem.c:376:8: error: implicit declaration of function 'drm_gem_reservation_object_wait'; did you mean 'drm_gem_private_object_init'? [-Werror=implicit-function-declaration]
     ret = drm_gem_reservation_object_wait(file, handle, write, timeout);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           drm_gem_private_object_init
   cc1: some warnings being treated as errors

vim +50 drivers/gpu/drm/lima/lima_object.c

     7	
   > 8	#include "lima_object.h"
     9	
    10	void lima_bo_destroy(struct lima_bo *bo)
    11	{
    12		if (bo->sgt) {
    13			kfree(bo->pages);
    14			drm_prime_gem_destroy(&bo->gem, bo->sgt);
    15		} else {
    16			if (bo->pages_dma_addr) {
    17				int i, npages = bo->gem.size >> PAGE_SHIFT;
    18	
    19				for (i = 0; i < npages; i++) {
    20					if (bo->pages_dma_addr[i])
    21						dma_unmap_page(bo->gem.dev->dev,
    22							       bo->pages_dma_addr[i],
    23							       PAGE_SIZE, DMA_BIDIRECTIONAL);
    24				}
    25			}
    26	
    27			if (bo->pages)
    28				drm_gem_put_pages(&bo->gem, bo->pages, true, true);
    29		}
    30	
    31		kfree(bo->pages_dma_addr);
    32		drm_gem_object_release(&bo->gem);
    33		kfree(bo);
    34	}
    35	
    36	static struct lima_bo *lima_bo_create_struct(struct lima_device *dev, u32 size, u32 flags,
    37						     struct reservation_object *resv)
    38	{
    39		struct lima_bo *bo;
    40		int err;
    41	
    42		size = PAGE_ALIGN(size);
    43	
    44		bo = kzalloc(sizeof(*bo), GFP_KERNEL);
    45		if (!bo)
    46			return ERR_PTR(-ENOMEM);
    47	
    48		mutex_init(&bo->lock);
    49		INIT_LIST_HEAD(&bo->va);
  > 50		bo->gem.resv = resv;
    51	
    52		err = drm_gem_object_init(dev->ddev, &bo->gem, size);
    53		if (err) {
    54			kfree(bo);
    55			return ERR_PTR(err);
    56		}
    57	
    58		return bo;
    59	}
    60	
  > 61	struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
    62				       u32 flags, struct sg_table *sgt,
    63				       struct reservation_object *resv)
    64	{
    65		int i, err;
    66		size_t npages;
    67		struct lima_bo *bo, *ret;
    68	
  > 69		bo = lima_bo_create_struct(dev, size, flags, resv);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 53145 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/lima/attachments/20190310/6cca569e/attachment-0001.gz>


More information about the lima mailing list