Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in make kernel 5.15.0-48 #54

Open
MartinCastellano opened this issue Oct 1, 2022 · 3 comments
Open

error in make kernel 5.15.0-48 #54

MartinCastellano opened this issue Oct 1, 2022 · 3 comments

Comments

@MartinCastellano
Copy link

hi when i do make i have this proble

/home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’: /home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.c:234:8: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration] 234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | drm_prime_sg_to_dma_addr_array /home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.c: At top level: /home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.c:270:10: error: initialization of ‘int (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void * (*)(struct drm_gem_object *)’ [-Werror=incompatible-pointer-types] 270 | .vmap = fl2000_gem_prime_vmap, | ^~~~~~~~~~~~~~~~~~~~~ /home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.c:270:10: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’) /home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.c:271:12: error: initialization of ‘void (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void (*)(struct drm_gem_object *, void *)’ [-Werror=incompatible-pointer-types] 271 | .vunmap = fl2000_gem_prime_vunmap, | ^~~~~~~~~~~~~~~~~~~~~~~ /home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.c:271:12: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’) cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:297: /home/mcastellano/Descargas/FL2000/fl2000_drm/fl2000_gem.o] Error 1 make[1]: *** [Makefile:1884: /home/mcastellano/Descargas/FL2000/fl2000_drm] Error 2 make[1]: se sale del directorio '/usr/src/linux-headers-5.15.0-48-generic' make: *** [Makefile:21: modules] Error 2

so its seems that the function drm_prime_sg_to_page_addr_arrays its not defined ..and others

@temporary999
Copy link

Hello
I have fixed the drm_prime_sg_to_page_addr_arrays issue by "Xilinx/XRT#5943 hint.

@yanlobianchi
Copy link

@temporary999 please share your code after fixed

@anvalenciao
Copy link

Error

fl2000_drm/fl2000_gem.c:234:8: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration]
234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_prime_sg_to_dma_addr_array

Solution

Line 234 of the file fl2000_gem.c:
$ nano +234 fl2000_gem.c
Change:
ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages);
To:
ret = drm_prime_sg_to_page_array(sgt, obj->pages, obj->num_pages);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants