All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Oak Zeng <Oak.Zeng@amd.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	brahma_sw_dev@amd.com
Cc: Oak Zeng <Oak.Zeng@amd.com>,
	Felix.Kuehling@amd.com, harish.kasiviswanathan@amd.com,
	clang-built-linux@googlegroups.com, jinhuieric.huang@amd.com,
	Alexander.Deucher@amd.com, christian.koenig@amd.com
Subject: Re: [PATCH] drm/ttm: ioremap buffer according to TTM mem caching setting
Date: Fri, 5 Mar 2021 03:04:10 +0800	[thread overview]
Message-ID: <202103050204.sphltByh-lkp@intel.com> (raw)
In-Reply-To: <1614873891-5836-1-git-send-email-Oak.Zeng@amd.com>

[-- Attachment #1: Type: text/plain, Size: 6479 bytes --]

Hi Oak,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip linus/master v5.12-rc1 next-20210304]
[cannot apply to tegra-drm/drm/tegra/for-next drm-exynos/exynos-drm-next drm/drm-next]
[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/Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210305-000626
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm64-randconfig-r021-20210304 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project eec7f8f7b1226be422a76542cb403d02538f453a)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/e89ba86e56d95eb097cacfac83b667a92acbf56b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210305-000626
        git checkout e89ba86e56d95eb097cacfac83b667a92acbf56b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/ttm/ttm_bo_util.c:508:3: error: expected expression
                   else
                   ^
   1 error generated.


vim +508 drivers/gpu/drm/ttm/ttm_bo_util.c

