linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ld.lld: error: undefined symbol: drm_gem_fb_get_obj
@ 2022-08-22  7:26 kernel test robot
  2022-08-26  8:26 ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2022-08-22  7:26 UTC (permalink / raw)
  To: Linus Walleij
  Cc: llvm, kbuild-all, linux-kernel, Noralf Trønnes, Douglas Anderson

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1c23f9e627a7b412978b4e852793c5e3c3efc555
commit: 57f6190a60ecc19f1ddddac0d7ea6524229271a9 drm/panel: ws2401: Add driver for WideChips WS2401
date:   1 year, 1 month ago
config: x86_64-randconfig-a002-20220822 (https://download.01.org/0day-ci/archive/20220822/202208221506.0Lo051G4-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/torvalds/linux.git/commit/?id=57f6190a60ecc19f1ddddac0d7ea6524229271a9
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 57f6190a60ecc19f1ddddac0d7ea6524229271a9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> ld.lld: error: undefined symbol: drm_gem_fb_get_obj
   >>> referenced by drm_mipi_dbi.c:203 (drivers/gpu/drm/drm_mipi_dbi.c:203)
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
   >>> referenced by drm_mipi_dbi.c:258 (drivers/gpu/drm/drm_mipi_dbi.c:258)
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_fb_dirty) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_fb_swab
   >>> referenced by drm_mipi_dbi.c:219 (drivers/gpu/drm/drm_mipi_dbi.c:219)
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_atomic_helper_connector_destroy_state
   >>> referenced by drm_mipi_dbi.c
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_gem_fb_create_with_dirty
   >>> referenced by drm_mipi_dbi.c
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_atomic_helper_check
   >>> referenced by drm_mipi_dbi.c
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_atomic_helper_commit
   >>> referenced by drm_mipi_dbi.c
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_fb_xrgb8888_to_rgb565
   >>> referenced by drm_mipi_dbi.c:224 (drivers/gpu/drm/drm_mipi_dbi.c:224)
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_fb_memcpy
   >>> referenced by drm_mipi_dbi.c:221 (drivers/gpu/drm/drm_mipi_dbi.c:221)
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_atomic_helper_damage_merged
   >>> referenced by drm_mipi_dbi.c:318 (drivers/gpu/drm/drm_mipi_dbi.c:318)
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_pipe_update) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_simple_display_pipe_init
   >>> referenced by drm_mipi_dbi.c:529 (drivers/gpu/drm/drm_mipi_dbi.c:529)
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_dev_init_with_formats) in archive drivers/built-in.a
--
>> ld.lld: error: undefined symbol: drm_atomic_helper_connector_reset
   >>> referenced by drm_mipi_dbi.c
   >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a
..

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ld.lld: error: undefined symbol: drm_gem_fb_get_obj
  2022-08-22  7:26 ld.lld: error: undefined symbol: drm_gem_fb_get_obj kernel test robot
@ 2022-08-26  8:26 ` Linus Walleij
  2022-08-26 15:48   ` Doug Anderson
  2022-08-26 15:59   ` Nathan Chancellor
  0 siblings, 2 replies; 5+ messages in thread
From: Linus Walleij @ 2022-08-26  8:26 UTC (permalink / raw)
  To: kernel test robot
  Cc: llvm, kbuild-all, linux-kernel, Noralf Trønnes, Douglas Anderson

On Mon, Aug 22, 2022 at 9:27 AM kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   1c23f9e627a7b412978b4e852793c5e3c3efc555
> commit: 57f6190a60ecc19f1ddddac0d7ea6524229271a9 drm/panel: ws2401: Add driver for WideChips WS2401
> date:   1 year, 1 month ago
> config: x86_64-randconfig-a002-20220822 (https://download.01.org/0day-ci/archive/20220822/202208221506.0Lo051G4-lkp@intel.com/config)
> compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> 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/torvalds/linux.git/commit/?id=57f6190a60ecc19f1ddddac0d7ea6524229271a9
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 57f6190a60ecc19f1ddddac0d7ea6524229271a9
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> ld.lld: error: undefined symbol: drm_gem_fb_get_obj
>    >>> referenced by drm_mipi_dbi.c:203 (drivers/gpu/drm/drm_mipi_dbi.c:203)
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
>    >>> referenced by drm_mipi_dbi.c:258 (drivers/gpu/drm/drm_mipi_dbi.c:258)
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_fb_dirty) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_fb_swab
>    >>> referenced by drm_mipi_dbi.c:219 (drivers/gpu/drm/drm_mipi_dbi.c:219)
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_atomic_helper_connector_destroy_state
>    >>> referenced by drm_mipi_dbi.c
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_gem_fb_create_with_dirty
>    >>> referenced by drm_mipi_dbi.c
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_atomic_helper_check
>    >>> referenced by drm_mipi_dbi.c
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_atomic_helper_commit
>    >>> referenced by drm_mipi_dbi.c
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_fb_xrgb8888_to_rgb565
>    >>> referenced by drm_mipi_dbi.c:224 (drivers/gpu/drm/drm_mipi_dbi.c:224)
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_fb_memcpy
>    >>> referenced by drm_mipi_dbi.c:221 (drivers/gpu/drm/drm_mipi_dbi.c:221)
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_atomic_helper_damage_merged
>    >>> referenced by drm_mipi_dbi.c:318 (drivers/gpu/drm/drm_mipi_dbi.c:318)
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_pipe_update) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_simple_display_pipe_init
>    >>> referenced by drm_mipi_dbi.c:529 (drivers/gpu/drm/drm_mipi_dbi.c:529)
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_dev_init_with_formats) in archive drivers/built-in.a
> --
> >> ld.lld: error: undefined symbol: drm_atomic_helper_connector_reset
>    >>> referenced by drm_mipi_dbi.c
>    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a

I don't understand this error report, please robot, analyze further and come
back with details on what needs to be fixed.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ld.lld: error: undefined symbol: drm_gem_fb_get_obj
  2022-08-26  8:26 ` Linus Walleij
