PDA

View Full Version : Compile errors xf86-driver-ati and mesa


DF5JT
07-13-2009, 12:47 PM
Howdy,

this is on mandriva Linux 2010 with KMS-enabled kernel:

Linux localhost 2.6.31-tmb-laptop-0.rc2.8.3mdv #1 SMP

git clone xf86-video-ati compile error:

In file included from radeon_textured_video.c:148:
radeon_textured_videofuncs.c: In function ‘RADEONDisplayTexturedVideoMMIO’:
radeon_textured_videofuncs.c:109: warning: implicit declaration of function ‘radeon_cs_space_reset_bos’
radeon_textured_videofuncs.c:110: warning: implicit declaration of function ‘radeon_cs_space_add_persistent_bo’
radeon_textured_videofuncs.c:118: error: too few arguments to function ‘radeon_cs_space_check’
radeon_textured_videofuncs.c: In function ‘R200DisplayTexturedVideoMMIO’:
radeon_textured_videofuncs.c:507: error: too few arguments to function ‘radeon_cs_space_check’
radeon_textured_videofuncs.c: In function ‘R300DisplayTexturedVideoMMIO’:
radeon_textured_videofuncs.c:1049: error: too few arguments to function ‘radeon_cs_space_check’
radeon_textured_videofuncs.c: In function ‘R500DisplayTexturedVideoMMIO’:
radeon_textured_videofuncs.c:2500: error: too few arguments to function ‘radeon_cs_space_check’
In file included from radeon_textured_video.c:171:
radeon_textured_videofuncs.c: In function ‘RADEONDisplayTexturedVideoCP’:
radeon_textured_videofuncs.c:118: error: too few arguments to function ‘radeon_cs_space_check’
radeon_textured_videofuncs.c: In function ‘R200DisplayTexturedVideoCP’:
radeon_textured_videofuncs.c:507: error: too few arguments to function ‘radeon_cs_space_check’
radeon_textured_videofuncs.c: In function ‘R300DisplayTexturedVideoCP’:
radeon_textured_videofuncs.c:1049: error: too few arguments to function ‘radeon_cs_space_check’
radeon_textured_videofuncs.c: In function ‘R500DisplayTexturedVideoCP’:
radeon_textured_videofuncs.c:2500: error: too few arguments to function ‘radeon_cs_space_check’
make[1]: *** [radeon_textured_video.lo] Error 1
make: *** [install-recursive] Error 1

and mesa error:

gmake[5]: Entering directory `/usr/local/src/mesa/src/mesa/drivers/dri/r300'
gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver -I../../../../../include -I../../../../../src/mesa -I../../../../../src/egl/main -I../../../../../src/egl/drivers/dri -I/usr/include/drm -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fPIC -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_LIBDRM_RADEON=1 -I/usr/include/drm -DCOMPILE_R300 -DR200_MERGED=0 -DRADEON_COMMON=1 -DRADEON_COMMON_FOR_R300 r300_ioctl.c -o r300_ioctl.o
r300_ioctl.c: In function ‘r300KernelClear’:
r300_ioctl.c:553: warning: implicit declaration of function ‘radeon_cs_space_reset_bos’
r300_ioctl.c:557: warning: implicit declaration of function ‘radeon_cs_space_add_persistent_bo’
r300_ioctl.c:579: error: too few arguments to function ‘radeon_cs_space_check’
gmake[5]: *** [r300_ioctl.o] Error 1
gmake[5]: Leaving directory `/usr/local/src/mesa/src/mesa/drivers/dri/r300'
gmake[4]: *** [subdirs] Error 1
gmake[4]: Leaving directory `/usr/local/src/mesa/src/mesa/drivers/dri'
gmake[3]: *** [default] Error 1
gmake[3]: Leaving directory `/usr/local/src/mesa/src/mesa/drivers'
gmake[2]: *** [driver_subdirs] Error 2
gmake[2]: Leaving directory `/usr/local/src/mesa/src/mesa'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr/local/src/mesa/src'
make: *** [default] Error 1


Any ideas?

agd5f
07-13-2009, 01:22 PM
You need a newer libdrm-radeon from drm git master.

DF5JT
07-13-2009, 02:05 PM
You need a newer libdrm-radeon from drm git master.

That's what I did, I believe.

root@localhost/usr/local/src> ls
drm/ mesa/ xf86-video-ati/
root@localhost/usr/local/src>

All these have been pulled from git. What is it that I missed? Any configure option I may have left out?

agd5f
07-13-2009, 02:35 PM
you need to configure libdrm with --enable-radeon-experimental-api

DF5JT
07-13-2009, 02:49 PM
you need to configure libdrm with --enable-radeon-experimental-api

Sigh.

CC radeon_dri2.o
radeon_dri2.c: In function ‘radeon_dri2_create_buffer’:
radeon_dri2.c:171: error: ‘struct <anonymous>’ has no member named ‘format’
radeon_dri2.c: In function ‘radeon_dri2_screen_init’:
radeon_dri2.c:312: warning: assignment from incompatible pointer type
radeon_dri2.c:313: warning: assignment from incompatible pointer type
make[2]: *** [radeon_dri2.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Oh well ...

agd5f
07-13-2009, 02:59 PM
Sigh.

CC radeon_dri2.o
radeon_dri2.c: In function ‘radeon_dri2_create_buffer’:
radeon_dri2.c:171: error: ‘struct <anonymous>’ has no member named ‘format’
radeon_dri2.c: In function ‘radeon_dri2_screen_init’:
radeon_dri2.c:312: warning: assignment from incompatible pointer type
radeon_dri2.c:313: warning: assignment from incompatible pointer type
make[2]: *** [radeon_dri2.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Oh well ...

xserver changes. Change all occurrences of DRI2BufferPtr to DRI2Buffer2Ptr in radeon_dri2.c

DF5JT
07-13-2009, 05:32 PM
xserver changes. Change all occurrences of DRI2BufferPtr to DRI2Buffer2Ptr in radeon_dri2.c

Alex, thanks for your expert help.

I have now managed to compile and install these 3 components and most of the stuff axctually works as I had hoped it would. Flicker free google earth, fast glxgears, tear free 720p video and compositing effects from KDE's window effects. Compiz does not work, that is, it's a slideshow with one frame every 5 seconds. Totally and utterly unusable, but I gather this is a compiz thing since KDE compositing works.

Wolfenstein still crashes with a SIG11, but all the rest finally comes together, seems only a matter of time.

Yet, to be quite honest: It really sucks to have one of those radeon cards that are still in hefty development of the OSS drivers and are not supported by fglrx anymore. I love this T60p, particularly its crisp UXGA display, but sometimes I wish I had an NVIDIA card ...

Thanks for all the great work you and many others have done on the driver and infrastructure. Keep up the work, it is really appreciated!

agd5f
07-13-2009, 05:37 PM
Things should work pretty well with the distro provided packages. You only really need the kms stuff for dri2.

DF5JT
07-13-2009, 06:01 PM
Things should work pretty well with the distro provided packages. You only really need the kms stuff for dri2.

Ah, but I want KMS for some other reasons: The 1600x1200 framebuffer console and fast switching between console and X. Plus, when compiz works, I really appreciate smooth video and OpenGL applications without having to change the window manager.

I know, it's the price of living on the bleeding edge; some things breaks, others don't work at all, but still, right now I am quite happy with the set up. None of the standard distributions do actually offer this. Well, maybe Fedora does, but it refuses to install on this notebook, so I am still switching between Ubuntu and Mandriva, definitely preferring the latter one.

nanonyme
07-14-2009, 07:35 AM
None of the standard distributions do actually offer this. Well, maybe Fedora does, but it refuses to install on this notebook, so I am still switching between Ubuntu and Mandriva, definitely preferring the latter one.At least for Ubuntu there's a PPA for this. Dunno about Mandriva.

forum1793
07-14-2009, 09:19 PM
Wolfenstein still crashes with a SIG11,

I think you get this because of the sound.

As root: try

echo 'wolfsp.x86 0 0 direct' > /proc/asound/card0/pcm0p/oss

Then start the game (as user) with :
wolfsp.x86

forum1793
07-14-2009, 10:19 PM
With the git changes to drm-3d and mesa->r6xx-rewrite of today, glxgears no longer locks up, but doesn't really work and gives the following:

IRQ's not enabled, falling back to busy waits: 2 18
142 frames in 5.0 seconds = 28.209 FPS
142 frames in 5.0 seconds = 28.293 FPS


This is substantially slower (90% slower) than mesa with no acceleration, but at least it doesn't lock up.

radeonhd also seems to load dri whereas before it stated:
(II) AIGLX: Screen 0 is not DRI capable

bridgman
07-14-2009, 10:56 PM
That's actually better than agd5f was getting; on his system the number was more like 15 fps. The slowness is from doing the back-buffer to front-buffer copy on the CPU rather than the GPU - without the delay from the copy agd5f was getting more like 1500 fps.

DF5JT
07-15-2009, 05:22 AM
I think you get this because of the sound.


No, I already have a wrapper script to use sdl as sound backend which works in the intro. I am confident the SIG11 is graphics related.

forum1793
07-15-2009, 08:45 PM
No, I already have a wrapper script to use sdl as sound backend which works in the intro. I am confident the SIG11 is graphics related.

The intro used to work for me also but once an actual level was going to start it would kick out with the sig11 error. I always thought it was video but after searching a lot, I came across that sound suggestion. For me this fixed the problem. You could simply try it and see.

agd5f
07-16-2009, 12:48 AM
You could also start the game with gdb and see where the problem is coming from.