ba4e7d973dd09b66 Thomas Hellstrom  2009-06-10  485  
43676605f890b218 Thomas Zimmermann 2020-11-03  486  int ttm_bo_vmap(struct ttm_buffer_object *bo, struct dma_buf_map *map)
43676605f890b218 Thomas Zimmermann 2020-11-03  487  {
43676605f890b218 Thomas Zimmermann 2020-11-03  488  	struct ttm_resource *mem = &bo->mem;
43676605f890b218 Thomas Zimmermann 2020-11-03  489  	int ret;
43676605f890b218 Thomas Zimmermann 2020-11-03  490  
43676605f890b218 Thomas Zimmermann 2020-11-03  491  	ret = ttm_mem_io_reserve(bo->bdev, mem);
43676605f890b218 Thomas Zimmermann 2020-11-03  492  	if (ret)
43676605f890b218 Thomas Zimmermann 2020-11-03  493  		return ret;
43676605f890b218 Thomas Zimmermann 2020-11-03  494  
43676605f890b218 Thomas Zimmermann 2020-11-03  495  	if (mem->bus.is_iomem) {
43676605f890b218 Thomas Zimmermann 2020-11-03  496  		void __iomem *vaddr_iomem;
43676605f890b218 Thomas Zimmermann 2020-11-03  497  
43676605f890b218 Thomas Zimmermann 2020-11-03  498  		if (mem->bus.addr)
43676605f890b218 Thomas Zimmermann 2020-11-03  499  			vaddr_iomem = (void __iomem *)mem->bus.addr;
43676605f890b218 Thomas Zimmermann 2020-11-03  500  		else if (mem->bus.caching == ttm_write_combined)
e11bfb99d6ece23b Christian König   2020-12-09  501  			vaddr_iomem = ioremap_wc(mem->bus.offset,
e11bfb99d6ece23b Christian König   2020-12-09  502  						 bo->base.size);
e89ba86e56d95eb0 Oak Zeng          2021-03-04  503  		else if (mem->bus.caching == ttm_cached)
e89ba86e56d95eb0 Oak Zeng          2021-03-04  504  #ifdef CONFIG_X86
e89ba86e56d95eb0 Oak Zeng          2021-03-04  505  			vaddr_iomem = ioremap_cache(mem->bus.offset,
e89ba86e56d95eb0 Oak Zeng          2021-03-04  506  						  bo->base.size);
e89ba86e56d95eb0 Oak Zeng          2021-03-04  507  #endif
43676605f890b218 Thomas Zimmermann 2020-11-03 @508  		else
e11bfb99d6ece23b Christian König   2020-12-09  509  			vaddr_iomem = ioremap(mem->bus.offset, bo->base.size);
43676605f890b218 Thomas Zimmermann 2020-11-03  510  
43676605f890b218 Thomas Zimmermann 2020-11-03  511  		if (!vaddr_iomem)
43676605f890b218 Thomas Zimmermann 2020-11-03  512  			return -ENOMEM;
43676605f890b218 Thomas Zimmermann 2020-11-03  513  
43676605f890b218 Thomas Zimmermann 2020-11-03  514  		dma_buf_map_set_vaddr_iomem(map, vaddr_iomem);
43676605f890b218 Thomas Zimmermann 2020-11-03  515  
43676605f890b218 Thomas Zimmermann 2020-11-03  516  	} else {
43676605f890b218 Thomas Zimmermann 2020-11-03  517  		struct ttm_operation_ctx ctx = {
43676605f890b218 Thomas Zimmermann 2020-11-03  518  			.interruptible = false,
43676605f890b218 Thomas Zimmermann 2020-11-03  519  			.no_wait_gpu = false
43676605f890b218 Thomas Zimmermann 2020-11-03  520  		};
43676605f890b218 Thomas Zimmermann 2020-11-03  521  		struct ttm_tt *ttm = bo->ttm;
43676605f890b218 Thomas Zimmermann 2020-11-03  522  		pgprot_t prot;
43676605f890b218 Thomas Zimmermann 2020-11-03  523  		void *vaddr;
43676605f890b218 Thomas Zimmermann 2020-11-03  524  
43676605f890b218 Thomas Zimmermann 2020-11-03  525  		ret = ttm_tt_populate(bo->bdev, ttm, &ctx);
43676605f890b218 Thomas Zimmermann 2020-11-03  526  		if (ret)
43676605f890b218 Thomas Zimmermann 2020-11-03  527  			return ret;
43676605f890b218 Thomas Zimmermann 2020-11-03  528  
43676605f890b218 Thomas Zimmermann 2020-11-03  529  		/*
43676605f890b218 Thomas Zimmermann 2020-11-03  530  		 * We need to use vmap to get the desired page protection
43676605f890b218 Thomas Zimmermann 2020-11-03  531  		 * or to make the buffer object look contiguous.
43676605f890b218 Thomas Zimmermann 2020-11-03  532  		 */
43676605f890b218 Thomas Zimmermann 2020-11-03  533  		prot = ttm_io_prot(bo, mem, PAGE_KERNEL);
e11bfb99d6ece23b Christian König   2020-12-09  534  		vaddr = vmap(ttm->pages, ttm->num_pages, 0, prot);
43676605f890b218 Thomas Zimmermann 2020-11-03  535  		if (!vaddr)
43676605f890b218 Thomas Zimmermann 2020-11-03  536  			return -ENOMEM;
43676605f890b218 Thomas Zimmermann 2020-11-03  537  
43676605f890b218 Thomas Zimmermann 2020-11-03  538  		dma_buf_map_set_vaddr(map, vaddr);
43676605f890b218 Thomas Zimmermann 2020-11-03  539  	}
43676605f890b218 Thomas Zimmermann 2020-11-03  540  
43676605f890b218 Thomas Zimmermann 2020-11-03  541  	return 0;
43676605f890b218 Thomas Zimmermann 2020-11-03  542  }
43676605f890b218 Thomas Zimmermann 2020-11-03  543  EXPORT_SYMBOL(ttm_bo_vmap);
43676605f890b218 Thomas Zimmermann 2020-11-03  544  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32097 bytes --]

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Oak Zeng <Oak.Zeng@amd.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	brahma_sw_dev@amd.com
Cc: Oak Zeng <Oak.Zeng@amd.com>,
	Felix.Kuehling@amd.com, harish.kasiviswanathan@amd.com,
	clang-built-linux@googlegroups.com, jinhuieric.huang@amd.com,
	Alexander.Deucher@amd.com, christian.koenig@amd.com
Subject: Re: [PATCH] drm/ttm: ioremap buffer according to TTM mem caching setting
Date: Fri, 5 Mar 2021 03:04:10 +0800	[thread overview]
Message-ID: <202103050204.sphltByh-lkp@intel.com> (raw)
In-Reply-To: <1614873891-5836-1-git-send-email-Oak.Zeng@amd.com>

[-- Attachment #1: Type: text/plain, Size: 6479 bytes --]

Hi Oak,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip linus/master v5.12-rc1 next-20210304]
[cannot apply to tegra-drm/drm/tegra/for-next drm-exynos/exynos-drm-next drm/drm-next]
[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/Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210305-000626
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm64-randconfig-r021-20210304 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project eec7f8f7b1226be422a76542cb403d02538f453a)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/e89ba86e56d95eb097cacfac83b667a92acbf56b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210305-000626
        git checkout e89ba86e56d95eb097cacfac83b667a92acbf56b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/ttm/ttm_bo_util.c:508:3: error: expected expression
                   else
                   ^
   1 error generated.


