lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 29 May 2022 22:44:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sven Schnelle <svens@...ckframe.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Helge Deller <deller@....de>
Subject: [deller-fbdev:hp-visualize-fx-drm 1/1]
 drivers/gpu/drm/visualizefx/visfx_drv.c:222:25: error: invalid use of
 undefined type 'const struct dma_buf_map'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git hp-visualize-fx-drm
head:   c2d0f767c19314c3d3a1a2d304be3c871b729523
commit: c2d0f767c19314c3d3a1a2d304be3c871b729523 [1/1] drm: add HP Visualize FX driver
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20220529/202205292236.7katQfFE-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/commit/?id=c2d0f767c19314c3d3a1a2d304be3c871b729523
        git remote add deller-fbdev git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git
        git fetch --no-tags deller-fbdev hp-visualize-fx-drm
        git checkout c2d0f767c19314c3d3a1a2d304be3c871b729523
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   drivers/gpu/drm/visualizefx/visfx_drv.c:218:45: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
     218 |                                const struct dma_buf_map *map,
         |                                             ^~~~~~~~~~~
   drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_fb_blit_rect':
>> drivers/gpu/drm/visualizefx/visfx_drv.c:222:25: error: invalid use of undefined type 'const struct dma_buf_map'
     222 |         void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
         |                         ^~
   drivers/gpu/drm/visualizefx/visfx_drv.c: At top level:
   drivers/gpu/drm/visualizefx/visfx_drv.c:236:78: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
     236 | static int visfx_fb_blit_fullscreen(struct drm_framebuffer *fb, const struct dma_buf_map *map)
         |                                                                              ^~~~~~~~~~~
   drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_fb_blit_fullscreen':
>> drivers/gpu/drm/visualizefx/visfx_drv.c:244:39: error: passing argument 2 of 'visfx_fb_blit_rect' from incompatible pointer type [-Werror=incompatible-pointer-types]
     244 |         return visfx_fb_blit_rect(fb, map, &fullscreen);
         |                                       ^~~
         |                                       |
         |                                       const struct dma_buf_map *
   drivers/gpu/drm/visualizefx/visfx_drv.c:218:58: note: expected 'const struct dma_buf_map *' but argument is of type 'const struct dma_buf_map *'
     218 |                                const struct dma_buf_map *map,
         |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_pipe_enable':
>> drivers/gpu/drm/visualizefx/visfx_drv.c:281:51: error: passing argument 2 of 'visfx_fb_blit_fullscreen' from incompatible pointer type [-Werror=incompatible-pointer-types]
     281 |         visfx_fb_blit_fullscreen(plane_state->fb, &shadow_plane_state->data[0]);
         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                   |
         |                                                   struct iosys_map *
   drivers/gpu/drm/visualizefx/visfx_drv.c:236:91: note: expected 'const struct dma_buf_map *' but argument is of type 'struct iosys_map *'
     236 | static int visfx_fb_blit_fullscreen(struct drm_framebuffer *fb, const struct dma_buf_map *map)
         |                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_pipe_update':
   drivers/gpu/drm/visualizefx/visfx_drv.c:321:47: error: passing argument 2 of 'visfx_fb_blit_rect' from incompatible pointer type [-Werror=incompatible-pointer-types]
     321 |                 visfx_fb_blit_rect(state->fb, &shadow_plane_state->data[0], &rect);
         |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                               |
         |                                               struct iosys_map *
   drivers/gpu/drm/visualizefx/visfx_drv.c:218:58: note: expected 'const struct dma_buf_map *' but argument is of type 'struct iosys_map *'
     218 |                                const struct dma_buf_map *map,
         |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   cc1: some warnings being treated as errors


vim +222 drivers/gpu/drm/visualizefx/visfx_drv.c

   216	
   217	static int visfx_fb_blit_rect(struct drm_framebuffer *fb,
   218				       const struct dma_buf_map *map,
   219				       struct drm_rect *rect)
   220	{
   221		struct visfx_device *visfx = to_visfx(fb->dev);
 > 222		void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
   223		uint8_t *dst;
   224		int idx;
   225	
   226		if (!drm_dev_enter(&visfx->dev, &idx))
   227			return -ENODEV;
   228		visfx_writel(visfx, VISFX_VRAM_WRITE_MODE, VISFX_VRAM_WRITE_MODE_BITMAP);
   229		dst = visfx->mmio + 0x01000000;
   230		dst += drm_fb_clip_offset(fb->pitches[0], fb->format, rect);
   231		drm_fb_memcpy_toio(dst, fb->pitches[0], vmap, fb, rect);
   232		drm_dev_exit(idx);
   233		return 0;
   234	}
   235	
   236	static int visfx_fb_blit_fullscreen(struct drm_framebuffer *fb, const struct dma_buf_map *map)
   237	{
   238		struct drm_rect fullscreen = {
   239			.x1 = 0,
   240			.x2 = fb->width,
   241			.y1 = 0,
   242			.y2 = fb->height,
   243		};
 > 244		return visfx_fb_blit_rect(fb, map, &fullscreen);
   245	}
   246	
   247	static int visfx_check_size(int width, int height, struct drm_framebuffer *fb)
   248	{
   249		if (width > 2048 || height > 2048)
   250			return -EINVAL;
   251		return 0;
   252	}
   253	
   254	static enum drm_mode_status visfx_pipe_mode_valid(struct drm_simple_display_pipe *pipe,
   255							   const struct drm_display_mode *mode)
   256	{
   257		if (visfx_check_size(mode->hdisplay, mode->vdisplay, NULL) < 0)
   258			return MODE_BAD;
   259		return MODE_OK;
   260	}
   261	
   262	static int visfx_pipe_check(struct drm_simple_display_pipe *pipe,
   263				     struct drm_plane_state *plane_state,
   264				     struct drm_crtc_state *crtc_state)
   265	{
   266		struct drm_framebuffer *fb = plane_state->fb;
   267	
   268		if (!fb)
   269			return 0;
   270		return visfx_check_size(fb->width, fb->height, fb);
   271	}
   272	
   273	static void visfx_pipe_enable(struct drm_simple_display_pipe *pipe,
   274				      struct drm_crtc_state *crtc_state,
   275				      struct drm_plane_state *plane_state)
   276	{
   277		struct visfx_device *visfx = to_visfx(pipe->crtc.dev);
   278		struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
   279	
   280		visfx_mode_set(visfx, &crtc_state->mode, plane_state->fb);
 > 281		visfx_fb_blit_fullscreen(plane_state->fb, &shadow_plane_state->data[0]);
   282	}
   283	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