Announcement

Collapse
No announcement yet.

amd-staging-drm-next FTBFS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • amd-staging-drm-next FTBFS

    Hi,
    I just bought a RX-480 and I'd like to try freesync and all AMD stuff even with FOSS driver.

    So I decided to compile amd-staging-drm-next from Dave repository. BTW I'm facing this error while building the kernel package.
    Running Debian Sid.

    Code:
    CC      drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.o
    In file included from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_freesync.h:57:0,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h:47,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu.h:50,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:44:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function ‘dm_read_reg_func’:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:75:2: error: implicit declaration of function ‘BREAK_TO_DEBUGGER’ [-Werror=implicit-function-declaration]
      BREAK_TO_DEBUGGER(); \
      ^
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:106:3: note: in expansion of macro ‘DC_ERR’
       DC_ERR("invalid register read. address = 0");
       ^~~~~~
      LD      drivers/media/usb/b2c2/built-in.o
      LD      drivers/media/usb/dvb-usb/built-in.o
      LD      drivers/media/usb/dvb-usb-v2/built-in.o
    cc1: some warnings being treated as errors
    scripts/Makefile.build:293: recipe for target 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.o' failed
    make[6]: *** [drivers/gpu/drm/amd/amdgpu/amdgpu_drv.o] Error 1
    make[6]: *** Waiting for unfinished jobs....
      LD      drivers/media/usb/s2255/built-in.o
      LD      drivers/media/usb/siano/built-in.o
      CC      drivers/gpu/drm/amd/amdkfd/kfd_module.o
      LD      drivers/media/usb/stkwebcam/built-in.o
      CC      drivers/gpu/drm/amd/amdkfd/kfd_device.o
      LD      drivers/media/usb/ttusb-budget/built-in.o
      LD      drivers/media/usb/ttusb-dec/built-in.o
      LD      drivers/media/usb/zr364xx/built-in.o
    In file included from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_freesync.h:57:0,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h:47,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu.h:50,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:39:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function ‘dm_read_reg_func’:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:75:2: error: implicit declaration of function ‘BREAK_TO_DEBUGGER’ [-Werror=implicit-function-declaration]
      BREAK_TO_DEBUGGER(); \
      ^
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:106:3: note: in expansion of macro ‘DC_ERR’
       DC_ERR("invalid register read. address = 0");
       ^~~~~~
      LD      drivers/media/usb/built-in.o
      LD      drivers/media/built-in.o
    In file included from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_freesync.h:57:0,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h:47,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu.h:50,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c:29:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function ‘dm_read_reg_func’:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:75:2: error: implicit declaration of function ‘BREAK_TO_DEBUGGER’ [-Werror=implicit-function-declaration]
      BREAK_TO_DEBUGGER(); \
      ^
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:106:3: note: in expansion of macro ‘DC_ERR’
       DC_ERR("invalid register read. address = 0");
       ^~~~~~
      LD      drivers/memory/built-in.o
      CC      drivers/mfd/mfd-core.o
    In file included from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_freesync.h:57:0,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h:47,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu.h:50,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:28:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function ‘dm_read_reg_func’:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:75:2: error: implicit declaration of function ‘BREAK_TO_DEBUGGER’ [-Werror=implicit-function-declaration]
      BREAK_TO_DEBUGGER(); \
      ^
    drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:106:3: note: in expansion of macro ‘DC_ERR’
       DC_ERR("invalid register read. address = 0");
       ^~~~~~
      LD      drivers/misc/cb710/built-in.o
      LD      drivers/misc/eeprom/built-in.o
      LD [M]  net/sunrpc/sunrpc.o
      LD      net/built-in.o
      LD      drivers/misc/lis3lv02d/built-in.o
      LD      drivers/misc/mic/bus/built-in.o
      LD      drivers/misc/mic/built-in.o
    cc1: some warnings being treated as errors
    scripts/Makefile.build:293: recipe for target 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.o' failed
    make[6]: *** [drivers/gpu/drm/amd/amdgpu/amdgpu_kms.o] Error 1
      LD      drivers/misc/ti-st/built-in.o
      LD      drivers/mmc/built-in.o
      LD      drivers/misc/built-in.o
      LD      drivers/nfc/built-in.o
      CC      drivers/net/mii.o
      CC      drivers/gpu/drm/amd/amdkfd/kfd_chardev.o
      LD      drivers/nvme/host/built-in.o
      CC      drivers/gpu/drm/amd/amdkfd/kfd_topology.o
      CC      drivers/pci/access.o
      LD      drivers/nvme/target/built-in.o
      LD      drivers/nvme/built-in.o
    cc1: some warnings being treated as errors
    scripts/Makefile.build:293: recipe for target 'drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.o' failed
    make[6]: *** [drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.o] Error 1
      CC      drivers/pci/bus.o
      LD      drivers/gpu/drm/bridge/built-in.o
      CC      drivers/pci/probe.o
    cc1: some warnings being treated as errors
      LD      drivers/mfd/built-in.o
    scripts/Makefile.build:293: recipe for target 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.o' failed
    make[6]: *** [drivers/gpu/drm/amd/amdgpu/amdgpu_device.o] Error 1
    scripts/Makefile.build:544: recipe for target 'drivers/gpu/drm/amd/amdgpu' failed
    make[5]: *** [drivers/gpu/drm/amd/amdgpu] Error 2
    make[5]: *** Waiting for unfinished jobs....
    Any tips? I'm doing it wrong?

  • #2
    Originally posted by debianxfce View Post
    You need to have kernel .config file that matches what amd driver developers have. In this case you need to enable break point to the debugger. Some configs here:
    http://www.linuxtopia.org/online_boo...n/ch09s07.html
    Debug kernel you must use, if they have not fix bug that stop compilation with non debug kernel.

    For gcc 6.2 you need also these patches for makefile (example is for drm-next-4.10 kernel) or compile the kernel with gcc 5:
    Edit Makefile:line 656
    ifneq ($(CONFIG_FRAME_WARN),0)
    KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
    endif
    Lisää:
    # force no-pie for distro compilers that enable pie by default
    KBUILD_CFLAGS += $(call cc-option, -fno-pie)
    KBUILD_CFLAGS += $(call cc-option, -no-pie)
    KBUILD_AFLAGS += $(call cc-option, -fno-pie)

    Also disable CONFIG_MODVERSIONS. Use the command: make xconfig and check that you have enabled: Reroute Broken IRQ, amdgpu power play, Virtualization KVM and 300Hz CPU timer, I also disabled Swap, Kernel Debug, CPU Freq scaling , Cpu handling in Acpi, Used Bios to control CPU and devices.
    Oh thank you, I'll dig and report.
    I have a patch for disabling pie in GCC 6.2+, but, for example, I'm sure I've disabled KVM and others.

    Comment


    • #3
      Well, thank you debianxfce for your tip, I was able to compile the kernel from Dave branch.
      Thanks.

      Comment


      • #4
        Well, I tested the kernel with DeusEX:MD.
        Performance are really poor with bad colors too, also I can't bring up audio from DP.

        So I'm back on drm-next-4.10-wip.

        Comment


        • #5
          I'm already on bleeding edge graphic driver.
          I build myself (as soon as I see a commit about radeonsi): mesa (mesa32 in a chroot), drm, xserver, libinput, while LLVM is updated with this jenkins instance.

          So I think is something related to kernel, memory management etc. .
          Last edited by lorenzoz; 09 January 2017, 03:39 PM.

          Comment


          • #6
            Originally posted by debianxfce View Post

            4.10-wip and staging-4.7 amdgpu driver have same patches, except DAL code. I found it difficult to compile mesa myself and I trust more Oibaf ppa even I am pro software developer. Phoronix did test Deux Ex after mesa patching, phoronix is using Padoka ppa most of the time. Padoka ppa also works with Debian testing, but Oibaf ppa is updated more often, recently every day.
            Well I tested DAL with amd-staging-drm-next not staging-4.7.
            I can test with the brand new staging-4.9.

            This evening, CET, I can provide you my bash script for mesa. I'm using that script since 2014 so it's tested.
            For sure you can do better as I'm not a programmer.

            Comment

            Working...
            X