[drm-misc:for-linux-next 9/9] drivers/gpu/drm/vkms/vkms_formats.c:259: undefined reference to `__divdi3'

kernel test robot lkp at intel.com
Tue Sep 6 00:32:24 UTC 2022


tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next
head:   396369d6754993e40f1c84b2e22e40e92dfa4c49
commit: 396369d6754993e40f1c84b2e22e40e92dfa4c49 [9/9] drm: vkms: Add support to the RGB565 format
config: i386-randconfig-a006-20220905 (https://download.01.org/0day-ci/archive/20220906/202209060813.wci1hZUA-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        git remote add drm-misc git://anongit.freedesktop.org/drm/drm-misc
        git fetch --no-tags drm-misc for-linux-next
        git checkout 396369d6754993e40f1c84b2e22e40e92dfa4c49
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   ld: warning: arch/x86/lib/retpoline.o: missing .note.GNU-stack section implies executable stack
   ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
   ld: drivers/gpu/drm/vkms/vkms_formats.o: in function `argb_u16_to_RGB565':
>> drivers/gpu/drm/vkms/vkms_formats.c:259: undefined reference to `__divdi3'
>> ld: drivers/gpu/drm/vkms/vkms_formats.c:260: undefined reference to `__divdi3'
   ld: drivers/gpu/drm/vkms/vkms_formats.c:261: undefined reference to `__divdi3'


vim +259 drivers/gpu/drm/vkms/vkms_formats.c

   241	
   242	static void argb_u16_to_RGB565(struct vkms_frame_info *frame_info,
   243				       const struct line_buffer *src_buffer, int y)
   244	{
   245		int x_dst = frame_info->dst.x1;
   246		u16 *dst_pixels = packed_pixels_addr(frame_info, x_dst, y);
   247		struct pixel_argb_u16 *in_pixels = src_buffer->pixels;
   248		int x_limit = min_t(size_t, drm_rect_width(&frame_info->dst),
   249				    src_buffer->n_pixels);
   250	
   251		s32 fp_rb_ratio = INT_TO_FIXED_DIV(65535, 31);
   252		s32 fp_g_ratio = INT_TO_FIXED_DIV(65535, 63);
   253	
   254		for (size_t x = 0; x < x_limit; x++, dst_pixels++) {
   255			s32 fp_r = INT_TO_FIXED(in_pixels[x].r);
   256			s32 fp_g = INT_TO_FIXED(in_pixels[x].g);
   257			s32 fp_b = INT_TO_FIXED(in_pixels[x].b);
   258	
 > 259			u16 r = FIXED_TO_INT_ROUND(FIXED_DIV(fp_r, fp_rb_ratio));
 > 260			u16 g = FIXED_TO_INT_ROUND(FIXED_DIV(fp_g, fp_g_ratio));
   261			u16 b = FIXED_TO_INT_ROUND(FIXED_DIV(fp_b, fp_rb_ratio));
   262	
   263			*dst_pixels = cpu_to_le16(r << 11 | g << 5 | b);
   264		}
   265	}
   266	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


More information about the dri-devel mailing list