[PATCH v5 1/6] drm/format-helper: Add drm_fb_blit_from_r1 and drm_fb_fill

kernel test robot lkp at intel.com
Sat Nov 4 06:04:55 UTC 2023


Hi Jocelyn,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ffc253263a1375a65fa6c9f62a893e9767fbebfa]

url:    https://github.com/intel-lab-lkp/linux/commits/Jocelyn-Falempe/drm-format-helper-Add-drm_fb_blit_from_r1-and-drm_fb_fill/20231103-225824
base:   ffc253263a1375a65fa6c9f62a893e9767fbebfa
patch link:    https://lore.kernel.org/r/20231103145526.628138-2-jfalempe%40redhat.com
patch subject: [PATCH v5 1/6] drm/format-helper: Add drm_fb_blit_from_r1 and drm_fb_fill
config: i386-randconfig-062-20231104 (https://download.01.org/0day-ci/archive/20231104/202311041300.X5kh1Yvx-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231104/202311041300.X5kh1Yvx-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/202311041300.X5kh1Yvx-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_format_helper.c:445:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/drm_format_helper.c:542:37: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/drm_format_helper.c:653:65: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:653:65: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:653:65: sparse:     got restricted __le32 const [usertype]
>> drivers/gpu/drm/drm_format_helper.c:653:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] @@     got unsigned short @@
   drivers/gpu/drm/drm_format_helper.c:653:27: sparse:     expected restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:653:27: sparse:     got unsigned short
   drivers/gpu/drm/drm_format_helper.c:723:67: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:723:67: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:723:67: sparse:     got restricted __le32 const [usertype]
   drivers/gpu/drm/drm_format_helper.c:723:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] @@     got unsigned short @@
   drivers/gpu/drm/drm_format_helper.c:723:27: sparse:     expected restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:723:27: sparse:     got unsigned short
   drivers/gpu/drm/drm_format_helper.c:767:67: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:767:67: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:767:67: sparse:     got restricted __le32 const [usertype]
   drivers/gpu/drm/drm_format_helper.c:767:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] @@     got unsigned short @@
   drivers/gpu/drm/drm_format_helper.c:767:27: sparse:     expected restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:767:27: sparse:     got unsigned short
   drivers/gpu/drm/drm_format_helper.c:811:67: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:811:67: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:811:67: sparse:     got restricted __le32 const [usertype]
   drivers/gpu/drm/drm_format_helper.c:811:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] @@     got unsigned short @@
   drivers/gpu/drm/drm_format_helper.c:811:27: sparse:     expected restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:811:27: sparse:     got unsigned short
   drivers/gpu/drm/drm_format_helper.c:905:67: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:905:67: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:905:67: sparse:     got restricted __le32 const [usertype]
>> drivers/gpu/drm/drm_format_helper.c:905:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] @@     got unsigned int @@
   drivers/gpu/drm/drm_format_helper.c:905:27: sparse:     expected restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:905:27: sparse:     got unsigned int
   drivers/gpu/drm/drm_format_helper.c:949:67: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:949:67: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:949:67: sparse:     got restricted __le32 const [usertype]
   drivers/gpu/drm/drm_format_helper.c:949:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] @@     got unsigned int @@
   drivers/gpu/drm/drm_format_helper.c:949:27: sparse:     expected restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:949:27: sparse:     got unsigned int
   drivers/gpu/drm/drm_format_helper.c:972:67: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:972:67: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:972:67: sparse:     got restricted __le32 const [usertype]
   drivers/gpu/drm/drm_format_helper.c:972:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] @@     got unsigned int @@
   drivers/gpu/drm/drm_format_helper.c:972:27: sparse:     expected restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:972:27: sparse:     got unsigned int
   drivers/gpu/drm/drm_format_helper.c:995:70: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:995:70: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:995:70: sparse:     got restricted __le32 const [usertype]
   drivers/gpu/drm/drm_format_helper.c:995:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] @@     got unsigned int @@
   drivers/gpu/drm/drm_format_helper.c:995:27: sparse:     expected restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:995:27: sparse:     got unsigned int
   drivers/gpu/drm/drm_format_helper.c:1039:70: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] pix @@     got restricted __le32 const [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:1039:70: sparse:     expected unsigned int [usertype] pix
   drivers/gpu/drm/drm_format_helper.c:1039:70: sparse:     got restricted __le32 const [usertype]
   drivers/gpu/drm/drm_format_helper.c:1039:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] @@     got unsigned int @@
   drivers/gpu/drm/drm_format_helper.c:1039:27: sparse:     expected restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:1039:27: sparse:     got unsigned int
   drivers/gpu/drm/drm_format_helper.c:27:15: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/drm_format_helper.c:31:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned short @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:31:16: sparse:     expected unsigned short
   drivers/gpu/drm/drm_format_helper.c:31:16: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:38:15: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/drm_format_helper.c:43:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned short @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:43:16: sparse:     expected unsigned short
   drivers/gpu/drm/drm_format_helper.c:43:16: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:50:15: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/drm_format_helper.c:54:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned short @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:54:16: sparse:     expected unsigned short
   drivers/gpu/drm/drm_format_helper.c:54:16: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:61:15: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/drm_format_helper.c:66:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned short @@     got restricted __le16 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:66:16: sparse:     expected unsigned short
   drivers/gpu/drm/drm_format_helper.c:66:16: sparse:     got restricted __le16 [usertype]
   drivers/gpu/drm/drm_format_helper.c:73:17: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/drm_format_helper.c:75:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:75:16: sparse:     expected unsigned int
   drivers/gpu/drm/drm_format_helper.c:75:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:82:15: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/drm_format_helper.c:87:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:87:16: sparse:     expected unsigned int
   drivers/gpu/drm/drm_format_helper.c:87:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:106:15: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/drm_format_helper.c:111:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:111:16: sparse:     expected unsigned int
   drivers/gpu/drm/drm_format_helper.c:111:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/drm_format_helper.c:118:15: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/drm_format_helper.c:124:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected unsigned int @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/drm_format_helper.c:124:16: sparse:     expected unsigned int
   drivers/gpu/drm/drm_format_helper.c:124:16: sparse:     got restricted __le32 [usertype]

vim +445 drivers/gpu/drm/drm_format_helper.c

   431	
   432	static void drm_fb_r1_to_24bit(struct iosys_map *dmap, unsigned int dpitch,
   433				       const u8 *sbuf8, unsigned int spitch,
   434				       unsigned int height, unsigned int width,
   435				       u32 fg32, u32 bg32)
   436	{
   437		unsigned int l, x;
   438		u32 val32;
   439	
   440		for (l = 0; l < height; l++) {
   441			for (x = 0; x < width; x++) {
   442				u32 off = l * dpitch + x * 3;
   443	
   444				val32 = (sbuf8[(l * spitch) + x / 8] & (0x80 >> (x % 8))) ? fg32 : bg32;
 > 445				val32 = le32_to_cpu(val32);
   446	
   447				/* write blue-green-red to output in little endianness */
   448				iosys_map_wr(dmap, off, u8, (val32 & 0x000000FF) >> 0);
   449				iosys_map_wr(dmap, off + 1, u8, (val32 & 0x0000FF00) >> 8);
   450				iosys_map_wr(dmap, off + 2, u8, (val32 & 0x00FF0000) >> 16);
   451			}
   452		}
   453	}
   454	

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


More information about the dri-devel mailing list