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-randconfig-013-20240816 (https://download.01.org/0day-ci/archive/20240817/202408170033.rkCwgtSp-lkp@xxxxxxxxx/config) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240817/202408170033.rkCwgtSp-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202408170033.rkCwgtSp-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:503:18: error: call to undeclared function 'floor'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 503 | diff->rect.y1 = floor(dst_offset / dst_stride); | ^ 1 error generated. 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