Announcement

Collapse
No announcement yet.

Radeon R600 Tiling Patches Are Ready

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

  • #16
    wanted to try this but no luck
    had to compile mesa without egl and NWN2 whitch works without 2Dtiling didnt work
    no picture just some white garbage on screen

    Comment


    • #17
      Originally posted by pixo View Post
      wanted to try this but no luck
      had to compile mesa without egl and NWN2 whitch works without 2Dtiling didnt work
      no picture just some white garbage on screen
      Install apitrace, run a trace, compress it with xz, and upload it somewhere. I'll try to reproduce it locally, and you might be able to pull Glisse's ear to get him to look at it too.

      Also, when it worked without 2d tiling, were you using *old* drivers, or a very recent git master without 2d tiling? If you were using old drivers, the issue you're hitting might be a regression unrelated to tiling. Try it first with git master but with 2d tiling disabled (for example, boot up a non-tiling 3.2 kernel).

      Also, what radeon hardware do you have?

      Comment


      • #18
        Originally posted by pixo View Post
        wanted to try this but no luck
        had to compile mesa without egl
        With egl I get this linking-error:

        gmake[3]: Entering directory `/var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999/src/gallium/targets/egl-static'
        /bin/sh ../../../../bin/mklib -o egl_gallium.so -noprefix -linker 'x86_64-pc-linux-gnu-g++' \
        -ldflags '-L../../../../lib64 -Wl,--no-undefined -Wl,-O1 -Wl,--as-needed -L/usr/lib64/llvm -ludis86 -lpthread -lffi -ldl -lm ' \
        -cplusplus -install ../../../../lib64/egl \
        egl.o egl_pipe.o egl_st.o -Wl,--start-group ../../../../src/gallium/auxiliary/libgallium.a ../../../../src/gallium/drivers/identity/libidentity.a ../../../../src/gallium/drivers/llvmpipe/libllvmpipe.a ../../../../src/gallium/drivers/r600/libr600.a ../../../../src/gallium/drivers/rbug/librbug.a ../../../../src/gallium/drivers/softpipe/libsoftpipe.a ../../../../src/gallium/drivers/trace/libtrace.a ../../../../src/gallium/state_trackers/egl/libegl.a ../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a ../../../../src/gallium/winsys/sw/xlib/libws_xlib.a ../../../../src/mesa/libmesagallium.a -Wl,--end-group \
        -lEGL -lX11 -lXext -lXfixes -ldl -ldrm -lglapi -lm -lpthread -lrt -ludev -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMX86Info -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport
        mklib: Making Linux shared library: egl_gallium.so
        ../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a(radeon_drm_winsys.o): In function `radeon_winsys_destroy':
        radeon_drm_winsys.c.text+0xdc): undefined reference to `radeon_surface_manager_free'
        ../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a(radeon_drm_winsys.o): In function `radeon_drm_winsys_create':
        radeon_drm_winsys.c.text+0x409): undefined reference to `radeon_surface_manager_free'
        radeon_drm_winsys.c.text+0x5a1): undefined reference to `radeon_surface_manager_new'
        ../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a(radeon_drm_winsys.o): In function `radeon_drm_winsys_surface_best':
        radeon_drm_winsys.c.text+0x68): undefined reference to `radeon_surface_best'
        ../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a(radeon_drm_winsys.o): In function `radeon_drm_winsys_surface_init':
        radeon_drm_winsys.c.text+0x88): undefined reference to `radeon_surface_init'
        collect2: ld returned 1 exit status
        mklib: Installing egl_gallium.so in ../../../../lib64/egl
        mv: cannot stat `egl_gallium.so': No such file or directory
        /usr/bin/install -c -d /var/tmp/portage/media-libs/mesa-9999/image//usr/lib64/egl
        for out in ../../../../lib64/egl/egl_gallium.so; do \
        /bin/sh ../../../../bin/minstall -m 755 "$out" /var/tmp/portage/media-libs/mesa-9999/image//usr/lib64/egl; \
        done
        Unknown type of argument: ../../../../lib64/egl/egl_gallium.so
        gmake[3]: *** [install] Error 1
        gmake[3]: Leaving directory `/var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999/src/gallium/targets/egl-static'
        gmake[2]: *** [install] Error 1
        gmake[2]: Leaving directory `/var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999/src/gallium/targets'
        make[1]: *** [install] Error 1
        make[1]: Leaving directory `/var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999/src'
        make: *** [install] Error 1

        edit:

        Hm, even with egl disabled it doesn't work. After kdm came up, I got a garbled screen and dmesg said:

        radeon 0000:01:00.0: evergreen_surface_value_conv_check:329 invalid array mode 5
        radeon 0000:01:00.0: evergreen_packet3_check:1918 invalid cmd stream 454
        [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

        I had to disable ColorTiling and ColorTiling2D in xorg.conf to get X working again.

        This happend with patched kernel, drm (from upstream git), mesa and xf86-video-ati driver.
        Last edited by PuckPoltergeist; 02-05-2012, 06:15 PM.

        Comment


        • #19
          The following patch should fix it:

          Code:
          From d9286b87bebfc9d79b2037d9b1cb199679419837 Mon Sep 17 00:00:00 2001
          From: Tobias Droste <tdroste@gmx.de>
          Date: Mon, 6 Feb 2012 01:51:28 +0100
          Subject: [PATCH] build: Add libdrm_radeon when linking egl and gbm
          
          this fixes undefined references when creating egl_gallium and r600g
          
          Signed-off-by: Tobias Droste <tdroste@gmx.de>
          ---
           src/gallium/targets/egl-static/Makefile |    2 ++
           src/gallium/targets/gbm/Makefile        |    2 ++                                                     
           2 files changed, 4 insertions(+), 0 deletions(-)                                                      
                                                                                                                 
          diff --git a/src/gallium/targets/egl-static/Makefile b/src/gallium/targets/egl-static/Makefile                                                              
          index 70e4362..02a55ee 100644                                                                                                                               
          --- a/src/gallium/targets/egl-static/Makefile
          +++ b/src/gallium/targets/egl-static/Makefile
          @@ -115,6 +115,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R300=1
           egl_LIBS += \
                  $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
                  $(TOP)/src/gallium/drivers/r300/libr300.a
          +egl_SYS += -ldrm_radeon
           endif
           endif
           
          @@ -125,6 +126,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R600=1
           egl_LIBS += \
                  $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \
                  $(TOP)/src/gallium/drivers/r600/libr600.a
          +egl_SYS += -ldrm_radeon
           endif
           endif
           
          diff --git a/src/gallium/targets/gbm/Makefile b/src/gallium/targets/gbm/Makefile
          index ce56f93..ca58a97 100644
          --- a/src/gallium/targets/gbm/Makefile
          +++ b/src/gallium/targets/gbm/Makefile
          @@ -114,6 +114,7 @@ ifneq ($(findstring radeon/drm,$(GALLIUM_WINSYS_DIRS)),)
           ifneq ($(findstring r300,$(GALLIUM_DRIVERS_DIRS)),)
           _pipe_TARGETS_CC += $(PIPE_PREFIX)r300.so
           pipe_SOURCES += pipe_r300.c
          +pipe_LDFLAGS += -ldrm_radeon
           endif
           endif
           
          @@ -121,6 +122,7 @@ ifneq ($(findstring radeon/drm,$(GALLIUM_WINSYS_DIRS)),)
           ifneq ($(findstring r600,$(GALLIUM_DRIVERS_DIRS)),)
           _pipe_TARGETS_CC += $(PIPE_PREFIX)r600.so
           pipe_SOURCES += pipe_r600.c
          +pipe_LDFLAGS += -ldrm_radeon
           endif
           endif
           
          -- 
          1.7.7

          Comment


          • #20
            Originally posted by pali View Post
            > The ColorTiling2D option though still needs to be enabled within the xorg.conf for proper support.

            How to enable it? Which option must be added to xorg.conf?
            same question

            Comment


            • #21
              build problems are fixed, but the "Invalid command stream" is still an issue.

              Comment


              • #22
                Originally posted by vancel1 View Post
                same question
                If you have to ask, you probably don't have the skillset to test the patches without exact step by step instructions, which would take too much time (and be too machine-dependent) to be worthwhile.

                However, if you must know:

                Section Device
                Identifier "blah"
                Driver "radeon"
                Option "ColorTiling2D" "on"
                EndSection
                Put something like that in /etc/xorg.conf.d/01-heh.conf

                NB: If this breaks your X because of invalid syntax or something, I am not responsible! This is untested "air code". You are responsible for figuring out how to debug X and get it working if there's an error.

                Comment


                • #23
                  Originally posted by PuckPoltergeist View Post
                  build problems are fixed, but the "Invalid command stream" is still an issue.
                  Issue on your end, something is not using the proper mesa.

                  Comment


                  • #24
                    Originally posted by glisse View Post
                    Issue on your end, something is not using the proper mesa.
                    Ok, where does the inproper mesa come from? I've only one version installed (system one) and this is patched with your patch and the build-patch for egl/gbm. It's build by portage with the patches applied on top of the latest git (mesa and ddx).

                    PS: How does kdm interact with mesa? I thought it's ddx only at this point.

                    Comment


                    • #25
                      I've removed mesa completely, started kdm, stopped kdm, reinstalled mesa, started kdm. Everytime the same behavior. As soon as I've enabled ColorTiling (not even ColorTiling2D) I got a garbled screen and dmesg showed the command stream errors. Something goes wrong on my HD5470. And I doubt it's because improper mesa.

                      PS: I've found some other error messages in dmesg:
                      Code:
                      radeon 0000:01:00.0: evergreen_surface_check_1d:244 stencil height 581 invalid must be aligned with 8
                      radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:502 stencil invalid (0x000000af 0x000031ed 0x00000401 0x00002022)
                      radeon 0000:01:00.0: evergreen_packet3_check:1918 invalid cmd stream 929
                      [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
                      Last edited by PuckPoltergeist; 02-06-2012, 12:26 PM.

                      Comment


                      • #26
                        OK done some more testing.
                        The problem seems to be only in 32bit
                        I get the:
                        [ 738.794944] radeon 0000:01:00.0: evergreen_cs_track_validate_depth:608 depth read bo too small (layer size 33423360, offset 0, max layer 1, bo size 11059200)
                        [ 738.794947] radeon 0000:01:00.0: evergreen_packet3_check:1889 invalid cmd stream
                        [ 738.794949] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

                        In 64bit everithing works fine.
                        Also if I disable CollorTiling2D 32bit works fine.
                        Maybe there is something wrong inbetween 32bit libdrm and 64bit kernel.

                        allquixotic can you tell if you run ST:Online on 32bit system or 64bit multilib?

                        env:
                        gentoo 64bit
                        01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Turks [Radeon HD 6570]
                        Linux Kriziak 3.3.0-rc2+ #1 SMP Sun Feb 5 19:26:01 CET 2012 x86_64 Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz GenuineIntel GNU/Linux
                        OpenGL vendor string: X.Org
                        OpenGL renderer string: Gallium 0.4 on AMD TURKS
                        OpenGL version string: 2.1 Mesa 8.0-devel (git-189e6c7)
                        OpenGL shading language version string: 1.20

                        Using lidbrm, libdrm-32bit, mesa and mesa-32bit from git master. Both mesas are patched.

                        Comment


                        • #27
                          Originally posted by PuckPoltergeist View Post
                          I've removed mesa completely, started kdm, stopped kdm, reinstalled mesa, started kdm. Everytime the same behavior. As soon as I've enabled ColorTiling (not even ColorTiling2D) I got a garbled screen and dmesg showed the command stream errors. Something goes wrong on my HD5470. And I doubt it's because improper mesa.

                          PS: I've found some other error messages in dmesg:
                          Code:
                          radeon 0000:01:00.0: evergreen_surface_check_1d:244 stencil height 581 invalid must be aligned with 8
                          radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:502 stencil invalid (0x000000af 0x000031ed 0x00000401 0x00002022)
                          radeon 0000:01:00.0: evergreen_packet3_check:1918 invalid cmd stream 929
                          [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
                          I can only play the guess game here but you might also be lacking the proper ddx. Unless kdm is doing something very weird and hiting a codepath i haven't hit. Also Option ColorTiling is useless with patched ddx, only option ColorTiling2D matter for r600 and newer.

                          Comment


                          • #28
                            Originally posted by glisse View Post
                            I can only play the guess game here but you might also be lacking the proper ddx. Unless kdm is doing something very weird and hiting a codepath i haven't hit. Also Option ColorTiling is useless with patched ddx, only option ColorTiling2D matter for r600 and newer.
                            Ok, but Option ColorTiling was the one that was needed to get a working X again. I had to take it off by force. Additionally I had a complete xserver crash with the patched ddx when tried to view a movie with mplayer2. At least I suspect the ddx was responsible. The log says:
                            Code:
                            Backtrace:
                            [ 40622.687] 0: /usr/bin/X (xorg_backtrace+0x26) [0x56d1a6]
                            [ 40622.687] 1: /usr/bin/X (0x400000+0x170f49) [0x570f49]
                            [ 40622.687] 2: /lib64/libpthread.so.0 (0x7f3535823000+0x10ff0) [0x7f3535833ff0]
                            [ 40622.687] 3: /usr/lib64/xorg/modules/drivers/radeon_drv.so (0x7f3532872000+0xb3d34) [0x7f3532925d34]
                            [ 40622.687] 4: /usr/lib64/xorg/modules/drivers/radeon_drv.so (0x7f3532872000+0xcffec) [0x7f3532941fec]
                            [ 40622.687] 5: /usr/lib64/xorg/modules/drivers/radeon_drv.so (0x7f3532872000+0x7e06e) [0x7f35328f006e]
                            [ 40622.688] 6: /usr/bin/X (0x400000+0x8c38e) [0x48c38e]
                            [ 40622.688] 7: /usr/lib64/xorg/modules/extensions/libextmod.so (0x7f3533823000+0xf55e) [0x7f353383255e]
                            [ 40622.688] 8: /usr/bin/X (0x400000+0x37039) [0x437039]
                            [ 40622.688] 9: /usr/bin/X (0x400000+0x2613a) [0x42613a]
                            [ 40622.688] 10: /lib64/libc.so.6 (__libc_start_main+0xed) [0x7f35347503cd]
                            [ 40622.688] 11: /usr/bin/X (0x400000+0x264bd) [0x4264bd]
                            [ 40622.688] Segmentation fault at address 0x2b0
                            [ 40622.688]*
                            Fatal server error:
                            [ 40622.688] Caught signal 11 (Segmentation fault). Server aborting
                            [ 40622.688]*
                            [ 40622.688]
                            I will test some more.

                            Comment


                            • #29
                              As soon as I replace the radeon_drv.so with the patched one, the screen gets diagonal distorted and I get the command stream errors. I don't even need to activate the ColorTiling2D option.
                              I've downloaded the patch again and applied on top of 36c190671081967bac6fff48aaf66d67b639a48c to be sure, nothing got lost there. It applied cleanly (one trailing whitespace warning but I don't think this was responsible).

                              Comment


                              • #30
                                Originally posted by PuckPoltergeist View Post
                                As soon as I replace the radeon_drv.so with the patched one, the screen gets diagonal distorted and I get the command stream errors. I don't even need to activate the ColorTiling2D option.
                                I've downloaded the patch again and applied on top of 36c190671081967bac6fff48aaf66d67b639a48c to be sure, nothing got lost there. It applied cleanly (one trailing whitespace warning but I don't think this was responsible).
                                What's your screen resolution ?

                                Comment

                                Working...
                                X