vim +508 drivers/gpu/drm/ttm/ttm_bo_util.c

ba4e7d973dd09b66 Thomas Hellstrom  2009-06-10  485  
43676605f890b218 Thomas Zimmermann 2020-11-03  486  int ttm_bo_vmap(struct ttm_buffer_object *bo, struct dma_buf_map *map)
43676605f890b218 Thomas Zimmermann 2020-11-03  487  {
43676605f890b218 Thomas Zimmermann 2020-11-03  488  	struct ttm_resource *mem = &bo->mem;
43676605f890b218 Thomas Zimmermann 2020-11-03  489  	int ret;
43676605f890b218 Thomas Zimmermann 2020-11-03  490  
43676605f890b218 Thomas Zimmermann 2020-11-03  491  	ret = ttm_mem_io_reserve(bo->bdev, mem);
43676605f890b218 Thomas Zimmermann 2020-11-03  492  	if (ret)
43676605f890b218 Thomas Zimmermann 2020-11-03  493  		return ret;
43676605f890b218 Thomas Zimmermann 2020-11-03  494  
43676605f890b218 Thomas Zimmermann 2020-11-03  495  	if (mem->bus.is_iomem) {
43676605f890b218 Thomas Zimmermann 2020-11-03  496  		void __iomem *vaddr_iomem;
43676605f890b218 Thomas Zimmermann 2020-11-03  497  
43676605f890b218 Thomas Zimmermann 2020-11-03  498  		if (mem->bus.addr)
43676605f890b218 Thomas Zimmermann 2020-11-03  499  			vaddr_iomem = (void __iomem *)mem->bus.addr;
43676605f890b218 Thomas Zimmermann 2020-11-03  500  		else if (mem->bus.caching == ttm_write_combined)
e11bfb99d6ece23b Christian König   2020-12-09  501  			vaddr_iomem = ioremap_wc(mem->bus.offset,
e11bfb99d6ece23b Christian König   2020-12-09  502  						 bo->base.size);
e89ba86e56d95eb0 Oak Zeng          2021-03-04  503  		else if (mem->bus.caching == ttm_cached)
e89ba86e56d95eb0 Oak Zeng          2021-03-04  504  #ifdef CONFIG_X86
e89ba86e56d95eb0 Oak Zeng          2021-03-04  505  			vaddr_iomem = ioremap_cache(mem->bus.offset,
e89ba86e56d95eb0 Oak Zeng          2021-03-04  506  						  bo->base.size);
e89ba86e56d95eb0 Oak Zeng          2021-03-04  507  #endif
43676605f890b218 Thomas Zimmermann 2020-11-03 @508  		else
e11bfb99d6ece23b Christian König   2020-12-09  509  			vaddr_iomem = ioremap(mem->bus.offset, bo->base.size);
43676605f890b218 Thomas Zimmermann 2020-11-03  510  
43676605f890b218 Thomas Zimmermann 2020-11-03  511  		if (!vaddr_iomem)
43676605f890b218 Thomas Zimmermann 2020-11-03  512  			return -ENOMEM;
43676605f890b218 Thomas Zimmermann 2020-11-03  513  
43676605f890b218 Thomas Zimmermann 2020-11-03  514  		dma_buf_map_set_vaddr_iomem(map, vaddr_iomem);
43676605f890b218 Thomas Zimmermann 2020-11-03  515  
43676605f890b218 Thomas Zimmermann 2020-11-03  516  	} else {
43676605f890b218 Thomas Zimmermann 2020-11-03  517  		struct ttm_operation_ctx ctx = {
43676605f890b218 Thomas Zimmermann 2020-11-03  518  			.interruptible = false,
43676605f890b218 Thomas Zimmermann 2020-11-03  519  			.no_wait_gpu = false
43676605f890b218 Thomas Zimmermann 2020-11-03  520  		};
43676605f890b218 Thomas Zimmermann 2020-11-03  521  		struct ttm_tt *ttm = bo->ttm;
43676605f890b218 Thomas Zimmermann 2020-11-03  522  		pgprot_t prot;
43676605f890b218 Thomas Zimmermann 2020-11-03  523  		void *vaddr;
43676605f890b218 Thomas Zimmermann 2020-11-03  524  
43676605f890b218 Thomas Zimmermann 2020-11-03  525  		ret = ttm_tt_populate(bo->bdev, ttm, &ctx);
43676605f890b218 Thomas Zimmermann 2020-11-03  526  		if (ret)
43676605f890b218 Thomas Zimmermann 2020-11-03  527  			return ret;
43676605f890b218 Thomas Zimmermann 2020-11-03  528  
43676605f890b218 Thomas Zimmermann 2020-11-03  529  		/*
43676605f890b218 Thomas Zimmermann 2020-11-03  530  		 * We need to use vmap to get the desired page protection
43676605f890b218 Thomas Zimmermann 2020-11-03  531  		 * or to make the buffer object look contiguous.
43676605f890b218 Thomas Zimmermann 2020-11-03  532  		 */
43676605f890b218 Thomas Zimmermann 2020-11-03  533  		prot = ttm_io_prot(bo, mem, PAGE_KERNEL);
e11bfb99d6ece23b Christian König   2020-12-09  534  		vaddr = vmap(ttm->pages, ttm->num_pages, 0, prot);
43676605f890b218 Thomas Zimmermann 2020-11-03  535  		if (!vaddr)
43676605f890b218 Thomas Zimmermann 2020-11-03  536  			return -ENOMEM;
43676605f890b218 Thomas Zimmermann 2020-11-03  537  
43676605f890b218 Thomas Zimmermann 2020-11-03  538  		dma_buf_map_set_vaddr(map, vaddr);
43676605f890b218 Thomas Zimmermann 2020-11-03  539  	}
43676605f890b218 Thomas Zimmermann 2020-11-03  540  
43676605f890b218 Thomas Zimmermann 2020-11-03  541  	return 0;
43676605f890b218 Thomas Zimmermann 2020-11-03  542  }
43676605f890b218 Thomas Zimmermann 2020-11-03  543  EXPORT_SYMBOL(ttm_bo_vmap);
43676605f890b218 Thomas Zimmermann 2020-11-03  544  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32097 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

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

  parent reply	other threads:[~2021-03-04 19:07 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 16:04 [PATCH] drm/ttm: ioremap buffer according to TTM mem caching setting Oak Zeng
2021-03-04 16:04 ` Oak Zeng
2021-03-04 17:01 ` Bhardwaj, Rajneesh
2021-03-04 17:01   ` Bhardwaj, Rajneesh
2021-03-04 17:31   ` Christian König
2021-03-04 17:31     ` Christian König
2021-03-04 17:40     ` Bhardwaj, Rajneesh
2021-03-04 17:40       ` Bhardwaj, Rajneesh
2021-03-04 18:05       ` Christian König
2021-03-04 18:05         ` Christian König
2021-03-04 19:00 ` kernel test robot
2021-03-04 19:00   ` kernel test robot
2021-03-04 19:04 ` kernel test robot [this message]
2021-03-04 19:04   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-03-04 19:16 Oak Zeng
2021-03-03 21:12 Oak Zeng
2021-03-03 21:12 ` Oak Zeng
2021-03-04  7:48 ` Christian König
2021-03-04  7:48   ` Christian König
2021-03-01 22:43 Oak Zeng
2021-03-01 22:43 ` Oak Zeng
2021-03-02  2:16 ` kernel test robot
2021-03-02  2:16   ` kernel test robot
2021-03-02  2:16   ` kernel test robot
2021-03-02  4:12 ` kernel test robot
2021-03-02  4:12   ` kernel test robot
2021-03-02  4:12   ` kernel test robot
2021-03-02 11:31   ` Christian König
2021-03-02 11:31     ` Christian König
2021-03-02 22:45     ` Zeng, Oak
2021-03-02 22:45     ` Zeng, Oak
2021-03-02 22:45       ` Zeng, Oak
2021-03-02 22:53       ` Dave Airlie
2021-03-02 22:53         ` Dave Airlie
2021-03-02 22:53         ` Dave Airlie
2021-03-03 10:45       ` Christian König
2021-03-03 10:45         ` Christian König
2021-03-03 20:59         ` Zeng, Oak
2021-03-03 20:59           ` Zeng, Oak
2021-03-04  7:46           ` Christian König
2021-03-04  7:46             ` Christian König
2021-03-11 13:06             ` Daniel Vetter
2021-03-11 13:06               ` Daniel Vetter
2021-03-11 13:06               ` Daniel Vetter
2021-03-03 20:59         ` Zeng, Oak
2021-03-03  8:49 ` Thomas Zimmermann
2021-03-03  8:49   ` Thomas Zimmermann
2021-03-03 10:37   ` Christian König
2021-03-03 10:37     ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202103050204.sphltByh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Oak.Zeng@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=brahma_sw_dev@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harish.kasiviswanathan@amd.com \
    --cc=jinhuieric.huang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.