@ 2022-08-26 15:48   ` Doug Anderson
  2022-08-26 19:59     ` Linus Walleij
  2022-08-26 15:59   ` Nathan Chancellor
  1 sibling, 1 reply; 5+ messages in thread
From: Doug Anderson @ 2022-08-26 15:48 UTC (permalink / raw)
  To: Linus Walleij
  Cc: kernel test robot, llvm, kbuild-all, LKML, Noralf Trønnes

Hi,

On Fri, Aug 26, 2022 at 1:26 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Aug 22, 2022 at 9:27 AM kernel test robot <lkp@intel.com> wrote:
>
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   1c23f9e627a7b412978b4e852793c5e3c3efc555
> > commit: 57f6190a60ecc19f1ddddac0d7ea6524229271a9 drm/panel: ws2401: Add driver for WideChips WS2401
> > date:   1 year, 1 month ago
> > config: x86_64-randconfig-a002-20220822 (https://download.01.org/0day-ci/archive/20220822/202208221506.0Lo051G4-lkp@intel.com/config)
> > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> > 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/torvalds/linux.git/commit/?id=57f6190a60ecc19f1ddddac0d7ea6524229271a9
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout 57f6190a60ecc19f1ddddac0d7ea6524229271a9
> >         # save the config file
> >         mkdir build_dir && cp config build_dir/.config
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> > >> ld.lld: error: undefined symbol: drm_gem_fb_get_obj
> >    >>> referenced by drm_mipi_dbi.c:203 (drivers/gpu/drm/drm_mipi_dbi.c:203)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> >    >>> referenced by drm_mipi_dbi.c:258 (drivers/gpu/drm/drm_mipi_dbi.c:258)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_fb_dirty) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_fb_swab
> >    >>> referenced by drm_mipi_dbi.c:219 (drivers/gpu/drm/drm_mipi_dbi.c:219)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_connector_destroy_state
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_gem_fb_create_with_dirty
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_check
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_commit
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_fb_xrgb8888_to_rgb565
> >    >>> referenced by drm_mipi_dbi.c:224 (drivers/gpu/drm/drm_mipi_dbi.c:224)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_fb_memcpy
> >    >>> referenced by drm_mipi_dbi.c:221 (drivers/gpu/drm/drm_mipi_dbi.c:221)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_damage_merged
> >    >>> referenced by drm_mipi_dbi.c:318 (drivers/gpu/drm/drm_mipi_dbi.c:318)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_pipe_update) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_simple_display_pipe_init
> >    >>> referenced by drm_mipi_dbi.c:529 (drivers/gpu/drm/drm_mipi_dbi.c:529)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_dev_init_with_formats) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_connector_reset
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a
>
> I don't understand this error report, please robot, analyze further and come
> back with details on what needs to be fixed.

I've never been accused of being a robot (OK, well, there was that one
time...), but I can probably still help a little...

I followed the "steps to reproduce" from the report and got the
failure. Basically the problem is this:

$ grep DRM_MIPI_DBI build_dir/.config
CONFIG_DRM_MIPI_DBI=y

$ grep DRM_KMS_HELPER build_dir/.config
CONFIG_DRM_KMS_HELPER=m

...so you're the MIPI DBI code is builtin and calling into the KMS
helper which is a module. That's does not compute. <ERR>. <ERR>.
<SHUTTING DOWN>.

Unfortunately, fixing the error isn't the most trivial thing in the
world. If you just do this:

 config DRM_MIPI_DBI
        tristate
+       select DRM_KMS_HELPER
        depends on DRM

...then you get a circular dependency:

drivers/gpu/drm/Kconfig:76:error: recursive dependency detected!
drivers/gpu/drm/Kconfig:76:     symbol DRM_KMS_HELPER is selected by
DRM_MIPI_DBI
drivers/gpu/drm/Kconfig:31:     symbol DRM_MIPI_DBI is selected by
DRM_PANEL_ILITEK_ILI9341
drivers/gpu/drm/panel/Kconfig:165:      symbol
DRM_PANEL_ILITEK_ILI9341 depends on DRM_KMS_HELPER
For a resolution refer to Documentation/kbuild/kconfig-language.rst
subsection "Kconfig recursive dependency limitations"

...and if you do this:

 config DRM_MIPI_DBI
        tristate
        depends on DRM
+       depends on DRM_KMS_HELPER

...then you get errors like this:

WARNING: unmet direct dependencies detected for DRM_MIPI_DBI
  Depends on [m]: HAS_IOMEM [=y] && DRM [=y] && DRM_KMS_HELPER [=m]
  Selected by [y]:
  - DRM_PANEL_WIDECHIPS_WS2401 [=y] && HAS_IOMEM [=y] && DRM [=y] &&
DRM_PANEL [=y] && SPI [=y] && GPIOLIB [=y] && BACKLIGHT_CLASS_DEVICE
[=y]
  Selected by [m]:
  - TINYDRM_ILI9225 [=m] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y]
  - TINYDRM_ILI9486 [=m] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y]
  - TINYDRM_ST7586 [=m] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y]
  - TINYDRM_ST7735R [=m] && HAS_IOMEM [=y] && DRM [=y] && SPI [=y]


Hopefully that at least explains the problem even if it doesn't
magically give a solution. ;-)

-Doug

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ld.lld: error: undefined symbol: drm_gem_fb_get_obj
  2022-08-26  8:26 ` Linus Walleij
  2022-08-26 15:48   ` Doug Anderson
@ 2022-08-26 15:59   ` Nathan Chancellor
  1 sibling, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2022-08-26 15:59 UTC (permalink / raw)
  To: Linus Walleij
  Cc: kernel test robot, llvm, kbuild-all, linux-kernel,
	Noralf Trønnes, Douglas Anderson

