[drm-tip:drm-tip 548/565] drivers/gpu/drm/i915/gem/i915_gem_context.c:813:29: sparse: sparse: incorrect type in argument 1 (different address spaces)

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

 



tree:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
head:   f99065c68952afc90504325a19125d95e6b84abc
commit: a4e7ccdac38ec8335d9e4e2656c1a041c77feae1 [548/565] drm/i915: Move context management under GEM
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-42-g38eda53-dirty
        git checkout a4e7ccdac38ec8335d9e4e2656c1a041c77feae1
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/i915/gem/i915_gem_context.c:813:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct i915_address_space *vm @@    got struct i915_addresstruct i915_address_space *vm @@
>> drivers/gpu/drm/i915/gem/i915_gem_context.c:813:29: sparse:    expected struct i915_address_space *vm
>> drivers/gpu/drm/i915/gem/i915_gem_context.c:813:29: sparse:    got struct i915_address_space [noderef] <asn:4> *vm
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1748:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct i915_gem_engines *e @@    got struct i915_gem_enstruct i915_gem_engines *e @@
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1748:25: sparse:    expected struct i915_gem_engines *e
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1748:25: sparse:    got struct i915_gem_engines [noderef] <asn:4> *engines
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1783:15: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct i915_gem_engines *clone @@    got struct i915_gem_enstruct i915_gem_engines *clone @@
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1783:15: sparse:    expected struct i915_gem_engines *clone
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1783:15: sparse:    got struct i915_gem_engines [noderef] <asn:4> *engines
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:773:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected struct i915_address_space *[assigned] vm @@    got struct struct i915_address_space *[assigned] vm @@
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:773:51: sparse:    expected struct i915_address_space *[assigned] vm
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:773:51: sparse:    got struct i915_address_space [noderef] <asn:4> *vm
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:780:64: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected struct i915_address_space *vm @@    got struct i915_addresstruct i915_address_space *vm @@
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:780:64: sparse:    expected struct i915_address_space *vm
   drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:780:64: sparse:    got struct i915_address_space [noderef] <asn:4> *vm
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:1694:25: sparse: sparse: dereference of noderef expression

vim +813 drivers/gpu/drm/i915/gem/i915_gem_context.c

85fddf0b002719 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-09  801  
cde5f7edd511b1 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-30  802  static int get_ppgtt(struct drm_i915_file_private *file_priv,
cde5f7edd511b1 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-30  803  		     struct i915_gem_context *ctx,
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  804  		     struct drm_i915_gem_context_param *args)
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  805  {
e568ac3874be7d drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-06-11  806  	struct i915_address_space *vm;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  807  	int ret;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  808  
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-04  809  	if (!rcu_access_pointer(ctx->vm))
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  810  		return -ENODEV;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  811  
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-04  812  	rcu_read_lock();
e568ac3874be7d drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-06-11 @813  	vm = i915_vm_get(ctx->vm);
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-04  814  	rcu_read_unlock();
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  815  
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  816  	ret = mutex_lock_interruptible(&file_priv->vm_idr_lock);
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  817  	if (ret)
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  818  		goto err_put;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  819  
e568ac3874be7d drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-06-11  820  	ret = idr_alloc(&file_priv->vm_idr, vm, 0, 0, GFP_KERNEL);
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  821  	GEM_BUG_ON(!ret);
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  822  	if (ret < 0)
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  823  		goto err_unlock;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  824  
2850748ef8763a drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-10-04  825  	i915_vm_open(vm);
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  826  
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  827  	args->size = 0;
1f2b4a7edbc3b8 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-04-25  828  	args->value = ret;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  829  
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  830  	ret = 0;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  831  err_unlock:
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  832  	mutex_unlock(&file_priv->vm_idr_lock);
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  833  err_put:
e568ac3874be7d drivers/gpu/drm/i915/gem/i915_gem_context.c Chris Wilson 2019-06-11  834  	i915_vm_put(vm);
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  835  	return ret;
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  836  }
e0695db7298ec2 drivers/gpu/drm/i915/i915_gem_context.c     Chris Wilson 2019-03-22  837  

:::::: The code at line 813 was first introduced by commit
:::::: e568ac3874be7dcef3da0cc3bd6b91ca9dd14aa0 drm/i915: Pull kref into i915_address_space

:::::: TO: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
:::::: CC: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
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