[PATCH 3/4] drm/ttm: improve idle/busy handling
kernel test robot
lkp at intel.com
Thu Dec 14 08:30:46 UTC 2023
Hi Christian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.7-rc5 next-20231214]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Christian-K-nig/drm-ttm-replace-busy-placement-with-flags-v3/20231213-224456
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20231213144222.1871-3-christian.koenig%40amd.com
patch subject: [PATCH 3/4] drm/ttm: improve idle/busy handling
config: arm-defconfig (https://download.01.org/0day-ci/archive/20231214/202312141637.ciYxVFVl-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231214/202312141637.ciYxVFVl-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312141637.ciYxVFVl-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/ttm/ttm_resource.c:301: warning: Function parameter or member 'busy' not described in 'ttm_resource_compatible'
vim +301 drivers/gpu/drm/ttm/ttm_resource.c
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 289
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 290 /**
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 291 * ttm_resource_compatible - check if resource is compatible with placement
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 292 *
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 293 * @res: the resource to check
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 294 * @placement: the placement to check against
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 295 *
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 296 * Returns true if the placement is compatible.
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 297 */
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 298 bool ttm_resource_compatible(struct ttm_resource *res,
1e59504faf5d28 Christian König 2023-12-13 299 struct ttm_placement *placement,
1e59504faf5d28 Christian König 2023-12-13 300 bool busy)
98cca519df6da6 Christian König 2021-08-30 @301 {
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 302 struct ttm_buffer_object *bo = res->bo;
544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 303 struct ttm_device *bdev = bo->bdev;
98cca519df6da6 Christian König 2021-08-30 304 unsigned i;
98cca519df6da6 Christian König 2021-08-30 305
98cca519df6da6 Christian König 2021-08-30 306 if (res->placement & TTM_PL_FLAG_TEMPORARY)
98cca519df6da6 Christian König 2021-08-30 307 return false;
98cca519df6da6 Christian König 2021-08-30 308
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 309 for (i = 0; i < placement->num_placement; i++) {
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 310 const struct ttm_place *place = &placement->placement[i];
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 311 struct ttm_resource_manager *man;
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 312
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 313 if (res->mem_type != place->mem_type)
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 314 continue;
98cca519df6da6 Christian König 2021-08-30 315
1e59504faf5d28 Christian König 2023-12-13 316 if (place->flags & (busy ? TTM_PL_FLAG_IDLE : TTM_PL_FLAG_BUSY))
1e59504faf5d28 Christian König 2023-12-13 317 continue;
1e59504faf5d28 Christian König 2023-12-13 318
1e59504faf5d28 Christian König 2023-12-13 319 if (place->flags & TTM_PL_FLAG_CONTIGUOUS &&
1e59504faf5d28 Christian König 2023-12-13 320 !(res->placement & TTM_PL_FLAG_CONTIGUOUS))
1e59504faf5d28 Christian König 2023-12-13 321 continue;
1e59504faf5d28 Christian König 2023-12-13 322
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 323 man = ttm_manager_type(bdev, res->mem_type);
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 324 if (man->func->compatible &&
9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 325 !man->func->compatible(man, res, place, bo->base.size))
98cca519df6da6 Christian König 2021-08-30 326 continue;
98cca519df6da6 Christian König 2021-08-30 327
98cca519df6da6 Christian König 2021-08-30 328 return true;
98cca519df6da6 Christian König 2021-08-30 329 }
98cca519df6da6 Christian König 2021-08-30 330 return false;
98cca519df6da6 Christian König 2021-08-30 331 }
98cca519df6da6 Christian König 2021-08-30 332
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Intel-gfx
mailing list