[haiku-development] Re: AGP changes broke NVidia display.

  • From: Bruno Albuquerque <bga@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 02 Feb 2008 11:49:58 -0200

Axel Dörfler escreveu:
First of all, this is a very old configuration (Dual PIII 933 + NVidia GEForce 2 Ti). The motherboard reports AGP 4x support and so does the video card, but I had to force AGP to 2x with the AGP config file or the machine would hang with this configuration. I also had to disable DMA acc in the nvidia.settings file.

The new AGP bus manager does not support a settings file at all at this point; I'm no friend of settings files for kernel drivers if they aren't strictly necessary (and they usually aren't).

Well, the usual solution to settings file is to make the driver aware of all probblems in chipsets and disable features or enable workarounds when needed. As we probably don't have enough hardware to test every possible combination, settings files are a good workaround.

But since it does not hang as before, I guess there might have been a bug in the old AGP bus manager that caused this hang? Does it report AGP 2x or 4x for you now?

Correction, now it started to hang (the drawing engine hangs and do not come back anymore). Sometimes it hangs but come bacl after 5 or 6 seconds.

I tried to figure out if it was using AGP 4X or 2X but funny enough there was no debug output whatsoever from the nvidia driver or agp_gart driver to the syslog. Looking at the code it seems you are matching chipset and graphics card capabilities and, in this case, it would enable AGP 4X (as both report it).

With the new AGP_GART, what hapoens is this:

1 - Haiku boots and the display looks normal. I get the Terminal, icons, the Deskbar and mouse pointer. 2 - After some seconds when I start to move the mouse, the mouse lives a trail of random white dots. 3 - If I do something that would display more stuff in the screen, like clicking the Haiku Menu, the menu also appears completelly garbled and the drawing engine obvious reset itself (all redrawing activies stopo for up to 6 seonds) and them it restarts. 4 - When this happen, I still get dirty on the screen and any windows displayed appears hollow (as if the background was not draw, only the borders of each widget) which is *EXACTLY* the problem I had if I had left DMA acc enabled.

If in nvidia.settings I forcely disable AGP, I have no problems )other than not having AGP enabled, that is). Any ideas?

You could try to disable fast-writes and see if that helps. To do that, just remove the AGP_FAST_WRITE bit in the set_agp_mode() function call in the nVidia driver.

With the old AGP bus manager the problem was exactly that AGP 4X + fastwrites would not work. If I remember correctly AGP 4X without fastwrite works. I will try your suggestion and let you know how it goes.

What you see is probably that everything in the command ring buffers is not executed which sounds very much like an acceleration problem. But that might be caused by the AGP mode as well, I guess :-)

Eventually, the nVidia driver does not make sure the buffers have been flushed in the command ring buffer before letting the device execute them. Are you sure your device does not use the DMA mode?

I have dma_acc set to false in the nevidia settings file. So I guess it is not enabled. Funny enough, DMA works if AGP is disabled but the graphics operations seem to be slower than using PIO mode.


Other related posts: