Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
radeon r600/r700 speed patches for libdrm, mesa, and radeon
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ConnClark
n00b
n00b


Joined: 15 Aug 2007
Posts: 57

PostPosted: Thu Mar 18, 2010 12:22 am    Post subject: radeon r600/r700 speed patches for libdrm, mesa, and radeon Reply with quote

I wrote some patches to improve performance. You'll need to apply them to the git master of each project as of March 17 2010.


http://filebin.ca/kxvvzh/libdrm_radeon_cs_h.patch
http://filebin.ca/cuxmeu/mesa_patch_Mar_17_2010.patch
http://filebin.ca/bcpfto/radeon_Mar_17_2010.patch

or if you would like to view them first

libdrm_radeon_cs_h.patch http://pastebin.ca/1844125
mesa_patch_Mar_17_2010.patch http://pastebin.ca/1844133
radeon_Mar_17_2010.patch http://pastebin.ca/1844139



these instructions should work for most gentoo users but you have to set your own optimization flags (for absolute performance remove debugging)

Instructions

"mkdir experimental"
"cd experimental"
"git clone git://anongit.freedesktop.org/mesa/drm"
"cd drm"

copy the file libdrm_radeon_cs_h.patch to this directory

"patch -p1 <libdrm_radeon_cs_h.patch"
"./autogen.sh --prefix=/usr --exec-prefix=/ --disable-intel"
"make -j3"
"sudo make install"

"cd .."
"git clone git://anongit.freedesktop.org/git/mesa/mesa"
"cd mesa"

copy the file mesa_patch_Mar_17_2010.patch to this directory
"patch -p1 <mesa_patch_Mar_17_2010.patch"
"DRI_DRIVERS="r600,swrast""
"./autogen.sh --prefix=/usr --with-dri-drivers=$DRI_DRIVERS --disable-gallium"
"make -j3"
"sudo make install"

"cd .."
"git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati"
"cd xf86-video-ati"

copy the file radeon_Mar_17_2010.patch to this directory

"patch -p1 <radeon_Mar_17_2010.patch"
"./autogen --prefix=/usr"
"make -j3"
"make install"
_________________
In formal computer science advances are made by standing on the shoulders of giants. Linux has shown that, if there are enough of you, you can advance just as far by stepping on each others toes.
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Thu Mar 18, 2010 12:54 am    Post subject: Reply with quote

What sort of performance improvements are you observing?

It seems like you're passing many arguments in batches instead of calling the same function over and over. Is the win really that large?
Back to top
View user's profile Send private message
ConnClark
n00b
n00b


Joined: 15 Aug 2007
Posts: 57

PostPosted: Thu Mar 18, 2010 3:36 am    Post subject: Reply with quote

By grouping 3 separate calls into one I cut the execution time in half of what the original code took.

I end up with about a 5 to 10% improvement in minimum FPS in Torcs.
_________________
In formal computer science advances are made by standing on the shoulders of giants. Linux has shown that, if there are enough of you, you can advance just as far by stepping on each others toes.
Back to top
View user's profile Send private message
Torangan
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 165

PostPosted: Thu Mar 18, 2010 1:54 pm    Post subject: Reply with quote

You could also link to the upstream bug with your patches, that way one can see easily whether they're accepted or not.
Back to top
View user's profile Send private message
ConnClark
n00b
n00b


Joined: 15 Aug 2007
Posts: 57

PostPosted: Thu Mar 18, 2010 3:32 pm    Post subject: Reply with quote

There is no upstream bug, these patches will not be accepted because it makes the code harder to maintain
_________________
In formal computer science advances are made by standing on the shoulders of giants. Linux has shown that, if there are enough of you, you can advance just as far by stepping on each others toes.
Back to top
View user's profile Send private message
ConnClark
n00b
n00b


Joined: 15 Aug 2007
Posts: 57

PostPosted: Thu Mar 18, 2010 8:45 pm    Post subject: Reply with quote

Bug fix!!

special thanks to Edwin Torok for find the bug.

use this file instead of radeon_March_17_2010.patch

http://filebin.ca/vdccdb/radeon_March_18_2010.patch

or

at paste bin

radeon_March_18_2010.patch http://pastebin.ca/1844986
_________________
In formal computer science advances are made by standing on the shoulders of giants. Linux has shown that, if there are enough of you, you can advance just as far by stepping on each others toes.
Back to top
View user's profile Send private message
ConnClark
n00b
n00b


