Hi Zack,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on drm-intel/for-linux-next-fixes drm-misc/drm-misc-next 
drm-tip/drm-tip linus/master v6.11-rc3 next-20240816]
[cannot apply to drm-exynos/exynos-drm-next drm-intel/for-linux-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#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Zack-Rusin/drm-vmwgfx-Fix-prime-with-external-buffers/20240815-234842
base:   git://anongit.freedesktop.org/drm/drm drm-next
patch link:    
https://lore.kernel.org/r/20240815153404.630214-2-zack.rusin%40broadcom.com
patch subject: [PATCH v3 2/2] drm/vmwgfx: Fix prime with external buffers
config: i386-allmodconfig 
(https://download.01.org/0day-ci/archive/20240816/202408162343.umopamf9-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240816/202408162343.umopamf9-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202408162343.umopamf9-...@intel.com/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/vmwgfx/vmwgfx_blit.c: In function 'vmw_external_bo_copy':
>> drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:503:25: error: implicit declaration of 
>> function 'floor' [-Werror=implicit-function-declaration]
     503 |         diff->rect.y1 = floor(dst_offset / dst_stride);
         |                         ^~~~~
   cc1: some warnings being treated as errors


vim +/floor +503 drivers/gpu/drm/vmwgfx/vmwgfx_blit.c

   455  
   456  static int vmw_external_bo_copy(struct vmw_bo *dst, u32 dst_offset,
   457                                  u32 dst_stride, struct vmw_bo *src,
   458                                  u32 src_offset, u32 src_stride,
   459                                  u32 width_in_bytes, u32 height,
   460                                  struct vmw_diff_cpy *diff)
   461  {
   462          struct vmw_private *vmw =
   463                  container_of(dst->tbo.bdev, struct vmw_private, bdev);
   464          size_t dst_size = dst->tbo.resource->size;
   465          size_t src_size = src->tbo.resource->size;
   466          struct iosys_map dst_map = {0};
   467          struct iosys_map src_map = {0};
   468          int ret, i;
   469          u8 *vsrc;
   470          u8 *vdst;
   471  
   472          vsrc = map_external(src, &src_map);
   473          if (!vsrc) {
   474                  drm_dbg_driver(&vmw->drm, "Wasn't able to map src\n");
   475                  ret = -ENOMEM;
   476                  goto out;
   477          }
   478  
   479          vdst = map_external(dst, &dst_map);
   480          if (!vdst) {
   481                  drm_dbg_driver(&vmw->drm, "Wasn't able to map dst\n");
   482                  ret = -ENOMEM;
   483                  goto out;
   484          }
   485  
   486          vsrc += src_offset;
   487          vdst += dst_offset;
   488          if (src_stride == dst_stride) {
   489                  dst_size -= dst_offset;
   490                  src_size -= src_offset;
   491                  memcpy(vdst, vsrc,
   492                         min(dst_stride * height, min(dst_size, 
src_size)));
   493          } else {
   494                  WARN_ON(dst_stride < width_in_bytes);
   495                  for (i = 0; i < height; ++i) {
   496                          memcpy(vdst, vsrc, width_in_bytes);
   497                          vsrc += src_stride;
   498                          vdst += dst_stride;
   499                  }
   500          }
   501  
   502          diff->rect.x1 = (dst_offset % dst_stride) / diff->cpp;
 > 503          diff->rect.y1 = floor(dst_offset / dst_stride);
   504          diff->rect.x2 = diff->rect.x1 + width_in_bytes / diff->cpp;
   505          diff->rect.y2 = diff->rect.y1 + height;
   506  
   507          ret = 0;
   508  out:
   509          unmap_external(src, &src_map);
   510          unmap_external(dst, &dst_map);
   511  
   512          return ret;
   513  }
   514  

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

Reply via email to