On Fri, Aug 26, 2022 at 10:26:43AM +0200, Linus Walleij wrote:
> On Mon, Aug 22, 2022 at 9:27 AM kernel test robot <lkp@intel.com> wrote:
> 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   1c23f9e627a7b412978b4e852793c5e3c3efc555
> > commit: 57f6190a60ecc19f1ddddac0d7ea6524229271a9 drm/panel: ws2401: Add driver for WideChips WS2401
> > date:   1 year, 1 month ago
> > config: x86_64-randconfig-a002-20220822 (https://download.01.org/0day-ci/archive/20220822/202208221506.0Lo051G4-lkp@intel.com/config)
> > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> > 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/torvalds/linux.git/commit/?id=57f6190a60ecc19f1ddddac0d7ea6524229271a9
> >         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         git fetch --no-tags linus master
> >         git checkout 57f6190a60ecc19f1ddddac0d7ea6524229271a9
> >         # save the config file
> >         mkdir build_dir && cp config build_dir/.config
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> > >> ld.lld: error: undefined symbol: drm_gem_fb_get_obj
> >    >>> referenced by drm_mipi_dbi.c:203 (drivers/gpu/drm/drm_mipi_dbi.c:203)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> >    >>> referenced by drm_mipi_dbi.c:258 (drivers/gpu/drm/drm_mipi_dbi.c:258)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_fb_dirty) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_fb_swab
> >    >>> referenced by drm_mipi_dbi.c:219 (drivers/gpu/drm/drm_mipi_dbi.c:219)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_connector_destroy_state
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_gem_fb_create_with_dirty
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_check
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_commit
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_mode_config_funcs) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_fb_xrgb8888_to_rgb565
> >    >>> referenced by drm_mipi_dbi.c:224 (drivers/gpu/drm/drm_mipi_dbi.c:224)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_fb_memcpy
> >    >>> referenced by drm_mipi_dbi.c:221 (drivers/gpu/drm/drm_mipi_dbi.c:221)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_buf_copy) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_damage_merged
> >    >>> referenced by drm_mipi_dbi.c:318 (drivers/gpu/drm/drm_mipi_dbi.c:318)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_pipe_update) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_simple_display_pipe_init
> >    >>> referenced by drm_mipi_dbi.c:529 (drivers/gpu/drm/drm_mipi_dbi.c:529)
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_dev_init_with_formats) in archive drivers/built-in.a
> > --
> > >> ld.lld: error: undefined symbol: drm_atomic_helper_connector_reset
> >    >>> referenced by drm_mipi_dbi.c
> >    >>>               gpu/drm/drm_mipi_dbi.o:(mipi_dbi_connector_funcs) in archive drivers/built-in.a
> 
> I don't understand this error report, please robot, analyze further and come
> back with details on what needs to be fixed.