Joined: 15 Aug 2007
Posts: 57

PostPosted: Tue Mar 23, 2010 10:23 pm    Post subject: Reply with quote

New patches with bug fixes and speed improvements as well as revised build instructions


http://filebin.ca/okrgjw/libdrm_patch_Mar_23_2010.patch
http://pastebin.ca/1850831

http://filebin.ca/asbwvk/mesa_patch_Mar_23_2010.patch
http://pastebin.ca/1850834


http://filebin.ca/sbtdp/radeon_Mar_23_2010.patch
http://pastebin.ca/1850835

Instructions

"mkdir experimental"
"cd experimental"
"git clone git://anongit.freedesktop.org/mesa/drm"
"cd drm"

copy the file libdrm_patch_Mar_23_2010.patch to this directory

"patch -p1 <libdrm_patch_Mar_23_2010.patch"
"./autogen.sh --prefix=/usr --disable-intel"
"make -j3"
"sudo make install"

"cd .."
"git clone git://anongit.freedesktop.org/git/mesa/mesa"
"cd mesa"

copy the file mesa_patch_Mar_23_2010.patch to this directory
"patch -p1 <mesa_patch_Mar_23_2010.patch"
"DRI_DRIVERS="r600,swrast""
"./autogen.sh --prefix=/usr --with-dri-drivers=$DRI_DRIVERS --disable-gallium"
"make -j3"
"sudo make install"

"cd .."
"git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati"
"cd xf86-video-ati"

copy the file radeon_Mar_23_2010.patch to this directory

"patch -p1 <radeon_Mar_23_2010.patch"
"./autogen --prefix=/usr"
"make -j3"
"make install"
_________________
In formal computer science advances are made by standing on the shoulders of giants. Linux has shown that, if there are enough of you, you can advance just as far by stepping on each others toes.
Back to top
View user's profile Send private message
ConnClark
n00b
n00b


Joined: 15 Aug 2007
Posts: 57

PostPosted: Tue Mar 23, 2010 11:06 pm    Post subject: Reply with quote

it looks like there were some commits to the radeon driver that break my patch. you'll need to grab a git from just before 2010-03-22 22:05:36 (GMT)
_________________
In formal computer science advances are made by standing on the shoulders of giants. Linux has shown that, if there are enough of you, you can advance just as far by stepping on each others toes.
Back to top
View user's profile Send private message
gregool
Guru
Guru


Joined: 26 Nov 2007
Posts: 336
Location: Lille

PostPosted: Wed Mar 24, 2010 5:38 pm    Post subject: Reply with quote

you got me curious with that patch, before i give it a try, does it fix the tearing issue with video playback?
Back to top
View user's profile Send private message
darkbasic
Tux's lil' helper
Tux's lil' helper


Joined: 06 Sep 2006
Posts: 133

PostPosted: Wed Mar 24, 2010 9:48 pm    Post subject: Reply with quote

Do you have tearing with KMS? 8O
_________________
Computers are like air conditioners:
they stop working properly when you open Windows...

Coltiva Linux, Windows si pianta da solo.


http://www.linuxsystems.it/
Back to top
View user's profile Send private message
ConnClark
n00b
n00b


Joined: 15 Aug 2007
Posts: 57

PostPosted: Thu Mar 25, 2010 12:59 am    Post subject: Reply with quote

gregool,

It may not entirely eliminate tearing during video playback but it should help reduce it some. The patches will reduce the amount of time the CPU spends on executing the driver code which should free it up for video decoding.

I have confirmations it works on rv610, rv670, and rv730 chips so far.

Just remember you need a git image of xf86-video-ati before 2010-03-22 22:05:36 (GMT) for the 2D radeon driver to work.

I'm still porting my patches to work with the latest commits.
_________________
In formal computer science advances are made by standing on the shoulders of giants. Linux has shown that, if there are enough of you, you can advance just as far by stepping on each others toes.
Back to top
View user's profile Send private message
gregool
Guru
Guru


Joined: 26 Nov 2007
Posts: 336
Location: Lille

PostPosted: Fri Mar 26, 2010 2:12 pm    Post subject: Reply with quote

thanks for the answer, i'll give it a try and let you know.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum