The irregular Nouveau-Development companion
Issue for March, 7th
1. Intro
Hello again to our TiNDC. Just to make sure, that the "i" in the name is really for "irregular", this issue comes somewhat late. Reason is simple : We had FOSDEM in Brussels on February 23/24. As Marcheu did a presentation there and a few of our project members were there too, I did delay this issue on purpose to get some feedback.
Meanwhile, part 1 and part 2 of our "Status of Nouveau" article is available at lwn.net.
You know, what I call sabotage ? I think sabotage is when the IRC is absolutely silent, I finish up the (then) current issue and send it out for publication and within hours both Marcheu and Darktama start pushing their Gallium changes into mainline (Gallium branch). So just that you know guys : I am officially miffed
2. The Current status
So work on 3D started in earnest. Marcheu already told me before that he was going to start Gallium work for NV3x cards before FOSDEM and would try to finish as much as possible, so that he could hand over the responsibility to other projects members for 3D on NV3x along with fitting cards.
Within a few days, he stayed true to his word and started pushing his work. At the weekend of FOSDEM pmdata picked up where marcheu left and pushed his first two patches.
So, a bit neglected because I missed it a few times in the logs: Marcheu has been working on a solution for using Gallium on older 3D cards. He will be talking about that a bit more detailed in our FOSDEM section a bit further down. He pushed (as noted above) his changes already into the Gallium branch.
- ahuillet, pmdata working on NV30 (ahuillet will start at the end of the month)
p0g intending to work on NV1x once marcheu is finished (p0g: of course if marcheu doesn't finish it in a year or so I might plug my nv30 or nv40 and work on that
- Marcheu working on a Gallium driver for NV1x
- Darktama working on NV4x and to some degree on NV5x
- Stillunknown and Malc0 working on mode setting (Randr1.2)
With that said, you should note that our current DRI driver (linked from the Wiki front page) is deprecated and no longer supported !
So I just wanted to mention this to avoid further accusations that I'm missing important topics
Finally, the problem with Upload To Screen / Download From Screen functions for PPC was fixed. Using PCIgart in all cases will now work.
As already hinted at in the last issue, there were problems with the performance of the bi cubic texture adapter on some cards. So after some talk with marcheu, stillunknown started to implement a second adapter:
- bi linear (default)
- bi cubic (selectable).
Another topic over the last few issues is MMioTrace and its inclusion into the mainstream kernel. On LKML it was suggested to move it to a new framework in the kernel: "ftrace". It is mainly developed by Ingo Molnar and Steven Rostedt but I don't know of any web page giving more details. Only thing is a readme here: http://people.redhat.com/mingo/sched-devel.git/README
Ftrace offers all kind of kernel tracing facilities and allows other modules to plug into it, build on it and offer additional features. MMioTrace is going to be one of its first users. Currently the kernel guys and pq (for MMioTrace only) are aiming for kernel 2.6.26.
The discussion of the current version of MMioTrace on LKML can be found here: http://marc.info/?l=linux-kernel&m=120387271214433&w=2
Ok, now for the usual assortment of short topics:
benkai is spending some time on trying to get Suspend / resume for Nouveau working. Currently he is in a "trial and error" phase and not sure whether he can succeed. He summarizes his findings here: http://nouveau.freedesktop.org/wiki/Suspend_support
- After Marcheu finished his initial work on NV30 and he started working on NV1x Gallium. After finishing a basic driver for that card (e.g. missing texturing) he wants to buy an NV5x card and get going there (Editor: Yay!).
- Malc0 tried to fix some PPC related Randr1.2 problems. Kelnos tried his fixed and reported good results. Only remaining problem was Nouveau thought Kelnos would have a dual_link LVDS. When disabling that configuration bit, Nouveau worked fine even with text mode. Additional help came from sbriglie and moondrake which led to additional hints about the failure and fix.
Nouveau get build via the tinderbox service from freedesktop. Current status: Green. http://tinderbox.freedesktop.org/
- Marcheu went through the heap of cards he owns and tested them for Randr1.2 compliance. He found a few bugs with with NV4, NV11 and NV20 (Bug numbers #14820 to 14825) of which at least one was fixed within a few hours after Marcheu creating the reports.
So Randr1.2 is working on most configurations and NVidia hardware now, with only a few issues on NV11 and NV17 left. In fact it is working so good that Marcheu is pushing Malc0 and Stillunknown to make the Randr1.2 code default for Nouveau.
Current planning is about one month or sooner to switch the default setting, an additional month for backup reasons until the old code gets removed. A short while after that we may start moving our modesetting code into the kernel. However that would mean that we would need then current DRM to support that plus TTM which is a requirement for modesetting too.
3. Help needed
As always: Look on our TestersWanted page. And as we want to ramp up NV5x based development: Please contact us, if you have hardware available and would be willing to donate (any kind of 8x00 card and / or PCIe motherboards). Please do test Randr1.2 before we make it default!
In case you need help with Nouveau, please consider mailing to our mailing list or opening an entry in Bugzilla. It is unlikely to get support on the IRC channel which is reserved for development talk.
4. Special: FOSDEM 2008
Ok, on the last weekend of February there was FOSDEM at Brussels. Unfortunately, I wasn't able to attend but we have some links for you about Marcheu's talk: Videos are here: http://radeonhd.org/?page=fosdem_videos or ftp://ftp.suse.de/private/bk/fosdem-2008/ 2 is the lowest, 4 the best encoding used. The slides of Marcheu's talk can be found here : http://icps.u-strasbg.fr/~marchesin/nvdri/fosdem2008.pdf
But that's not all, let's start pestering Marcheu and the others with questions how the event went from their point of view.
TiNDC:
- How was the interest in the talk and how was it received?
Marcheu
- I think the talk was well received. We had a fair number of people attending, and they agreed that eating fruit was good for one's health. Eating fruit and going to the sauna in the X.Org devroom are two activities that keep people fit!
TiNDC:
In your talk you presented a Gallium3D solution for older, shaderless cards. Could you elaborate a bit on that as I totally missed any reference to that topic in the logs. Thus there was no mentioning of it in the TiNDC until yet.
Marcheu
- It's just a bit of plumbery to handle fixed function cards through the gallium infrastructure. There is more to gallium that just the programmable pipeline stuff, so I think it's worth reusing the framework even in the context of fixed pipeline cards. I had given it a first try some months ago, but wrote the gallium part first, which was a mistake. I realized a bit late that it doesn't make sense to do such changes out of nowhere, you have to test those on a driver. I'm now approaching the problem from the other side, by doing a simple gallium nv10 driver first (without textures for example).
TiNDC:
- How does it work? How do you support shaders on cards which have none?
Marcheu
- For the programmable pipeline, the state tracker emits shader instructions which implement fixed OpenGL state. For fixed pipeline, the state tracker translates the same OpenGL state into new instructions, which are fixed-functions shaders. These instructions represent the fixed pipeline functionality, and are stored just like other shaders, and therefore the internals of gallium do not need to change. Only the frontend and backends of gallium need to be adapted to handle the additional instructions. This is the most straightforward way of achieving this.
TiNDC:
- So who is working on what now? Which task will be tackled next?
Marcheu
- I really want nv10 and nv30 gallium both going, so I'll be working on that where my help is needed. After that I'll go for an nv50 as you said.
TiNDC:
- Now, the Xorg room at FOSDEM isn't only about Nouveau, it's a place were Xorg hackers meet too. So anything interesting coming out of the talks you had with other Xorg projects?
Marcheu
- Yeah, the most interesting thing is learning from other's experiments (things like what software architectures work or don't, what solutions are fast or slow...). It can save you a heap of time. I'm not interested in trying every possible solution, since that requires implementing many prototypes which are a waste of time (for example with the TTM or swap buffers implementations). I also exchanged ideas with Michael Meeuwisse (the OpenVGA guy) about how we could have shaders compiled as FPGA in real time. That would surely allow very fast shader execution, and dynamically allocating as many gates as possible to whatever is the current use for the card. I think that's one way the Open{VGA,Graphics} cards can have an edge over existing graphics solutions.
TiNDC:
- Rumors have it that you were not the only Nouveau developer at FOSDEM. So what did you discuss?
Marcheu
- Food, beer, and vegetarianism (malc0 and ahuillet are respectively vegetarian and half-vegetarian :). More importantly, I could meet ahuillet, benkai, malc0 and p0g in person, which is very nice (and I hope they think the same about me ;-). Even though we do regular development on the same piece of code, we had never met. The nice thing about those events is we can meet in person and discuss non-technical stuff. When it comes to conferences, I don't think the technical side is the most prevalent, since it can also happen online before or after the event. But the social side can only happen when you meet in person.
TiNDC:
- Since around December we have been talking about releasing a "2D only" driver as version 1.0. Did you come to a consensus here?
Marcheu There is a consensus, that we have to stabilize the interfaces before. I think Randr1.2 by default and moving modesetting into the kernel is going to happen quickly now. TTM might take a little more time, depending on how we implement it.
TiNDC:
- Phoronix was there too, did you meet Mr. Larabel?
Marcheu
- Yup, although we didn't have much time to go into much discussions sadly. This year, FOSDEM gathered a lot of very nice X.Org people, so discussions couldn't go into much detail with all of them. I hope I'll be able to attend XDC, so that we can meet again.
TiNDC:
- A propos Phoronix: How was the donated hardware distributed?
Marcheu
It was not only phoronix's hardware, but also donations from individuals. Although my usual travel stuff (laptop + clothes + toothbrush) did fit in my backpack, there was just too much hardware, and I ended up taking a travel bag for the hardware only. Thanks a lot to all donators! FWIW, malc0 got an nv4, nv11, nv20, nv40. ahuillet got an nv30gl. I didn't know p0g was coming until I was in Brussels (he took us somehow by surprise), so I didn't have the occasion to bring anything for him specifically. I still have one motherboard+CPU and one CPU left (from phoronix), I'll probably split those between pmdata and ahuillet, but pmdata still needs to make his mind about that. Or maybe we could run a game between them where the first one to get gears going gets the stuff
TiNDC:
- So you lucky ones, come forward and tell us what you are doing with this donation. What kind of Nouveau work do you intend to tackle now?
ahuillet:
- The NV30GL I got is the most powerful graphics card I've ever touched. No kidding, I was previously stuck at NV28. I will use it to understand shader-based cards - which for now are pure theory to me - by doing 3D work. I hope to start it in April. (Editor: Malc0's answer is a bit further down)
TiNDC:
- Giving "State of Nouveau" talks at FOSDEM seems to be a good tradition now, with talks since the inception of the project. Will you keep that tradition next year? Or you others: Do you intend to come again?
Marcheu
At FOSDEM 2006, there was just 1 nouveau developer (me). It was the first announcement, so you couldn't expect more. At FOSDEM 2007, two developers were there (Koala and me). FOSDEM 2008 saw the venue of 4 devs (ahuillet, malc0, p0g and me) so I guess we can only go exponential from there. That would be a nice tradition, how about FOSDEM 2009 with 8 Nouveau devs I really hope to come again to FOSDEM next year. FOSDEM sees 4000 visitors each year, so the audience is wider than XDC/XDS which only gather X.Org developers. That is surely a good way to reach a larger crowd.
Malc0
- Too early to say for sure, but I'd like to, certainly.
Additionally, Malc0 agreed to answer a few more questions about the current status of Randr1.2:
TiNDC:
- Hello, you got a bunch of hardware from Marcheu donated by Phoronix and donors, what are you trying to do with it? Which problems do you want to solve?
Malc0:
Basically I got it so I could easily test my code on a wider range of cards (for cold booting, kernel modesetting, suspend/resume). Ahuillet gave me an nv11 that I thought did not work under Randr1.2, and I was going to fix, but it seems to work fine
TiNDC:
So, how good do you think is Nouveau randr1.2 as of now? Marcheu wants to drop the old code, it seems And if I understood correctly, either we or DRM in general will get kernel mode setting within the next 2-3 months?
Malc0:
Randr1.2 is fairly good now. There's a couple of bugs on nv11/nv17 I'm working on (obviously we can't remove the old code before single-head works for everyone). A month after making Randr1.2 default does After a few months kernel modesetting should not be too hard; it matches the Randr1.2 structure very closely I'm waiting for the intel guys to sort out the problems with a kernel modesetting DDX though And of course, we'll need TTM...
TiNDC:
- Yes, as far as I understood darktama, Nouveau [on NV4x] will sooner or later crap out due to out-of-memory problems like leakage and simplistic "memory management"...
Malc0:
- There's that, and that the kernel modesetting infrastructure seems to assume you are using the TTM API Maybe there's a way round it that darktama / marcheu could find, but really I think the benefits of moving of having a proper memory manager would make such an effort short sighted. (Editor: This is undisputed by marcheu and darktama)
TiNDC:
- Anything interesting about FOSDEM you'd like me to write?
Malc0:
Not really. Some of the X.org talks were very interesting (but rather hot), and the beer and socializing was great, but I leave that up to you whether you want that in a TiNDC
Editor: In case you are wondering about references to "sauna" and "hot", the X.org was warm like an oven
So let's go and see some pictures:
p0g (left) and malc0 (right)found yet another BIOS bug?
ahuillet (left) and marcheu (right) during the talk
"Oh wow, NV4x really works - unbelievable". Marcheu presenting OpenArena on Nouveau (Marcheu: "Hey, this is all daniels fault for making jokes about glxgears )"
The pictures were taken by ahuillet, bbartek and Michael Larabel. Thanks a lot. And thanks to Marcheu, Malc0 and ahuillet for answering my questions.