[PATCH v1 2/2] amdgpu: add debugfs file for pt-base per client-id

kernel test robot lkp at intel.com
Fri Jun 13 23:10:27 UTC 2025


Hi Sunil,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-exynos/exynos-drm-next]
[also build test ERROR on linus/master drm/drm-next v6.16-rc1 next-20250613]
[cannot apply to drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip]
[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/Sunil-Khatri/drm-add-debugfs-support-per-client-id/20250613-151800
base:   https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
patch link:    https://lore.kernel.org/r/20250613071537.701563-3-sunil.khatri%40amd.com
patch subject: [PATCH v1 2/2] amdgpu: add debugfs file for pt-base per client-id
config: arm64-randconfig-003-20250614 (https://download.01.org/0day-ci/archive/20250614/202506140646.VrFqwwXA-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250614/202506140646.VrFqwwXA-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/202506140646.VrFqwwXA-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:2622:66: error: use of undeclared identifier 'amdgpu_pt_base_fops'; did you mean 'amdgpu_dmabuf_ops'?
    2622 |         debugfs_create_file("pt_base", 0444, file->debugfs_client, vm, &amdgpu_pt_base_fops);
         |                                                                         ^~~~~~~~~~~~~~~~~~~
         |                                                                         amdgpu_dmabuf_ops
   drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h:35:33: note: 'amdgpu_dmabuf_ops' declared here
      35 | extern const struct dma_buf_ops amdgpu_dmabuf_ops;
         |                                 ^
   1 error generated.


vim +2622 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

  2532	
  2533	/**
  2534	 * amdgpu_vm_init - initialize a vm instance
  2535	 *
  2536	 * @adev: amdgpu_device pointer
  2537	 * @vm: requested vm
  2538	 * @xcp_id: GPU partition selection id
  2539	 *
  2540	 * Init @vm fields.
  2541	 *
  2542	 * Returns:
  2543	 * 0 for success, error for failure.
  2544	 */
  2545	int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
  2546			   int32_t xcp_id, struct drm_file *file)
  2547	{
  2548		struct amdgpu_bo *root_bo;
  2549		struct amdgpu_bo_vm *root;
  2550		int r, i;
  2551	
  2552		vm->va = RB_ROOT_CACHED;
  2553		for (i = 0; i < AMDGPU_MAX_VMHUBS; i++)
  2554			vm->reserved_vmid[i] = NULL;
  2555		INIT_LIST_HEAD(&vm->evicted);
  2556		INIT_LIST_HEAD(&vm->evicted_user);
  2557		INIT_LIST_HEAD(&vm->relocated);
  2558		INIT_LIST_HEAD(&vm->moved);
  2559		INIT_LIST_HEAD(&vm->idle);
  2560		INIT_LIST_HEAD(&vm->invalidated);
  2561		spin_lock_init(&vm->status_lock);
  2562		INIT_LIST_HEAD(&vm->freed);
  2563		INIT_LIST_HEAD(&vm->done);
  2564		INIT_KFIFO(vm->faults);
  2565	
  2566		r = amdgpu_vm_init_entities(adev, vm);
  2567		if (r)
  2568			return r;
  2569	
  2570		ttm_lru_bulk_move_init(&vm->lru_bulk_move);
  2571	
  2572		vm->is_compute_context = false;
  2573	
  2574		vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
  2575					    AMDGPU_VM_USE_CPU_FOR_GFX);
  2576	
  2577		DRM_DEBUG_DRIVER("VM update mode is %s\n",
  2578				 vm->use_cpu_for_update ? "CPU" : "SDMA");
  2579		WARN_ONCE((vm->use_cpu_for_update &&
  2580			   !amdgpu_gmc_vram_full_visible(&adev->gmc)),
  2581			  "CPU update of VM recommended only for large BAR system\n");
  2582	
  2583		if (vm->use_cpu_for_update)
  2584			vm->update_funcs = &amdgpu_vm_cpu_funcs;
  2585		else
  2586			vm->update_funcs = &amdgpu_vm_sdma_funcs;
  2587	
  2588		vm->last_update = dma_fence_get_stub();
  2589		vm->last_unlocked = dma_fence_get_stub();
  2590		vm->last_tlb_flush = dma_fence_get_stub();
  2591		vm->generation = amdgpu_vm_generation(adev, NULL);
  2592	
  2593		mutex_init(&vm->eviction_lock);
  2594		vm->evicting = false;
  2595		vm->tlb_fence_context = dma_fence_context_alloc(1);
  2596	
  2597		r = amdgpu_vm_pt_create(adev, vm, adev->vm_manager.root_level,
  2598					false, &root, xcp_id);
  2599		if (r)
  2600			goto error_free_delayed;
  2601	
  2602		root_bo = amdgpu_bo_ref(&root->bo);
  2603		r = amdgpu_bo_reserve(root_bo, true);
  2604		if (r) {
  2605			amdgpu_bo_unref(&root_bo);
  2606			goto error_free_delayed;
  2607		}
  2608	
  2609		amdgpu_vm_bo_base_init(&vm->root, vm, root_bo);
  2610		r = dma_resv_reserve_fences(root_bo->tbo.base.resv, 1);
  2611		if (r)
  2612			goto error_free_root;
  2613	
  2614		r = amdgpu_vm_pt_clear(adev, vm, root, false);
  2615		if (r)
  2616			goto error_free_root;
  2617	
  2618		r = amdgpu_vm_create_task_info(vm);
  2619		if (r)
  2620			DRM_DEBUG("Failed to create task info for VM\n");
  2621	
> 2622		debugfs_create_file("pt_base", 0444, file->debugfs_client, vm, &amdgpu_pt_base_fops);
  2623		amdgpu_bo_unreserve(vm->root.bo);
  2624		amdgpu_bo_unref(&root_bo);
  2625	
  2626		return 0;
  2627	
  2628	error_free_root:
  2629		amdgpu_vm_pt_free_root(adev, vm);
  2630		amdgpu_bo_unreserve(vm->root.bo);
  2631		amdgpu_bo_unref(&root_bo);
  2632	
  2633	error_free_delayed:
  2634		dma_fence_put(vm->last_tlb_flush);
  2635		dma_fence_put(vm->last_unlocked);
  2636		ttm_lru_bulk_move_fini(&adev->mman.bdev, &vm->lru_bulk_move);
  2637		amdgpu_vm_fini_entities(vm);
  2638	
  2639		return r;
  2640	}
  2641	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


More information about the dri-devel mailing list