[PATCH 2/2] drm/ttm: replace context flags with bools

kernel test robot lkp at intel.com
Mon Nov 2 19:51:51 UTC 2020


Hi "Christian,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]
[also build test ERROR on next-20201102]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.10-rc2]
[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/Christian-K-nig/drm-ttm-rework-no_retry-handling/20201102-205950
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-a004-20201102 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cc91554ebb66e8c9a4b8c67ca2f1343eaac10cf6)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/1010fe871b783d6385714dbfde4e57ed966b6749
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Christian-K-nig/drm-ttm-rework-no_retry-handling/20201102-205950
        git checkout 1010fe871b783d6385714dbfde4e57ed966b6749
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:408:4: error: field designator 'flags' does not refer to any field in type 'struct ttm_operation_ctx'
                   .flags = 0
                    ^
   1 error generated.
--
>> drivers/gpu/drm/ttm/ttm_bo_vm.c:318:5: error: field designator 'fource_alloc' does not refer to any field in type 'struct ttm_operation_ctx'; did you mean 'force_alloc'?
                           .fource_alloc = true
                            ^~~~~~~~~~~~
                            force_alloc
   include/drm/ttm/ttm_bo_api.h:212:7: note: 'force_alloc' declared here
           bool force_alloc;
                ^
   1 error generated.
--
>> drivers/gpu/drm/ttm/ttm_resource.c:92:4: error: field designator 'fource_alloc' does not refer to any field in type 'struct ttm_operation_ctx'; did you mean 'force_alloc'?
                   .fource_alloc = true
                    ^~~~~~~~~~~~
                    force_alloc
   include/drm/ttm/ttm_bo_api.h:212:7: note: 'force_alloc' declared here
           bool force_alloc;
                ^
   1 error generated.

vim +408 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

d38ceaf99ed015f Alex Deucher      2015-04-20  399  
14fd833efa3f136 Chunming Zhou     2016-08-04  400  static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p,
14fd833efa3f136 Chunming Zhou     2016-08-04  401  				 struct amdgpu_bo *bo)
d38ceaf99ed015f Alex Deucher      2015-04-20  402  {
a7d64de659946e8 Christian König   2016-09-15  403  	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
9251859a9adb8e5 Roger He          2017-12-08  404  	struct ttm_operation_ctx ctx = {
9251859a9adb8e5 Roger He          2017-12-08  405  		.interruptible = true,
9251859a9adb8e5 Roger He          2017-12-08  406  		.no_wait_gpu = false,
5a5011a72489545 Gerd Hoffmann     2019-08-05  407  		.resv = bo->tbo.base.resv,
d330fca11500beb Roger He          2018-02-06 @408  		.flags = 0
9251859a9adb8e5 Roger He          2017-12-08  409  	};
36409d122cb84fa Christian König   2015-12-21  410  	uint32_t domain;
14fd833efa3f136 Chunming Zhou     2016-08-04  411  	int r;
2f568dbd6b944c2 Christian König   2016-02-23  412  
4671078eb8e390b Christian König   2020-09-21  413  	if (bo->tbo.pin_count)
14fd833efa3f136 Chunming Zhou     2016-08-04  414  		return 0;
36409d122cb84fa Christian König   2015-12-21  415  
95844d20ae024b5 Marek Olšák       2016-08-17  416  	/* Don't move this buffer if we have depleted our allowance
95844d20ae024b5 Marek Olšák       2016-08-17  417  	 * to move it. Don't move anything if the threshold is zero.
d38ceaf99ed015f Alex Deucher      2015-04-20  418  	 */
4993ba02635f69e Christian König   2019-05-06  419  	if (p->bytes_moved < p->bytes_moved_threshold &&
4993ba02635f69e Christian König   2019-05-06  420  	    (!bo->tbo.base.dma_buf ||
4993ba02635f69e Christian König   2019-05-06  421  	    list_empty(&bo->tbo.base.dma_buf->attachments))) {
c8c5e569c5b0c9a Andrey Grodzovsky 2018-06-12  422  		if (!amdgpu_gmc_vram_full_visible(&adev->gmc) &&
00f06b246a3056b John Brooks       2017-06-27  423  		    (bo->flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED)) {
00f06b246a3056b John Brooks       2017-06-27  424  			/* And don't move a CPU_ACCESS_REQUIRED BO to limited
00f06b246a3056b John Brooks       2017-06-27  425  			 * visible VRAM if we've depleted our allowance to do
00f06b246a3056b John Brooks       2017-06-27  426  			 * that.
00f06b246a3056b John Brooks       2017-06-27  427  			 */
00f06b246a3056b John Brooks       2017-06-27  428  			if (p->bytes_moved_vis < p->bytes_moved_vis_threshold)
6d7d9c5aa212d06 Kent Russell      2017-08-08  429  				domain = bo->preferred_domains;
36409d122cb84fa Christian König   2015-12-21  430  			else
1ea863fd736eed8 Christian König   2015-12-18  431  				domain = bo->allowed_domains;
00f06b246a3056b John Brooks       2017-06-27  432  		} else {
6d7d9c5aa212d06 Kent Russell      2017-08-08  433  			domain = bo->preferred_domains;
00f06b246a3056b John Brooks       2017-06-27  434  		}
00f06b246a3056b John Brooks       2017-06-27  435  	} else {
00f06b246a3056b John Brooks       2017-06-27  436  		domain = bo->allowed_domains;
00f06b246a3056b John Brooks       2017-06-27  437  	}
d38ceaf99ed015f Alex Deucher      2015-04-20  438  
d38ceaf99ed015f Alex Deucher      2015-04-20  439  retry:
c704ab18e0a26a5 Christian König   2018-07-16  440  	amdgpu_bo_placement_from_domain(bo, domain);
19be5570107108f Christian König   2017-04-12  441  	r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
6af046d26f34278 Christian König   2017-04-27  442  
6af046d26f34278 Christian König   2017-04-27  443  	p->bytes_moved += ctx.bytes_moved;
c8c5e569c5b0c9a Andrey Grodzovsky 2018-06-12  444  	if (!amdgpu_gmc_vram_full_visible(&adev->gmc) &&
5422a28fe86f9f7 Christian König   2018-04-05  445  	    amdgpu_bo_in_cpu_visible_vram(bo))
6af046d26f34278 Christian König   2017-04-27  446  		p->bytes_moved_vis += ctx.bytes_moved;
d38ceaf99ed015f Alex Deucher      2015-04-20  447  
1abdc3d73dd9dc2 Christian König   2016-08-31  448  	if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains) {
1ea863fd736eed8 Christian König   2015-12-18  449  		domain = bo->allowed_domains;
d38ceaf99ed015f Alex Deucher      2015-04-20  450  		goto retry;
d38ceaf99ed015f Alex Deucher      2015-04-20  451  	}
14fd833efa3f136 Chunming Zhou     2016-08-04  452  
14fd833efa3f136 Chunming Zhou     2016-08-04  453  	return r;
14fd833efa3f136 Chunming Zhou     2016-08-04  454  }
14fd833efa3f136 Chunming Zhou     2016-08-04  455  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 37737 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201103/a68a08a6/attachment-0001.gz>


More information about the dri-devel mailing list