Re: [PATCH 2/2] drm/ttm: move memory accounting into vmwgfx

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

 



Hi "Christian,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]
[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 next-20201215]
[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-ttm_tt-page-limit-v2/20201216-221614
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-c001-20201216 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/b613e371433208f88816be875b9d46b6d24cf830
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Christian-K-nig/drm-ttm-rework-ttm_tt-page-limit-v2/20201216-221614
        git checkout b613e371433208f88816be875b9d46b6d24cf830
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

   ld: drivers/gpu/drm/ttm/ttm_bo.o: in function `ttm_bo_global_init':
>> drivers/gpu/drm/ttm/ttm_bo.c:1242: undefined reference to `__udivdi3'


vim +1242 drivers/gpu/drm/ttm/ttm_bo.c

  1223	
  1224	static int ttm_bo_global_init(void)
  1225	{
  1226		struct ttm_bo_global *glob = &ttm_bo_glob;
  1227		uint64_t num_pages;
  1228		struct sysinfo si;
  1229		int ret = 0;
  1230		unsigned i;
  1231	
  1232		mutex_lock(&ttm_global_mutex);
  1233		if (++ttm_bo_glob_use_count > 1)
  1234			goto out;
  1235	
  1236		si_meminfo(&si);
  1237	
  1238		/* Limit the number of pages in the pool to about 50% of the total
  1239		 * system memory.
  1240		 */
  1241		num_pages = (u64)si.totalram * si.mem_unit;
> 1242		num_pages = (num_pages * 50 / 100) >> PAGE_SHIFT;
  1243	
  1244		ttm_pool_mgr_init(num_pages);
  1245		ttm_tt_mgr_init();
  1246	
  1247		spin_lock_init(&glob->lru_lock);
  1248		glob->dummy_read_page = alloc_page(__GFP_ZERO | GFP_DMA32);
  1249	
  1250		if (unlikely(glob->dummy_read_page == NULL)) {
  1251			ret = -ENOMEM;
  1252			goto out;
  1253		}
  1254	
  1255		for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i)
  1256			INIT_LIST_HEAD(&glob->swap_lru[i]);
  1257		INIT_LIST_HEAD(&glob->device_list);
  1258		atomic_set(&glob->bo_count, 0);
  1259	
  1260		ret = kobject_init_and_add(
  1261			&glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects");
  1262		if (unlikely(ret != 0))
  1263			kobject_put(&glob->kobj);
  1264	out:
  1265		mutex_unlock(&ttm_global_mutex);
  1266		return ret;
  1267	}
  1268	

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

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