EXA "nv" vs AGP writes
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Oct 7 00:42:06 PDT 2005
On Fri, 2005-10-07 at 09:33 +0200, Lars Knoll wrote:
> Yes, this very much sounds like writes to AGP are simply not working.
It's still very annoying as this chipset revision is supposed to support
them (at least according to darwin source...). But then, I've been told
often enough by people like Mark Vojkovich that AGP is a pain anyway, it
just doesn't work properly on a whole range of hardware and requires all
sorts of per-host chipset/ video chipset combos workarounds in the
drivers. I'd rather stay away from it as much as possible, at least for
the write-to-AGP case.
> Sounds good. We will need PCI DMA transfers as well for PCIe cards, so it
> would be good to implement it anyways.
Yup.
> If you look into the code in nv_dma.c, NVDmaCreateDMAObject should be able to
> create DMA objects that can control PCI transfers to continous blocks of main
> memory. Scatter/gather can apparently also be done, by changing the DMA
> object.
Yup. We'll need SG unless we want to break up the transfer in lots of
small bits since we can't really expect the kernel to give us any
contiguous physical memory in a reliable way. There seem to be bits &
pieces about SG in rivatv as well, so it should be possible to figure it
out. Also, since it will require kernel help, I see this as a perfect
opportunity to implement interrupts to wait for completion instead of
spinning ;)
> We currently use a linear page table in there. One can change the
> flag to nonlinear, and then you should be ok, if you add a list of physical
> pages afterwards (instead of the one entry for the base address we currently
> have). I have never tested this, but this is my current guess on how it
> works.
Sounds sensible. I'll get it working on radeon first and then might have
a look at nv again, depending on the time I can spare on this.
> If this works, we could probably also move the notifier objects to main
> memory.
Yup.
> It would also be interesting to get some timing measurements to see the speed
> difference between PCI and AGP transfers. PCI transfers should be a bit
> slower, but they have the advantage that can go to cached memory and we can
> probably avoid the second memcpy I currently do when using AGP.
Yes, plus all of the other "issues" with AGP. Also, it would allow us to
have a more common codebase to use with non-AGP cards (old PCI only and
PCIe).
Ben.
More information about the xorg
mailing list