View Full Version : TTM, Radeon KMS Support Goes Into Linux 2.6.31
phoronix
06-17-2009, 06:30 AM
Phoronix: TTM, Radeon KMS Support Goes Into Linux 2.6.31
Last week a pull request went in to bring support in the Linux 2.6.31 kernel for Radeon kernel mode-setting and TTM memory management. This initial work was proposed to enter the Linux kernel as a staging driver and then be setup as a proper Linux kernel driver in the next release, Linux 2.6.32. Linus Torvalds has criticized some of this Radeon kernel mode-setting work since there are some known bugs at this time (though at least it wasn't called untested crap), but nevertheless he went ahead and pulled in this new code prior to Linux 2.6.31-rc1. Cheers! There is now Intel and ATI Radeon kernel mode-setting support within the Linux kernel...
http://www.phoronix.com/vr.php?view=NzMzMA
Louise
06-17-2009, 07:19 AM
I am compiling the 2.6.31 right now, so I can try this on F11 and R500.
The only problem is that the fan on my R500 have a lot of resemblance to this fan
http://www.youtube.com/watch?v=EXEdq3UnnFE
So can anyone tell me, how I force it to the lowest possible power state, so I can unplug the fan?
mendieta
06-17-2009, 08:25 AM
Excellent. BTW, what is a staging driver exactly? What limitation will this status imply in 2.6.31?
Thanks in advance!
yoshi314
06-17-2009, 08:38 AM
Excellent. BTW, what is a staging driver exactly? What limitation will this status imply in 2.6.31?
Thanks in advance!
http://kerneltrap.org/Linux/Introducing_the_Linux_Staging_Tree the link is a bit outdated, but it is still partially true.
staging was originally a separate tree, now it resides in the kernel.
mendieta
06-17-2009, 09:16 AM
http://kerneltrap.org/Linux/Introducing_the_Linux_Staging_Tree the link is a bit outdated, but it is still partially true.
staging was originally a separate tree, now it resides in the kernel.
Thanks, Yoshi. I followed the link. I still don't fully dig it. If this is residing in the kernel, how is it different from other drivers/components? To be specific, if someone want to access the new KMS or TTM in user space, can they just do it? If so, how is this different from being a proper driver/kernel component?
Many thanks!
Xheyther
06-17-2009, 09:16 AM
Albeit it's a great news (I mean really great, pwned Nvidia lovers :p). Will one day the radeonhd and the radeon drivers merged ? I guess that the work would have progressed faster if all the devs worked on the same code...
bridgman
06-17-2009, 10:28 AM
I am compiling the 2.6.31 right now, so I can try this on F11 and R500. The only problem is that the fan on my R500 have a lot of resemblance to this fan;
http://www.youtube.com/watch?v=EXEdq3UnnFE
So can anyone tell me, how I force it to the lowest possible power state, so I can unplug the fan?
Hi Louise;
As far as I know the power state code has not yet been ported into the kernel, although it probably is high on the list after stability issues.
Veerappan
06-17-2009, 10:51 AM
Cool. I'll give it the updated kernel/drivers/mesa a test drive tonight or tomorrow. At least this means that hopefully when Karmic Koala comes out I won't have to run as many (if any) git/beta modules in order to get this all to work. If we're really lucky, Mesa 7.6 will already be out, and all of this will be included by default (hoping for this, but if I have to compile a few things myself, I'll survive).
tettamanti
06-17-2009, 11:15 AM
Thanks, Yoshi. I followed the link. I still don't fully dig it. If this is residing in the kernel, how is it different from other drivers/components?
staging was created to host drivers that are not suitable for inclusion in mainline kernel; the code there is either highly experimental and/or incomplete or just too ugly (as in 'derived from windows driver') to be considered for inclusion among "regular" drivers. Instead of letting the code rot in some obscure repository it was decided to gather it in a public place hoping that someone might clean it up.
To be specific, if someone want to access the new KMS or TTM in user space, can they just do it? If so, how is this different from being a proper driver/kernel component?
In case of radeon KMS/TTM the issue is not the quality of the code, but the userspace interface. The rule is that once an userspace interface has been shipped in a stable kernel it shall be supported indefinitely. In this case the developers feel that the interface might need some further tuning, so it cannot be considered stable yet; at the same time a wider exposure of the code is desired in order to shake out bugs in this fairly large piece of new code. 'staging' seems a good compromise.
HTH ;)
mendieta
06-17-2009, 12:53 PM
In case of radeon KMS/TTM the issue is not the quality of the code, but the userspace interface. The rule is that once an userspace interface has been shipped in a stable kernel it shall be supported indefinitely. In this case the developers feel that the interface might need some further tuning, so it cannot be considered stable yet; at the same time a wider exposure of the code is desired in order to shake out bugs in this fairly large piece of new code. 'staging' seems a good compromise.
HTH ;)
It certainly does, thank you! Basically, the radeon, radeonHD folks or whoever else wants to start using those APIs now and report bugs, suggest improvements, etc, and when the driver goes official they switch to the official API. If things change a lot and they have to rewire a few things they can't go out and knock on Linus' door with a trick or treat face ;)
nanonyme
06-17-2009, 01:50 PM
Albeit it's a great news (I mean really great, pwned Nvidia lovers :p). Will one day the radeonhd and the radeon drivers merged ? I guess that the work would have progressed faster if all the devs worked on the same code...Not really. When you talk of radeon and radeonhd drivers you are talking of one *small* part of the puzzle. All work on libdrm, DRM kernel modules and Mesa gets shared. Optimizing away the radeon/radeonhd and combining them would be unlikely to give any extra resources for developing those other bigger parts of the puzzle. :) After all, much of the differences in the drivers (like modesetting stuff, HDMI audio, TV out and so) seems to be ending in the kernel in a unified solution anyway.
nanonyme
06-17-2009, 01:55 PM
So can anyone tell me, how I force it to the lowest possible power state, so I can unplug the fan?Might be dangerous and burn the card even with maximum powersaving options on. I'd recommend using closed drivers and waiting until open drivers get fan control capabilities if noise is an issue.
Louise
06-17-2009, 01:56 PM
Hi Louise;
As far as I know the power state code has not yet been ported into the kernel, although it probably is high on the list after stability issues.
Hi :)
So I can't just pull xf86-video-ati master, and then use ForceLowPowerMode and DynamicPM with 2.6.31?
MùPùF
06-17-2009, 02:00 PM
It works !!!
Finally, here it is ! I just followed Dave's tutorial and it almost worked immediately.
Just had to revert this : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=27704a16c9e0fb4c6b04344c7c4 c40ac16148ec0
If you Xorg log complains about SAREA something, just revert this commit.
Ok, on the down side now, I'd complain about performances and drm flooding both my Xorg.log and kernel logs.
Xorg.log :
RADEON DRM CS failure - corruptions/glitches may occur -22
bufmgr: last submission : r:0 vs g:33554432 w:0 vs v:108697185
dmesg:
[drm:r300_cs_track_check] *ERROR* [drm] No buffer for color buffer 1 !
[drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
Also, there is some mini tearing on the screen everywhere, may it be moving or not. It is not really beautiful and is also a bit annoying as texts are kind of flickering. Also, there is a backdrop problem when running compiz, for instance, with glxgears, I first see the wheels and half a second later, the black backdrop comes. The problem is the same with every window.
I won't use KMS/DRI2 now, this is not ready and I understand the choice to put KMS in the stagging branch. I'll try to follow this as it improves.
Well done everyone !
Louise
06-17-2009, 02:03 PM
Might be dangerous and burn the card even with maximum powersaving options on. I'd recommend using closed drivers and waiting until open drivers get fan control capabilities if noise is an issue.
My primary GPU is the onboard 780G (3200 HD), and the R500 PCI-E card is just a card I bought very cheap so I just play with the open source 3D.
So I "just" the card dies, it wouldn't be the end of the world, but if it catches fire, or damages the mainboard, I might look at it differently :)
DeepDayze
06-17-2009, 09:50 PM
Thanks, Yoshi. I followed the link. I still don't fully dig it. If this is residing in the kernel, how is it different from other drivers/components? To be specific, if someone want to access the new KMS or TTM in user space, can they just do it? If so, how is this different from being a proper driver/kernel component?
Many thanks!
Think you will need to enable the development/experimental driver config option when configuring the kernel.
yoshi314
06-18-2009, 04:52 AM
Think you will need to enable the development/experimental driver config option when configuring the kernel.
yes, this is pretty much successor to the experimental drivers, that were available in the kernels some releases ago. experimental however, didn't really work out - quite a lot of features were left in experimental for too long and its meaning diminished over time.
user accepting to use staging drivers must be prepared for missing features, crashes and random operation.
staging is sort of a testbed for new drivers, and new technologies inside the kernel. it can also contain the code that does not yet meet kernel quality standards (e.g. in case of drm/ttm pull there are reports of possible security holes in the current code).
if somebody wants to take them for a spin, they just need to change few variables in kernel config and rebuild it. this removes the need to throw multiple patches from different sources against the kernel just take some new drivers for a spin.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.