Mesa for Linux PPC

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

FYI: Radeon R600 Gallium3D Switches To Modern NIR Backend By Default — phoronix.com
The NIR Intermediate Representation (NIR) is the optimizing compiler stack that sits at the core of most Mesa drivers’ shader compilers.

When the r600 driver are originally implemented, TGSI was the dominating intermediate representation (IR) used by the shader compilers in Mesa. Several years back, NIR (new intermediate representation) was introduced, which has since been adopted by most drivers in Mesa. Among other things, NIR allows adding hardware specific opcodes that make it easy to transform the shader code to something that can easily be translated into hardware specific assembly.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
sailorMH
Posts: 230
Joined: Wed Aug 28, 2013 6:01 pm
Location: Czech republic

Re: Mesa for Linux PPC

Post by sailorMH »

Hello, I installed Debian 8.11 on Pegasos 2 ( as I know, it is latest distro which supports Pegasos 2 )
then I installed nonfree-firmware and mesa-utils ( lxde + mesa was installed during installation ). All works, but Mesa not:

Code: Select all

martina@pegasosa:~$ glxgears -info
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: r300
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error: couldn't get an RGB, Double-buffered visual
martina@pegasosa:~$ glxinfo
name of display: :0.0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: r300
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error: couldn't find RGB GLX visual or fbconfig
dmesg:

Code: Select all

[    7.478984] [drm] Initialized drm 1.1.0 20060810
[    7.886786] [drm] radeon kernel modesetting enabled.
[    7.897892] [drm] initializing kernel modesetting (R350 0x1002:0x4E48 0x1002:0x1002).
[    7.897969] [drm] register mmio base: 0xC8000000
[    7.897978] [drm] register mmio size: 65536
[    7.958974] [drm:radeon_agp_init] *ERROR* Unable to acquire AGP: -19
[    7.959023] [drm] Forcing AGP to PCI mode
[    7.959041] [drm] Generation 1 PCI interface in multifunction mode
[    7.959050] [drm] Limiting VRAM to one aperture
[    7.959073] radeon 0001:01:08.0: VRAM: 128M 0x00000000C0000000 - 0x00000000C7FFFFFF (128M used)
[    7.959092] radeon 0001:01:08.0: GTT: 512M 0x00000000A0000000 - 0x00000000BFFFFFFF
[    7.959159] [drm] Detected VRAM RAM=128M, BAR=128M
[    7.959169] [drm] RAM width 256bits DDR
[    7.964951] [TTM] Zone  kernel: Available graphics memory: 383720 kiB
[    7.964997] [TTM] Zone highmem: Available graphics memory: 514760 kiB
[    7.965008] [TTM] Initializing pool allocator
[    7.965129] [drm] radeon: 128M of VRAM memory ready
[    7.965143] [drm] radeon: 512M of GTT memory ready.
[    7.965215] [drm] GART: num cpu pages 131072, num gpu pages 131072
[    7.983198] [drm] radeon: 2 quad pipes, 1 Z pipes initialized.
[    7.989693] [drm] PCI GART of 512M enabled (table at 0x000000002DD00000).
[    8.000815] radeon 0001:01:08.0: WB enabled
[    8.000874] radeon 0001:01:08.0: fence driver on ring 0 use gpu addr 0x00000000a0000000 and cpu addr 0xee4e6000
[    8.000897] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    8.000907] [drm] Driver supports precise vblank timestamp query.
[    8.000965] [drm] radeon: irq initialized.
[    8.001015] [drm] Loading R300 Microcode
[    8.022197] radeon 0001:01:08.0: firmware: direct-loading firmware radeon/R300_cp.bin
[    8.022684] [drm] radeon: ring at 0x00000000A0001000
[    8.022757] [drm] ring test succeeded in 3 usecs
[    8.023108] [drm] ib test succeeded in 0 usecs
[    8.037844] [drm] Radeon Display Connectors
[    8.037889] [drm] Connector 0:
[    8.037896] [drm]   VGA-1
[    8.037907] [drm]   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
[    8.037916] [drm]   Encoders:
[    8.037924] [drm]     CRT1: INTERNAL_DAC1
[    8.037933] [drm] Connector 1:
[    8.037940] [drm]   DVI-I-1
[    8.037948] [drm]   HPD1
[    8.037956] [drm]   DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64
[    8.037965] [drm]   Encoders:
[    8.037973] [drm]     CRT2: INTERNAL_DAC2
[    8.037981] [drm]     DFP1: INTERNAL_TMDS1
[    8.252767] [drm] fb mappable at 0xC0040000
[    8.252821] [drm] vram apper at 0xC0000000
[    8.252830] [drm] size 8294400
[    8.252839] [drm] fb depth is 24
[    8.252846] [drm]    pitch is 7680
[    8.320969] Console: switching to colour frame buffer device 240x67
[    8.393809] radeon 0001:01:08.0: fb0: radeondrmfb frame buffer device
[    8.394257] radeon 0001:01:08.0: registered panic notifier
[    8.396129] [drm] Initialized radeon 2.39.0 20080528 for 0001:01:08.0 on minor 0
Xorg.0.log:

Code: Select all

[    14.273] (II) LoadModule: "glx"
[    14.275] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    14.407] (II) Module glx: vendor="X.Org Foundation"
[    14.407] 	compiled for 1.16.4, module version = 1.0.0
[    14.407] 	ABI class: X.Org Server Extension, version 8.0
[    14.407] (==) AIGLX enabled
[    14.412] (II) LoadModule: "radeon"
[    14.413] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[    14.459] (II) Module radeon: vendor="X.Org Foundation"
[    14.459] 	compiled for 1.16.1, module version = 7.5.0
[    14.459] 	Module class: X.Org Video Driver
[    14.459] 	ABI class: X.Org Video Driver, version 18.0
[    14.459] (II) RADEON: Driver for ATI Radeon chipsets:
...
[    14.556] (II) [KMS] Kernel modesetting enabled.
[    14.556] (II) RADEON(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[    14.556] (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
[    14.556] (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[    14.556] (==) RADEON(0): Default visual is TrueColor
[    14.556] (**) RADEON(0): Option "Accel" "on"
[    14.557] (**) RADEON(0): Option "SwapbuffersWait" "false"
[    14.557] (==) RADEON(0): RGB weight 888
[    14.557] (II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
[    14.557] (--) RADEON(0): Chipset: "ATI Radeon 9800PRO NH (AGP)" (ChipID = 0x4e48)
[    14.557] (II) Loading sub module "dri2"
[    14.557] (II) LoadModule: "dri2"
[    14.557] (II) Module "dri2" already built-in
[    14.557] (II) Loading sub module "exa"
[    14.557] (II) LoadModule: "exa"
[    14.557] (II) Loading /usr/lib/xorg/modules/libexa.so
[    14.561] (II) Module exa: vendor="X.Org Foundation"
[    14.562] 	compiled for 1.16.4, module version = 2.6.0
[    14.562] 	ABI class: X.Org Video Driver, version 18.0
[    14.562] (II) RADEON(0): KMS Color Tiling: enabled
[    14.562] (II) RADEON(0): KMS Color Tiling 2D: disabled
[    14.562] (II) RADEON(0): KMS Pageflipping: enabled
...
[    14.753] (II) RADEON(0): [DRI2] Setup complete
[    14.753] (II) RADEON(0): [DRI2]   DRI driver: r300
[    14.753] (II) RADEON(0): [DRI2]   VDPAU driver: r300
[    14.754] (II) RADEON(0): Front buffer size: 8160K
[    14.754] (II) RADEON(0): VRAM usage limit set to 103071K
[    14.760] (==) RADEON(0): Backing store enabled
[    14.760] (II) RADEON(0): Direct rendering enabled
[    14.760] (II) RADEON(0): Render acceleration enabled for R300/R400/R500 type cards.
[    14.760] (II) EXA(0): Driver allocated offscreen pixmaps
[    14.760] (II) EXA(0): Driver registered support for the following operations:
[    14.760] (II)         Solid
[    14.760] (II)         Copy
[    14.760] (II)         Composite (RENDER acceleration)
[    14.760] (II)         UploadToScreen
[    14.760] (II)         DownloadFromScreen
[    14.760] (II) RADEON(0): Acceleration enabled
[    14.760] (==) RADEON(0): DPMS enabled
[    14.761] (==) RADEON(0): Silken mouse enabled
[    14.767] (II) RADEON(0): Set up textured video
[    14.767] (II) RADEON(0): [XvMC] Associated with Radeon Textured Video.
[    14.768] (II) RADEON(0): [XvMC] Extension initialized.
[    14.768] (II) RADEON(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    14.773] (--) RandR disabled
[    14.870] (II) SELinux: Disabled on system
[    15.393] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[    15.393] (II) AIGLX: enabled GLX_ARB_create_context
[    15.393] (II) AIGLX: enabled GLX_ARB_create_context_profile
[    15.393] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile
[    15.393] (II) AIGLX: enabled GLX_INTEL_swap_event
[    15.393] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[    15.393] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[    15.394] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[    15.394] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[    15.394] (II) AIGLX: Loaded and initialized r300
[    15.394] (II) GLX: Initialized DRI2 GL provider for screen 0
[    15.407] (II) RADEON(0): Setting screen physical size to 508 x 285
Mesa version is 10.3.2-1 ... probably this is version with PPC error
My graphics card is Radeon 9800 PRO, i.e.chip R350, driver R300
Old Debian Wheezy 7.11 with Mesa 8.0.5-4 works with 3D, but has wrong colours.

Please, do you know howto fix it?
May I use some of versions in this topics, or here: http://www.supertuxkart-amiga.de/amiga/ ... icial.html ?
But all these are versions for X1000 and X5000, will it work with 32-bit Pegasos?

Thanks for any help.
Micro A1-C (G3/1.2 GHz), AmigaOne XE (G4/1.4 GHz), Pegasos II (G4/1.33 GHz), Sam440ep, Sam440ep-flex, AmigaOne X1000
Efika 5200b, Pegasos I, Powerbook, Mac Mini (1.83 GHz), iMac, Powermac Quad

AmigaOS, MorphOS, linux, MacOS X
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Hi sailorMH,

Please try the unofficial Mesa 10.0.3.

Download: MesaLib-10.0.3-powerpc-unofficial.tar.bz2

Install instructions:
  1. Unpack the archive MesaLib-10.0.3-powerpc-unofficial.tar.bz2
  2. Copy it as root to the directory /usr/local/

    Code: Select all

    sudo cp -R mesa10 /usr/local/
    
  3. Set up the new library path

    Code: Select all

    export LD_LIBRARY_PATH=/usr/local/mesa10/lib
    
  4. Test it with glxgears. After that you can start some games for example Neverball.
SuperTuxKart needs a special run_game.sh for the new Mesa:

Code: Select all

LD_LIBRARY_PATH=./bin/:/usr/local/mesa10/lib bin/supertuxkart
Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Please also try Mesa 7.11:

1. Download: Mesa-7.11_Debian7.7_classic_dri.tar.gz

User: tabor
Password: amigaone

2. Copy the unpacked Mesa directory to /usr/local:

Code: Select all

cp -R Mesa7.11.2-without-gallium /usr/local
3.

Code: Select all

mv /usr/lib/powerpc-linux-gnu/dri/r300_dri.so /usr/lib/powerpc-linux-gnu/dri/r300_dri.so.bak
4.

Code: Select all

cp /usr/local/Mesa7.11.2-without-gallium/lib/dri/r300_dri.so /usr/lib/powerpc-linux-gnu/dri
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
sailorMH
Posts: 230
Joined: Wed Aug 28, 2013 6:01 pm
Location: Czech republic

Re: Mesa for Linux PPC

Post by sailorMH »

@xeno74

thank you very much! I will test and let know.
Micro A1-C (G3/1.2 GHz), AmigaOne XE (G4/1.4 GHz), Pegasos II (G4/1.33 GHz), Sam440ep, Sam440ep-flex, AmigaOne X1000
Efika 5200b, Pegasos I, Powerbook, Mac Mini (1.83 GHz), iMac, Powermac Quad

AmigaOS, MorphOS, linux, MacOS X
User avatar
sailorMH
Posts: 230
Joined: Wed Aug 28, 2013 6:01 pm
Location: Czech republic

Re: Mesa for Linux PPC

Post by sailorMH »

unfortunatelly both versions not works:

Mesa 10.0.3:

Code: Select all

martina@pegasosa:~$ LIBGL_DEBUG=verbose glxinfo 
name of display: :0.0
libGL: OpenDriver: trying /usr/local/mesa10/lib/dri/r300_dri.so
libGL: driver does not expose __driDriverGetExtensions_r300(): /usr/local/mesa10/lib/dri/r300_dri.so: undefined symbol: __driDriverGetExtensions_r300
libGL: Can't open configuration file /home/martina/.drirc: No such file or directory.
libGL: Can't open configuration file /home/martina/.drirc: No such file or directory.
libGL error: failed to load driver: r300
libGL: OpenDriver: trying /usr/local/mesa10/lib/dri/swrast_dri.so
libGL: driver does not expose __driDriverGetExtensions_swrast(): /usr/local/mesa10/lib/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libGL: Can't open configuration file /home/martina/.drirc: No such file or directory.
libGL: Can't open configuration file /home/martina/.drirc: No such file or directory.
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  156 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  45
  Current serial number in output stream:  44

martina@pegasosa:~$ ls /usr/local/mesa10/lib/dri
r200_dri.so  r300_dri.so  r600_dri.so    swrast_dri.la  vmwgfx_dri.la
r300_dri.la  r600_dri.la  radeon_dri.so  swrast_dri.so  vmwgfx_dri.so
Mesa 7.11:

Code: Select all

martina@pegasosa:~$ LIBGL_DEBUG=verbose glxinfo 
name of display: :0.0
libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 4: 1002:4e48, driver r300
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/tls/r300_dri.so
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/r300_dri.so
libGL: dlopen /usr/lib/powerpc-linux-gnu/dri/r300_dri.so failed (/usr/lib/powerpc-linux-gnu/dri/r300_dri.so: undefined symbol: _glapi_Dispatch)
libGL: OpenDriver: trying ${ORIGIN}/dri/tls/r300_dri.so
libGL: OpenDriver: trying ${ORIGIN}/dri/r300_dri.so
libGL: dlopen ${ORIGIN}/dri/r300_dri.so failed (/usr/lib/powerpc-linux-gnu/dri/r300_dri.so: undefined symbol: _glapi_Dispatch)
libGL: OpenDriver: trying /usr/lib/dri/tls/r300_dri.so
libGL: OpenDriver: trying /usr/lib/dri/r300_dri.so
libGL: dlopen /usr/lib/dri/r300_dri.so failed (/usr/lib/dri/r300_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: r300_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r300
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/powerpc-linux-gnu/dri/swrast_dri.so
libGL: Can't open configuration file /home/martina/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error: couldn't find RGB GLX visual or fbconfig
Micro A1-C (G3/1.2 GHz), AmigaOne XE (G4/1.4 GHz), Pegasos II (G4/1.33 GHz), Sam440ep, Sam440ep-flex, AmigaOne X1000
Efika 5200b, Pegasos I, Powerbook, Mac Mini (1.83 GHz), iMac, Powermac Quad

AmigaOS, MorphOS, linux, MacOS X
User avatar
xeno74
Posts: 9349
Joined: Fri Mar 23, 2012 7:58 am

Re: Mesa for Linux PPC

Post by xeno74 »

Please reinstall the packages libgl1-mesa-dri and libgl1-mesa-glx and then copy the patched r300_dri.so to /usr/lib/powerpc-linux-gnu/dri.

Maybe libglamor is the problem.

Please prevent the libglamor module from loading.

Code: Select all

sudo mv /usr/lib/xorg/modules/libglamoregl.so /usr/lib/xorg/modules/libglamoregl.so.bak
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
sailorMH
Posts: 230
Joined: Wed Aug 28, 2013 6:01 pm
Location: Czech republic

Re: Mesa for Linux PPC

Post by sailorMH »

Thanks, I will try in the evening.
And I know, it is old version and unsupported Pegasos 2 machine, I appreciate your support.
Micro A1-C (G3/1.2 GHz), AmigaOne XE (G4/1.4 GHz), Pegasos II (G4/1.33 GHz), Sam440ep, Sam440ep-flex, AmigaOne X1000
Efika 5200b, Pegasos I, Powerbook, Mac Mini (1.83 GHz), iMac, Powermac Quad

AmigaOS, MorphOS, linux, MacOS X
Post Reply