All of lore.kernel.org
 help / color / mirror / Atom feed
* [xilinx-xlnx:xlnx_rebase_v6.12 194/1171] drivers/gpu/drm/xlnx/xlnx_mixer.c:1805:13: warning: cast from pointer to integer of different size
@ 2026-09-27  8:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-27  8:35 UTC (permalink / raw)
  To: Saurabh Sengar; +Cc: oe-kbuild-all, git, Michal Simek

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v6.12
head:   d25fdf9fee1c8707551f590540e46b3686b90099
commit: 7f39b034942ee80f2e6e595a0d702ea97382d40f [194/1171] drm: xlnx: mixer: Initial video mixer driver
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20260927/202609271610.xp8IzrTP-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260927/202609271610.xp8IzrTP-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609271610.xp8IzrTP-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/xlnx/xlnx_mixer.c: In function 'xlnx_mix_update_logo_img':
>> drivers/gpu/drm/xlnx/xlnx_mixer.c:1805:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1805 |         if ((phys_addr_t)buffer->vaddr == logo_layer->layer_regs.buff_addr1 &&
         |             ^
   drivers/gpu/drm/xlnx/xlnx_mixer.c:1811:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1811 |         logo_layer->layer_regs.buff_addr1 = (phys_addr_t)buffer->vaddr;
         |                                             ^


vim +1805 drivers/gpu/drm/xlnx/xlnx_mixer.c

  1754	
  1755	static int xlnx_mix_update_logo_img(struct xlnx_mix_plane *plane,
  1756					    struct drm_gem_dma_object *buffer,
  1757					     u32 src_w, u32 src_h)
  1758	{
  1759		struct xlnx_mix_layer_data *logo_layer = plane->mixer_layer;
  1760		struct xlnx_mix_hw *mixer = to_mixer_hw(plane);
  1761		size_t pixel_cnt = src_h * src_w;
  1762		bool per_pixel_alpha = false;
  1763		u32 max_width = logo_layer->hw_config.max_width;
  1764		u32 max_height = logo_layer->hw_config.max_height;
  1765		u32 min_width = logo_layer->hw_config.min_width;
  1766		u32 min_height = logo_layer->hw_config.min_height;
  1767		u8 *r_data = NULL;
  1768		u8 *g_data = NULL;
  1769		u8 *b_data = NULL;
  1770		u8 *a_data = NULL;
  1771		size_t el_size = sizeof(u8);
  1772		u8 *pixel_mem_data;
  1773		int ret, i, j;
  1774	
  1775		/* ensure valid conditions for update */
  1776		if (logo_layer->id != mixer->logo_layer_id)
  1777			return 0;
  1778	
  1779		if (src_h > max_height || src_w > max_width ||
  1780		    src_h < min_height || src_w < min_width) {
  1781			DRM_ERROR("Mixer logo/cursor layer dimensions illegal.\n");
  1782			return -EINVAL;
  1783		}
  1784	
  1785		if (!xlnx_mix_isfmt_support(plane->mixer_layer->hw_config.vid_fmt)) {
  1786			DRM_ERROR("DRM color format not supported for logo layer\n");
  1787			return -EINVAL;
  1788		}
  1789		per_pixel_alpha = (logo_layer->hw_config.vid_fmt ==
  1790				   DRM_FORMAT_RGBA8888) ? true : false;
  1791		r_data = kcalloc(pixel_cnt, el_size, GFP_KERNEL);
  1792		g_data = kcalloc(pixel_cnt, el_size, GFP_KERNEL);
  1793		b_data = kcalloc(pixel_cnt, el_size, GFP_KERNEL);
  1794		if (per_pixel_alpha)
  1795			a_data = kcalloc(pixel_cnt, el_size, GFP_KERNEL);
  1796	
  1797		if (!r_data || !g_data || !b_data || (per_pixel_alpha && !a_data)) {
  1798			DRM_ERROR("Unable to allocate memory for logo layer data\n");
  1799			ret = -ENOMEM;
  1800			goto free;
  1801		}
  1802		/* ensure buffer attributes have changed to indicate new logo
  1803		 * has been created
  1804		 */
> 1805		if ((phys_addr_t)buffer->vaddr == logo_layer->layer_regs.buff_addr1 &&
  1806		    src_w == logo_layer->layer_regs.width &&
  1807		    src_h == logo_layer->layer_regs.height)
  1808			return 0;
  1809	
  1810		/* cache buffer address for future comparison */
  1811		logo_layer->layer_regs.buff_addr1 = (phys_addr_t)buffer->vaddr;
  1812		pixel_mem_data = (u8 *)(buffer->vaddr);
  1813		for (i = 0, j = 0; j < pixel_cnt; j++) {
  1814			if (per_pixel_alpha && a_data)
  1815				a_data[j] = pixel_mem_data[i++];
  1816	
  1817			b_data[j] = pixel_mem_data[i++];
  1818			g_data[j] = pixel_mem_data[i++];
  1819			r_data[j] = pixel_mem_data[i++];
  1820		}
  1821		ret = xlnx_mix_logo_load(to_mixer_hw(plane), src_w, src_h, r_data,
  1822					 g_data, b_data,
  1823					 per_pixel_alpha ? a_data : NULL);
  1824	free:
  1825		kfree(r_data);
  1826		kfree(g_data);
  1827		kfree(b_data);
  1828		kfree(a_data);
  1829	
  1830		return ret;
  1831	}
  1832	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-27  8:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-27  8:35 [xilinx-xlnx:xlnx_rebase_v6.12 194/1171] drivers/gpu/drm/xlnx/xlnx_mixer.c:1805:13: warning: cast from pointer to integer of different size kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.