Seems like this might be the fix?

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 6c2256e8474b..679ad054ea4b 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -31,6 +31,7 @@ menuconfig DRM
 config DRM_MIPI_DBI
 	tristate
 	depends on DRM
+	select DRM_KMS_HELPER
 
 config DRM_MIPI_DSI
 	bool
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index a9043eacce97..c68b433c8241 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -165,7 +165,6 @@ config DRM_PANEL_ILITEK_IL9322
 config DRM_PANEL_ILITEK_ILI9341
 	tristate "Ilitek ILI9341 240x320 QVGA panels"
 	depends on OF && SPI
-	depends on DRM_KMS_HELPER
 	depends on DRM_GEM_CMA_HELPER
 	depends on BACKLIGHT_CLASS_DEVICE
 	select DRM_MIPI_DBI

drm_mipi_dbi.c uses several functions from the drm_kms_helper-y files
(drivers/gpu/drm/Makefile) but there is nothing to guarantee that
CONFIG_DRM_KMS_HELPER gets selected with CONFIG_DRM_MIPI_DBI. The
'depends on' drop is to remove a circular dependency failure.

For what it's worth, this error is not clang or ld.lld specific, you
would see the same problem with GCC + GNU binutils.

Cheers,
Nathan


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: ld.lld: error: undefined symbol: drm_gem_fb_get_obj
  2022-08-26 15:48   ` Doug Anderson
@ 2022-08-26 19:59     ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2022-08-26 19:59 UTC (permalink / raw)
  To: Doug Anderson
  Cc: kernel test robot, llvm, kbuild-all, LKML, Noralf Trønnes

On Fri, Aug 26, 2022 at 5:48 PM Doug Anderson <dianders@chromium.org> wrote:

> Unfortunately, fixing the error isn't the most trivial thing in the
> world. If you just do this:
>
>  config DRM_MIPI_DBI
>         tristate
> +       select DRM_KMS_HELPER
>         depends on DRM
>
> ...then you get a circular dependency:
>
> drivers/gpu/drm/Kconfig:76:error: recursive dependency detected!
> drivers/gpu/drm/Kconfig:76:     symbol DRM_KMS_HELPER is selected by
> DRM_MIPI_DBI
> drivers/gpu/drm/Kconfig:31:     symbol DRM_MIPI_DBI is selected by
> DRM_PANEL_ILITEK_ILI9341
> drivers/gpu/drm/panel/Kconfig:165:      symbol
> DRM_PANEL_ILITEK_ILI9341 depends on DRM_KMS_HELPER
> For a resolution refer to Documentation/kbuild/kconfig-language.rst
> subsection "Kconfig recursive dependency limitations"

It turns out Randy Dunlap had made the right fixes, and I merged them
before you got the chance to reply!

https://cgit.freedesktop.org/drm/drm-misc/commit/?id=84dfc46594b0167e5d3736273b0e0e05365da641
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=eb7de496451bd969e203f02f66585131228ba4ae

But thanks!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-26 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22  7:26 ld.lld: error: undefined symbol: drm_gem_fb_get_obj kernel test robot
2022-08-26  8:26 ` Linus Walleij
2022-08-26 15:48   ` Doug Anderson
2022-08-26 19:59     ` Linus Walleij
2022-08-26 15:59   ` Nathan Chancellor

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).