Hi Mohamed,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on drm/drm-next drm-exynos/exynos-drm-next 
drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip 
linus/master v6.18-rc5 next-20251110]
[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/Mohamed-Ahmed/drm-nouveau-uvmm-Prepare-for-larger-pages/20251109-035142
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    
https://lore.kernel.org/r/20251108194919.68754-3-mohamedahmedegypt2001%40gmail.com
patch subject: [PATCH v5 2/5] drm/nouveau/uvmm: Allow larger pages
config: i386-randconfig-141-20251110 
(https://download.01.org/0day-ci/archive/20251110/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 
87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251110/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/nouveau/nouveau_uvmm.c:508:16: error: incompatible pointer 
>> types passing 'struct drm_device *' to parameter of type 'const struct 
>> device *' [-Werror,-Wincompatible-pointer-types]
     508 |         dev_warn_once(op->gem.obj->dev, "Could not find an 
appropriate page size.\n");
         |                       ^~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:201:27: note: expanded from macro 'dev_warn_once'
     201 |         dev_level_once(dev_warn, dev, fmt, ##__VA_ARGS__)
         |                                  ^~~
   include/linux/dev_printk.h:181:13: note: expanded from macro 'dev_level_once'
     181 |                 dev_level(dev, fmt, ##__VA_ARGS__);                  
   \
         |                           ^~~
   include/linux/dev_printk.h:156:49: note: expanded from macro 'dev_warn'
     156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, 
dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~
   include/linux/dev_printk.h:110:11: note: expanded from macro 
'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                    
   \
         |                         ^~~
   include/linux/dev_printk.h:52:37: note: passing argument to parameter 'dev' 
here
      52 | void _dev_warn(const struct device *dev, const char *fmt, ...);
         |                                     ^
   1 error generated.


vim +508 drivers/gpu/drm/nouveau/nouveau_uvmm.c

   466  
   467  static u8
   468  select_page_shift(struct nouveau_uvmm *uvmm, struct drm_gpuva_op_map 
*op)
   469  {
   470          struct nouveau_bo *nvbo = nouveau_gem_object(op->gem.obj);
   471  
   472          /* nouveau_bo_fixup_align() guarantees that the page size will 
be aligned
   473           * for most cases, but it can't handle cases where userspace 
allocates with
   474           * a size and then binds with a smaller granularity. So in 
order to avoid
   475           * breaking old userspace, we need to ensure that the VA is 
actually
   476           * aligned before using it, and if it isn't, then we downgrade 
to the first
   477           * granularity that will fit, which is optimal from a 
correctness and
   478           * performance perspective.
   479           */
   480          if (op_map_aligned_to_page_shift(op, nvbo->page))
   481                  return nvbo->page;
   482  
   483          struct nouveau_mem *mem = nouveau_mem(nvbo->bo.resource);
   484          struct nvif_vmm *vmm = &uvmm->vmm.vmm;
   485          int i;
   486  
   487          /* If the given granularity doesn't fit, let's find one that 
will fit. */
   488          for (i = 0; i < vmm->page_nr; i++) {
   489                  /* Ignore anything that is bigger or identical to the 
BO preference. */
   490                  if (vmm->page[i].shift >= nvbo->page)
   491                          continue;
   492  
   493                  /* Skip incompatible domains. */
   494                  if ((mem->mem.type & NVIF_MEM_VRAM) && 
!vmm->page[i].vram)
   495                          continue;
   496                  if ((mem->mem.type & NVIF_MEM_HOST) &&
   497                      (!vmm->page[i].host || vmm->page[i].shift > 
PAGE_SHIFT))
   498                          continue;
   499  
   500                  /* If it fits, return the proposed shift. */
   501                  if (op_map_aligned_to_page_shift(op, 
vmm->page[i].shift))
   502                          return vmm->page[i].shift;
   503          }
   504  
   505          /* If we get here then nothing can reconcile the requirements. 
This should never
   506           * happen.
   507           */
 > 508          dev_warn_once(op->gem.obj->dev, "Could not find an appropriate 
 > page size.\n");
   509  
   510          return PAGE_SHIFT;
   511  }
   512  

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

Reply via email to