Nouveau Companion 28

Published on October 12, 2007
Written by KoalaBR
Page 2 of 3
Discuss This Article

The Current Status

Back to our core project where we saw quite some progress too. Currently we are aiming for a working 2D driver (including EXA) for all models from NV04 to NV4x. Unfortunately NV5x is a different beast and may take more time. Still, until 05.10.2007 our master branch didn't work at all on NV5x / G8x but after some tests and bisecting done by KoalaBR, stillunknown found and fixed an error leading to a working 2D. Annoyingly, switching back to text mode leaves the display dead which makes testing the driver in case of errors hard.

On NV04 ahuillet fought an uphill battle to get X working. His first tries were met with ignorance from the card; the card simply didn't react at all. Just when ahuillet wanted to give up, matc showed him that he had made some faulty assumptions. Adding to that was a hardware problem with the mainboard, which resulted in random hardware init failures with both a NV04 and a NV11.

So ahuillet scrapped his code, restarted tried and finally got progress:

His software methods were called by the card, invalid commands generated the expected error interrupts. Next thing is the implementation of a few software methods. Software methods are commands that, when sent to the card, make the card ask the DRM to handle them. NV04 implements a few initialization related methods in software, maybe as a result of some design decision. Those methods merely set a flag in object instances, and are therefore not hard to write. When software methods need to be handled, the card generates a specific interrupt.

He got his code in his private git repository and expects it to be pushed to the master repository "soon" (next days). First, ahuillet needs to resolve one last issue, though X started but is slow as molasses as the card generates an interrupt storm of STATE_INVALID. It may have something to do with how we handle interrupts (there was a small change by ahuillet and darktama) but more like it is something else (maybe the state needs to be acknowledged). Investigation is proceeding. And before we forget: Overlay on NV04 works too.

pmdata tried to kill the rendering problems with glxgears with non default sized windows. Due to other work he had to stall that effort for now.

pq was trying to get NV20-demo working. He used MMio to get a trace and began analyzing it. To ease his debugging pains he started writing a mmio-trace replayer. This tool take a MMioTrace dump and replays it line by line. So you can see what register writes have what kind of effect. That and some trial and error reduced the log size from 60MB down to 4500 lines. That was no small feat because every replay of the traces needed a reboot. But as the card state survives even a cold boot for power offs shorter than 30 seconds, that endeavor took quite some time. In the end Marcheu remembered the reason while the problem occurred: There was no PGRAPH context init in the DRM at all, no one had written one yet.

After some testing he got initialization working and rendering of triangles too (within NV20_demo). Next step was getting glxgears working. As a quick hack, pq patched MESA to think that his NV28 was an NV1x card, which worked within the same limits as NV1x (more about that above and in the previous issue). The patch was never committed though as it is a hack and needs proper implementation in the driver.

However, init means correct per context init and that in turn needed larger structural changes in the DRM, breakage for all NV2x cards except NV28/NV25 was the result. At that time malc0_ offered his patch set to clean up init for NV2x quite a bit. This got all NV2x cards working again. Another result of all patches combined is that NV2x cards do context switching automatically and don't need manual interception anymore. You can find more info about NV2x context init here.

Work on NV20 proved to be difficult as pq always got a DMA queue hang very early in the X startup process.

When discussing his problems with marcheu, pq was asked to force notifiers not to be stored in AGP memory but in the memory of the card. That worked and proved that pq has some AGP problems: Notifiers placed in that memory region don't work (that is true for certain motherboards). (For an explanation of notifiers please refer to the last two TiNDCs).

Marcheu and JKolb did work hard to get NV3x working. First they tried to get NV30_demo working (that is rendering colored, bare and textured triangles). That proved difficult due to some init errors. After copying the init code 1:1 from nouveau it worked somewhat but crashed only after a few FIFO commands executed with INVALID_COMMAND.

Latest Hardware Reviews
  1. Intel Haswell HD Graphics 4600 vs. AMD Radeon Graphics On Linux
  2. Intel Haswell HD Graphics 4600 Performance On Ubuntu Linux
  3. Intel Core i7 4770K "Haswell" Benchmarks On Ubuntu Linux
  4. The First Experience Of Intel Haswell On Linux
Latest Software Articles
  1. Optimized Binaries Provide Great Benefits For Intel Haswell
  2. 11-Way Linux, BSD Platform Comparison
  3. SNA Acceleration Works Great For Intel Core i7 Haswell
  4. The Linux Evolution For Intel Haswell's Performance
Latest Linux News
  1. Mir's GPLv3 License Is Now Raising Concerns
  2. NVIDIA Driver Soon Likely To Support EGL, Mir
  3. OpenMandriva Goes Into Alpha Form, Russian-Based
  4. NVIDIA Brings Their Linux Driver To ARM
  5. D Language Still Showing Promise, Advancements
  6. Planetary Annihilation Released For Linux Gamers
  7. Gentoo Starts Work On KDE-Wayland Support
  8. NVIDIA To License Its Kepler GPU Technology
  9. KDE's KWin Made Lots Of Progress In 4.11
  10. Ubuntu Announces Carrier Advisory Group
  11. Qt 5.1 Release Candidate 1 Has Arrived
Latest Forum Talk
  1. D Language Still Showing Promise, Advancements
  2. PulseAudio 4.0 Brings Many Changes
  3. Intel GPU Driver Tries To Rip Out FBDEV Support
  4. Mir's GPLv3 License Is Now Raising Concerns
  5. In-Fighting Continues Over Mir On Non-Unity Ubuntu
  6. VP9 Codec Now Enabled By Default In Chrome
  1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Motherboards
  5. Peripherals
  6. Processors
  7. Software
  8. Operating Systems
  9. All Articles
  1. Linux Benchmarking
  2. OpenBenchmarking.org
  3. Phoronix Test Suite