Skip to content

Fails to build with v6.17 kernel #30

Description

@sudipm-mukherjee

Fails to build with v6.17 kernels with the error:

smi_mode.c:1107:23: error: initialization of ‘enum drm_mode_status (*)(struct drm_connector *, const struct drm_display_mode *)’ from incompatible pointer type ‘enum drm_mode_status (*)(struct drm_connector *, struct drm_display_mode *)’ [-Wincompatible-pointer-types]
 1107 |         .mode_valid = smi_connector_mode_valid,
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~
smi_mode.c:1107:23: note: (near initialization for ‘smi_vga_connector_helper_funcs.mode_valid’)
smi_mode.c:826:29: note: ‘smi_connector_mode_valid’ declared here
  826 | static enum drm_mode_status smi_connector_mode_valid(struct drm_connector *connector,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [/usr/src/linux-headers-6.17.13+deb14-common/scripts/Makefile.build:292: smi_mode.o] Error 1
make[3]: *** Waiting for unfinished jobs....
smi_plane.c: In function ‘smi_cursor_atomic_update’:
smi_plane.c:138:21: error: implicit declaration of function ‘drm_gem_vram_pin’; did you mean ‘drm_gem_vram_put’? [-Wimplicit-function-declaration]
  138 |                 if (drm_gem_vram_pin(gbo, DRM_GEM_VRAM_PL_FLAG_VRAM) < 0) {
      |                     ^~~~~~~~~~~~~~~~
      |                     drm_gem_vram_put
smi_main.c:59:22: error: initialization of ‘struct drm_framebuffer * (*)(struct drm_device *, struct drm_file *, const struct drm_format_info *, const struct drm_mode_fb_cmd2 *)’ from incompatible pointer type ‘struct drm_framebuffer * (*)(struct drm_device *, struct drm_file *, const struct drm_mode_fb_cmd2 *)’ [-Wincompatible-pointer-types]
   59 |         .fb_create = smi_user_framebuffer_create,
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
smi_main.c:59:22: note: (near initialization for ‘smi_mode_config_funcs.fb_create’)
smi_main.c:43:32: note: ‘smi_user_framebuffer_create’ declared here
   43 | static struct drm_framebuffer *smi_user_framebuffer_create(struct drm_device *dev,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
smi_plane.c:146:25: error: implicit declaration of function ‘drm_gem_vram_unpin’; did you mean ‘drm_gem_vram_vunmap’? [-Wimplicit-function-declaration]
  146 |                         drm_gem_vram_unpin(gbo);
      |                         ^~~~~~~~~~~~~~~~~~
      |                         drm_gem_vram_vunmap
smi_main.c: In function ‘smi_handle_damage’:
smi_main.c:151:15: error: implicit declaration of function ‘drm_gem_vram_pin’; did you mean ‘drm_gem_vram_put’? [-Wimplicit-function-declaration]
  151 |         ret = drm_gem_vram_pin(gbo, DRM_GEM_VRAM_PL_FLAG_VRAM);
      |               ^~~~~~~~~~~~~~~~
      |               drm_gem_vram_put
make[3]: *** [/usr/src/linux-headers-6.17.13+deb14-common/scripts/Makefile.build:292: smi_plane.o] Error 1
smi_main.c:235:17: error: implicit declaration of function ‘drm_gem_vram_unpin’; did you mean ‘drm_gem_vram_vunmap’? [-Wimplicit-function-declaration]
  235 |                 drm_gem_vram_unpin(gbo);
      |                 ^~~~~~~~~~~~~~~~~~
      |                 drm_gem_vram_vunmap
smi_main.c: In function ‘smi_user_framebuffer_create’:
smi_main.c:305:57: error: passing argument 3 of ‘drm_gem_fb_create_with_funcs’ from incompatible pointer type [-Wincompatible-pointer-types]
  305 |         return (drm_gem_fb_create_with_funcs(dev, filp, mode_cmd, &smi_fb_funcs));
      |                                                         ^~~~~~~~
      |                                                         |
      |                                                         const struct drm_mode_fb_cmd2 *
In file included from smi_main.c:21:
/usr/src/linux-headers-6.17.13+deb14-common/include/drm/drm_gem_framebuffer_helper.h:33:60: note: expected ‘const struct drm_format_info *’ but argument is of type ‘const struct drm_mode_fb_cmd2 *’
   33 |                              const struct drm_format_info *info,
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
smi_main.c:305:67: error: passing argument 4 of ‘drm_gem_fb_create_with_funcs’ from incompatible pointer type [-Wincompatible-pointer-types]
  305 |         return (drm_gem_fb_create_with_funcs(dev, filp, mode_cmd, &smi_fb_funcs));
      |                                                                   ^~~~~~~~~~~~~
      |                                                                   |
      |                                                                   const struct drm_framebuffer_funcs *
/usr/src/linux-headers-6.17.13+deb14-common/include/drm/drm_gem_framebuffer_helper.h:34:61: note: expected ‘const struct drm_mode_fb_cmd2 *’ but argument is of type ‘const struct drm_framebuffer_funcs *’
   34 |                              const struct drm_mode_fb_cmd2 *mode_cmd,
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
smi_main.c:305:17: error: too few arguments to function ‘drm_gem_fb_create_with_funcs’; expected 5, have 4
  305 |         return (drm_gem_fb_create_with_funcs(dev, filp, mode_cmd, &smi_fb_funcs));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/linux-headers-6.17.13+deb14-common/include/drm/drm_gem_framebuffer_helper.h:32:1: note: declared here
   32 | drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [/usr/src/linux-headers-6.17.13+deb14-common/scripts/Makefile.build:292: smi_main.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.17.13+deb14-common/Makefile:2035: .] Error 2
make[1]: *** [/usr/src/linux-headers-6.17.13+deb14-common/Makefile:260: __sub-make] Error 2
make[1]: Leaving directory '/var/lib/dkms/smifb2/2.4.2.1.ga4def8b/build'
make: *** [/usr/src/linux-headers-6.17.13+deb14-common/Makefile:260: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.17.13+deb14-amd64'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions