* gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' @ 2021-10-25 12:13 Naresh Kamboju 2021-10-25 14:01 ` Naresh Kamboju ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Naresh Kamboju @ 2021-10-25 12:13 UTC (permalink / raw) To: dri-devel, open list, Linux-Next Mailing List, Linux ARM Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij Regression found on arm gcc-11 built with multi_v5_defconfig Following build warnings / errors reported on linux next 20211025. metadata: git_describe: next-20211025 git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next git_short_log: 9ae1fbdeabd3 (\"Add linux-next specific files for 20211025\") target_arch: arm toolchain: gcc-11 config: multi_v5_defconfig build error : -------------- arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in function `drm_fb_cma_get_gem_obj': drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in function `drm_fb_cma_sync_non_coherent': drivers/gpu/drm/drm_fb_cma_helper.c:133: undefined reference to `drm_atomic_helper_damage_iter_init' arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:135: undefined reference to `drm_atomic_helper_damage_iter_next' make[1]: *** [Makefile:1252: vmlinux] Error 1 make[1]: Target '__all' not remade because of errors. make: *** [Makefile:226: __sub-make] Error 2 Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> build link: ----------- https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/build.log build config: ------------- https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/config # To install tuxmake on your system globally # sudo pip3 install -U tuxmake tuxmake --runtime podman --target-arch arm --toolchain gcc-11 --kconfig multi_v5_defconfig -- Linaro LKFT https://lkft.linaro.org ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-25 12:13 gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' Naresh Kamboju @ 2021-10-25 14:01 ` Naresh Kamboju 2021-10-26 17:59 ` Thomas Zimmermann 2021-10-25 18:25 ` Thomas Zimmermann 2021-10-26 18:21 ` Thomas Zimmermann 2 siblings, 1 reply; 11+ messages in thread From: Naresh Kamboju @ 2021-10-25 14:01 UTC (permalink / raw) To: dri-devel, open list, Linux-Next Mailing List, Linux ARM, Thomas Zimmermann Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij, Daniel Vetter On Mon, 25 Oct 2021 at 17:43, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: > > Regression found on arm gcc-11 built with multi_v5_defconfig > Following build warnings / errors reported on linux next 20211025. > > metadata: > git_describe: next-20211025 > git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next > git_short_log: 9ae1fbdeabd3 (\"Add linux-next specific files for 20211025\") > target_arch: arm > toolchain: gcc-11 > config: multi_v5_defconfig > > build error : > -------------- > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in > function `drm_fb_cma_get_gem_obj': > drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to > `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: > undefined reference to `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: > undefined reference to `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in > function `drm_fb_cma_sync_non_coherent': > drivers/gpu/drm/drm_fb_cma_helper.c:133: undefined reference to > `drm_atomic_helper_damage_iter_init' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:135: > undefined reference to `drm_atomic_helper_damage_iter_next' > make[1]: *** [Makefile:1252: vmlinux] Error 1 > make[1]: Target '__all' not remade because of errors. > make: *** [Makefile:226: __sub-make] Error 2 > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> The bisection script pointed to the first bad commit, commit 4b2b5e142ff499a2bef2b8db0272bbda1088a3fe drm: Move GEM memory managers into modules > build link: > ----------- > https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/build.log > > build config: > ------------- > https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/config > > # To install tuxmake on your system globally > # sudo pip3 install -U tuxmake > tuxmake --runtime podman --target-arch arm --toolchain gcc-11 > --kconfig multi_v5_defconfig > > -- > Linaro LKFT > https://lkft.linaro.org - Naresh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-25 14:01 ` Naresh Kamboju @ 2021-10-26 17:59 ` Thomas Zimmermann 2021-10-27 2:56 ` Naresh Kamboju 0 siblings, 1 reply; 11+ messages in thread From: Thomas Zimmermann @ 2021-10-26 17:59 UTC (permalink / raw) To: Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij, Daniel Vetter [-- Attachment #1.1: Type: text/plain, Size: 2621 bytes --] Hi Am 25.10.21 um 16:01 schrieb Naresh Kamboju: > On Mon, 25 Oct 2021 at 17:43, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: >> >> Regression found on arm gcc-11 built with multi_v5_defconfig >> Following build warnings / errors reported on linux next 20211025. >> >> metadata: >> git_describe: next-20211025 >> git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next >> git_short_log: 9ae1fbdeabd3 (\"Add linux-next specific files for 20211025\") >> target_arch: arm >> toolchain: gcc-11 >> config: multi_v5_defconfig >> >> build error : >> -------------- >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in >> function `drm_fb_cma_get_gem_obj': >> drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to >> `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: >> undefined reference to `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: >> undefined reference to `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in >> function `drm_fb_cma_sync_non_coherent': >> drivers/gpu/drm/drm_fb_cma_helper.c:133: undefined reference to >> `drm_atomic_helper_damage_iter_init' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:135: >> undefined reference to `drm_atomic_helper_damage_iter_next' >> make[1]: *** [Makefile:1252: vmlinux] Error 1 >> make[1]: Target '__all' not remade because of errors. >> make: *** [Makefile:226: __sub-make] Error 2 >> >> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > The bisection script pointed to the first bad commit, > > commit 4b2b5e142ff499a2bef2b8db0272bbda1088a3fe > drm: Move GEM memory managers into modules Could you please try the patch at [1]? It fixes the problem for me. Best regards Thomas [1] https://patchwork.freedesktop.org/patch/461426/ > >> build link: >> ----------- >> https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/build.log >> >> build config: >> ------------- >> https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/config >> >> # To install tuxmake on your system globally >> # sudo pip3 install -U tuxmake >> tuxmake --runtime podman --target-arch arm --toolchain gcc-11 >> --kconfig multi_v5_defconfig >> >> -- >> Linaro LKFT >> https://lkft.linaro.org > > - Naresh > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 840 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-26 17:59 ` Thomas Zimmermann @ 2021-10-27 2:56 ` Naresh Kamboju 0 siblings, 0 replies; 11+ messages in thread From: Naresh Kamboju @ 2021-10-27 2:56 UTC (permalink / raw) To: Thomas Zimmermann Cc: dri-devel, open list, Linux-Next Mailing List, Linux ARM, Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij, Daniel Vetter Hi Thomas, I have tested the fix patch [1] and it works fine for me. > Could you please try the patch at [1]? It fixes the problem for me. 🎉 Pass: 6d61a7c3bc2a ("arm: multi_v5_defconfig build fix") arm (multi_v5_defconfig) with gcc-11 @ https://builds.tuxbuild.com/204SnLe1DFWQ4iAHpwAMiyUcpsL/ > Best regards > Thomas > > [1] https://patchwork.freedesktop.org/patch/461426/ Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org> - Naresh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-25 12:13 gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' Naresh Kamboju 2021-10-25 14:01 ` Naresh Kamboju @ 2021-10-25 18:25 ` Thomas Zimmermann 2021-10-26 18:21 ` Thomas Zimmermann 2 siblings, 0 replies; 11+ messages in thread From: Thomas Zimmermann @ 2021-10-25 18:25 UTC (permalink / raw) To: Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij [-- Attachment #1.1: Type: text/plain, Size: 2290 bytes --] Hi Am 25.10.21 um 14:13 schrieb Naresh Kamboju: > Regression found on arm gcc-11 built with multi_v5_defconfig > Following build warnings / errors reported on linux next 20211025. > > metadata: > git_describe: next-20211025 > git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next > git_short_log: 9ae1fbdeabd3 (\"Add linux-next specific files for 20211025\") > target_arch: arm > toolchain: gcc-11 > config: multi_v5_defconfig > > build error : > -------------- > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in > function `drm_fb_cma_get_gem_obj': > drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to > `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: > undefined reference to `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: > undefined reference to `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in > function `drm_fb_cma_sync_non_coherent': > drivers/gpu/drm/drm_fb_cma_helper.c:133: undefined reference to > `drm_atomic_helper_damage_iter_init' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:135: > undefined reference to `drm_atomic_helper_damage_iter_next' > make[1]: *** [Makefile:1252: vmlinux] Error 1 > make[1]: Target '__all' not remade because of errors. > make: *** [Makefile:226: __sub-make] Error 2 > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> That's probably from moving some of the functions into separate modules. Will be fixed soon. Best regards Thomas > > > build link: > ----------- > https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/build.log > > build config: > ------------- > https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/config > > # To install tuxmake on your system globally > # sudo pip3 install -U tuxmake > tuxmake --runtime podman --target-arch arm --toolchain gcc-11 > --kconfig multi_v5_defconfig > > -- > Linaro LKFT > https://lkft.linaro.org > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 840 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-25 12:13 gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' Naresh Kamboju 2021-10-25 14:01 ` Naresh Kamboju 2021-10-25 18:25 ` Thomas Zimmermann @ 2021-10-26 18:21 ` Thomas Zimmermann 2021-10-27 0:58 ` Randy Dunlap 2 siblings, 1 reply; 11+ messages in thread From: Thomas Zimmermann @ 2021-10-26 18:21 UTC (permalink / raw) To: Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij [-- Attachment #1.1: Type: text/plain, Size: 2665 bytes --] Hi Am 25.10.21 um 14:13 schrieb Naresh Kamboju: > Regression found on arm gcc-11 built with multi_v5_defconfig > Following build warnings / errors reported on linux next 20211025. > > metadata: > git_describe: next-20211025 > git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next > git_short_log: 9ae1fbdeabd3 (\"Add linux-next specific files for 20211025\") > target_arch: arm > toolchain: gcc-11 > config: multi_v5_defconfig > > build error : > -------------- > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in > function `drm_fb_cma_get_gem_obj': > drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to > `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: > undefined reference to `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: > undefined reference to `drm_gem_fb_get_obj' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in > function `drm_fb_cma_sync_non_coherent': > drivers/gpu/drm/drm_fb_cma_helper.c:133: undefined reference to > `drm_atomic_helper_damage_iter_init' > arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:135: > undefined reference to `drm_atomic_helper_damage_iter_next' > make[1]: *** [Makefile:1252: vmlinux] Error 1 > make[1]: Target '__all' not remade because of errors. > make: *** [Makefile:226: __sub-make] Error 2 > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > > build link: > ----------- > https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/build.log > > build config: > ------------- > https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/config Looking at this config, there is: CONFIG_DRM=y # CONFIG_DRM_DP_AUX_CHARDEV is not set # CONFIG_DRM_DEBUG_MM is not set # CONFIG_DRM_DEBUG_SELFTEST is not set CONFIG_DRM_KMS_HELPER=m # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set # CONFIG_DRM_DP_CEC is not set CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y GEM_CMA_HELPER depends on KMS_HELPER, but the latter is a module. That's probably the cause of the problem. Is it intentionally set this way? Best regards Thomas > > # To install tuxmake on your system globally > # sudo pip3 install -U tuxmake > tuxmake --runtime podman --target-arch arm --toolchain gcc-11 > --kconfig multi_v5_defconfig > > -- > Linaro LKFT > https://lkft.linaro.org > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 840 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-26 18:21 ` Thomas Zimmermann @ 2021-10-27 0:58 ` Randy Dunlap 2021-10-27 6:19 ` Arnd Bergmann 0 siblings, 1 reply; 11+ messages in thread From: Randy Dunlap @ 2021-10-27 0:58 UTC (permalink / raw) To: Thomas Zimmermann, Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij, Arnd Bergmann On 10/26/21 11:21 AM, Thomas Zimmermann wrote: > Hi > > Am 25.10.21 um 14:13 schrieb Naresh Kamboju: >> Regression found on arm gcc-11 built with multi_v5_defconfig >> Following build warnings / errors reported on linux next 20211025. >> >> metadata: >> git_describe: next-20211025 >> git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next >> git_short_log: 9ae1fbdeabd3 (\"Add linux-next specific files for 20211025\") >> target_arch: arm >> toolchain: gcc-11 >> config: multi_v5_defconfig >> >> build error : >> -------------- >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in >> function `drm_fb_cma_get_gem_obj': >> drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to >> `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: >> undefined reference to `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: >> undefined reference to `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in >> function `drm_fb_cma_sync_non_coherent': >> drivers/gpu/drm/drm_fb_cma_helper.c:133: undefined reference to >> `drm_atomic_helper_damage_iter_init' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:135: >> undefined reference to `drm_atomic_helper_damage_iter_next' >> make[1]: *** [Makefile:1252: vmlinux] Error 1 >> make[1]: Target '__all' not remade because of errors. >> make: *** [Makefile:226: __sub-make] Error 2 >> >> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >> >> >> build link: >> ----------- >> https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/build.log >> >> build config: >> ------------- >> https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/config > > Looking at this config, there is: > > CONFIG_DRM=y > # CONFIG_DRM_DP_AUX_CHARDEV is not set > # CONFIG_DRM_DEBUG_MM is not set > # CONFIG_DRM_DEBUG_SELFTEST is not set > CONFIG_DRM_KMS_HELPER=m > # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set > # CONFIG_DRM_DP_CEC is not set > CONFIG_DRM_GEM_CMA_HELPER=y > CONFIG_DRM_KMS_CMA_HELPER=y > > GEM_CMA_HELPER depends on KMS_HELPER, but the latter is a module. That's probably the cause of the problem. Is it intentionally set this way? > The only drivers that select DRM_KMS_HELPER are both =m, so that's how DRM_KMS_HELPER is set also. Symbol: DRM_KMS_HELPER [=m] Type : tristate Defined at drivers/gpu/drm/Kconfig:82 Depends on: HAS_IOMEM [=y] && DRM [=y] Selected by [m]: - DRM_ATMEL_HLCDC [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && COMMON_CLK [=y] && MFD_ATMEL_HLCDC [=y] && ARM [=y] - DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && (COMPILE_TEST [=n] || ARCH_ASPEED [=y]) && MMU [=y] I did the ARM cross-build and also see the linker error. I didn't understand why -- and still don't, but here is a little speculation: In the past (e.g. 10 years ago), we have to move some .o files in lib/ from lib-y to obj-y so that they would always be included in the final object file and not cause their user/caller object files to suffer from undefined references. These happened because unused functions(?) in lib-y files are stripped out of the final object files. The same thing could be happening here (still just guessing). Does that help any? I dunno. Adding Arnd to Cc: to see if he has any ideas... >> >> # To install tuxmake on your system globally >> # sudo pip3 install -U tuxmake >> tuxmake --runtime podman --target-arch arm --toolchain gcc-11 >> --kconfig multi_v5_defconfig >> >> -- >> Linaro LKFT >> https://lkft.linaro.org -- ~Randy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-27 0:58 ` Randy Dunlap @ 2021-10-27 6:19 ` Arnd Bergmann 2021-10-27 6:26 ` Randy Dunlap 0 siblings, 1 reply; 11+ messages in thread From: Arnd Bergmann @ 2021-10-27 6:19 UTC (permalink / raw) To: Randy Dunlap Cc: Thomas Zimmermann, Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM, Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Arnd Bergmann, Alexandre Belloni, Linus Walleij On Wed, Oct 27, 2021 at 2:58 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > > > Looking at this config, there is: > > > > CONFIG_DRM=y > > # CONFIG_DRM_DP_AUX_CHARDEV is not set > > # CONFIG_DRM_DEBUG_MM is not set > > # CONFIG_DRM_DEBUG_SELFTEST is not set > > CONFIG_DRM_KMS_HELPER=m > > # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set > > # CONFIG_DRM_DP_CEC is not set > > CONFIG_DRM_GEM_CMA_HELPER=y > > CONFIG_DRM_KMS_CMA_HELPER=y > > > > GEM_CMA_HELPER depends on KMS_HELPER, but the latter is a module. That's probably the cause of the problem. Is it intentionally set this way? > > > > The only drivers that select DRM_KMS_HELPER are both =m, so that's how > DRM_KMS_HELPER is set also. > > Symbol: DRM_KMS_HELPER [=m] > Type : tristate > Defined at drivers/gpu/drm/Kconfig:82 > Depends on: HAS_IOMEM [=y] && DRM [=y] > Selected by [m]: > - DRM_ATMEL_HLCDC [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && COMMON_CLK [=y] && MFD_ATMEL_HLCDC [=y] && ARM [=y] > - DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && (COMPILE_TEST [=n] || ARCH_ASPEED [=y]) && MMU [=y] > > > I did the ARM cross-build and also see the linker error. > I didn't understand why -- and still don't, but here is a little > speculation: > > In the past (e.g. 10 years ago), we have to move some .o files > in lib/ from lib-y to obj-y so that they would always be included > in the final object file and not cause their user/caller object > files to suffer from undefined references. > These happened because unused functions(?) in lib-y files are > stripped out of the final object files. > The same thing could be happening here (still just guessing). > > Does that help any? I dunno. > > Adding Arnd to Cc: to see if he has any ideas... From all I can tell, the problem is that DRM_KMS_CMA_HELPER is a 'bool' symbol, so if it gets selected by a '=m' driver, it turns into '=y', which then selects DRM_GEM_CMA_HELPER=y, but that one cannot link against DRM_KMS_HELPER=m code. This trivial change makes it all build: diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index c08860db2520..699f434ce813 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -218,7 +218,7 @@ config DRM_GEM_CMA_HELPER Choose this if you need the GEM CMA helper functions config DRM_KMS_CMA_HELPER - bool + tristate depends on DRM select DRM_GEM_CMA_HELPER help but this needs some more testing to make sure it doesn't add any other regressions. Interestingly, I never hit the problem in randconfig testing since there is always some '=y' driver that selects DRM_KMS_HELPER. Arnd ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-27 6:19 ` Arnd Bergmann @ 2021-10-27 6:26 ` Randy Dunlap 2021-10-27 6:50 ` Arnd Bergmann 0 siblings, 1 reply; 11+ messages in thread From: Randy Dunlap @ 2021-10-27 6:26 UTC (permalink / raw) To: Arnd Bergmann Cc: Thomas Zimmermann, Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM, Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Alexandre Belloni, Linus Walleij On 10/26/21 11:19 PM, Arnd Bergmann wrote: > On Wed, Oct 27, 2021 at 2:58 AM Randy Dunlap <rdunlap@infradead.org> wrote: > >>> >>> Looking at this config, there is: >>> >>> CONFIG_DRM=y >>> # CONFIG_DRM_DP_AUX_CHARDEV is not set >>> # CONFIG_DRM_DEBUG_MM is not set >>> # CONFIG_DRM_DEBUG_SELFTEST is not set >>> CONFIG_DRM_KMS_HELPER=m >>> # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set >>> # CONFIG_DRM_DP_CEC is not set >>> CONFIG_DRM_GEM_CMA_HELPER=y >>> CONFIG_DRM_KMS_CMA_HELPER=y >>> >>> GEM_CMA_HELPER depends on KMS_HELPER, but the latter is a module. That's probably the cause of the problem. Is it intentionally set this way? >>> >> >> The only drivers that select DRM_KMS_HELPER are both =m, so that's how >> DRM_KMS_HELPER is set also. >> >> Symbol: DRM_KMS_HELPER [=m] >> Type : tristate >> Defined at drivers/gpu/drm/Kconfig:82 >> Depends on: HAS_IOMEM [=y] && DRM [=y] >> Selected by [m]: >> - DRM_ATMEL_HLCDC [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && COMMON_CLK [=y] && MFD_ATMEL_HLCDC [=y] && ARM [=y] >> - DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && (COMPILE_TEST [=n] || ARCH_ASPEED [=y]) && MMU [=y] >> >> >> I did the ARM cross-build and also see the linker error. >> I didn't understand why -- and still don't, but here is a little >> speculation: >> >> In the past (e.g. 10 years ago), we have to move some .o files >> in lib/ from lib-y to obj-y so that they would always be included >> in the final object file and not cause their user/caller object >> files to suffer from undefined references. >> These happened because unused functions(?) in lib-y files are >> stripped out of the final object files. >> The same thing could be happening here (still just guessing). >> >> Does that help any? I dunno. >> >> Adding Arnd to Cc: to see if he has any ideas... > > From all I can tell, the problem is that DRM_KMS_CMA_HELPER is a 'bool' > symbol, so if it gets selected by a '=m' driver, it turns into '=y', which > then selects DRM_GEM_CMA_HELPER=y, but that one cannot link > against DRM_KMS_HELPER=m code. > > This trivial change makes it all build: > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index c08860db2520..699f434ce813 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -218,7 +218,7 @@ config DRM_GEM_CMA_HELPER > Choose this if you need the GEM CMA helper functions > > config DRM_KMS_CMA_HELPER > - bool > + tristate > depends on DRM > select DRM_GEM_CMA_HELPER > help > > but this needs some more testing to make sure it doesn't add > any other regressions. > > Interestingly, I never hit the problem in randconfig testing since > there is always some '=y' driver that selects DRM_KMS_HELPER. > > Arnd > Hi Arnd, Thomas had posted a patch that also fixes the problem. Somehow I missed seeing that the first time around. Thanks. -- ~Randy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-27 6:26 ` Randy Dunlap @ 2021-10-27 6:50 ` Arnd Bergmann 2021-10-27 8:08 ` Thomas Zimmermann 0 siblings, 1 reply; 11+ messages in thread From: Arnd Bergmann @ 2021-10-27 6:50 UTC (permalink / raw) To: Randy Dunlap Cc: Arnd Bergmann, Thomas Zimmermann, Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM, Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Alexandre Belloni, Linus Walleij On Wed, Oct 27, 2021 at 8:26 AM Randy Dunlap <rdunlap@infradead.org> wrote: > On 10/26/21 11:19 PM, Arnd Bergmann wrote: > > On Wed, Oct 27, 2021 at 2:58 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > This trivial change makes it all build: > > > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > > index c08860db2520..699f434ce813 100644 > > --- a/drivers/gpu/drm/Kconfig > > +++ b/drivers/gpu/drm/Kconfig > > @@ -218,7 +218,7 @@ config DRM_GEM_CMA_HELPER > > Choose this if you need the GEM CMA helper functions > > > > config > > - bool > > + tristate > > depends on DRM > > select DRM_GEM_CMA_HELPER > > help > > > > but this needs some more testing to make sure it doesn't add > > any other regressions. > > > > Interestingly, I never hit the problem in randconfig testing since > > there is always some '=y' driver that selects DRM_KMS_HELPER. > > Thomas had posted a patch that also fixes the problem. > Somehow I missed seeing that the first time around. Ah right, I missed that as well. That patch seems reasonable to me, but I think we may want both of them in this case, as it does not address DRM_GEM_CMA_HELPER being set to =y when it is only used from modules. Arnd ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' 2021-10-27 6:50 ` Arnd Bergmann @ 2021-10-27 8:08 ` Thomas Zimmermann 0 siblings, 0 replies; 11+ messages in thread From: Thomas Zimmermann @ 2021-10-27 8:08 UTC (permalink / raw) To: Arnd Bergmann, Randy Dunlap Cc: Naresh Kamboju, dri-devel, open list, Linux-Next Mailing List, Linux ARM, Maarten Lankhorst, Maxime Ripard, David Airlie, Daniel Vetter, Andrey Konovalov, Stephen Rothwell, Alexandre Belloni, Linus Walleij [-- Attachment #1.1: Type: text/plain, Size: 1808 bytes --] Hi! Am 27.10.21 um 08:50 schrieb Arnd Bergmann: > On Wed, Oct 27, 2021 at 8:26 AM Randy Dunlap <rdunlap@infradead.org> wrote: >> On 10/26/21 11:19 PM, Arnd Bergmann wrote: >>> On Wed, Oct 27, 2021 at 2:58 AM Randy Dunlap <rdunlap@infradead.org> wrote: > >>> This trivial change makes it all build: >>> >>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig >>> index c08860db2520..699f434ce813 100644 >>> --- a/drivers/gpu/drm/Kconfig >>> +++ b/drivers/gpu/drm/Kconfig >>> @@ -218,7 +218,7 @@ config DRM_GEM_CMA_HELPER >>> Choose this if you need the GEM CMA helper functions >>> >>> config > >>> - bool >>> + tristate >>> depends on DRM >>> select DRM_GEM_CMA_HELPER >>> help >>> >>> but this needs some more testing to make sure it doesn't add >>> any other regressions. >>> >>> Interestingly, I never hit the problem in randconfig testing since >>> there is always some '=y' driver that selects DRM_KMS_HELPER. >> >> Thomas had posted a patch that also fixes the problem. >> Somehow I missed seeing that the first time around. > > Ah right, I missed that as well. That patch seems reasonable > to me, but I think we may want both of them in this case, as > it does not address DRM_GEM_CMA_HELPER being set to =y > when it is only used from modules. Yes, the bool state was indeed the problem. The patch I posted resolves the issue for now. For later, I have a patchset that improves CMA helper usage a bit and resolves the Kconfig problem. Best regards Thomas > > Arnd > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 840 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-10-27 8:08 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-10-25 12:13 gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' Naresh Kamboju 2021-10-25 14:01 ` Naresh Kamboju 2021-10-26 17:59 ` Thomas Zimmermann 2021-10-27 2:56 ` Naresh Kamboju 2021-10-25 18:25 ` Thomas Zimmermann 2021-10-26 18:21 ` Thomas Zimmermann 2021-10-27 0:58 ` Randy Dunlap 2021-10-27 6:19 ` Arnd Bergmann 2021-10-27 6:26 ` Randy Dunlap 2021-10-27 6:50 ` Arnd Bergmann 2021-10-27 8:08 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).