Re: problem: reading from (rivafb) framebuffer is really slow

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 18 May 2001 08:46:38 +0100 (BST)


> When benchmarking DirectFB, I found that a typical software alpha
> blending rectangle fill is completely dominated (I'm talking 90% of the
> CPU cycles here) by the time it takes to read pixels from the
> framebuffer.

I would expect that. Guess why X11 is designed not to do this.

> The pixels are read linearly in chunks of aligned 32-bit words. It's a
> Geforce 2 GTS in 1024x768 with 32-bit color depth using rivafb. This
> looks quite crass to me. Any ideas? Maybe rivafb does not initialize
> AGP and the card is in PCI mode or something?

Writes across the PCI bus are posted, and potentially merged. Read posting is
rather harder to do. This is one reason to keep copies of data or to use
DMA or textures from AGP space to speed up access to the data you need.

In general pci write = fast, pci read = slow. High performance subsystems
you write to their pci memory they DMA back to your main memory.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/