tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bus_dma(9) BUS_DMA_COHERENT is a hint (or not)


On Wed, 24 Aug 2011 16:17:58 -0500
Frank Zerangue <> wrote:

> bus_dma(9) specifies that for bus_dmamem_map() the flag BUS_DMA_COHERENT is a 
> hint; and that a device driver must not rely on this flag for correct 
> operation.  All calls to bus_dmamap_sync() must still be made.
> But for frame buffers this seems impractical to me and it appears in 
> practice, that frame buffers that use DMA do indeed depend on this flag and 
> do not call bus_dmamap_sync() functions.  An example of this is 
> arch/arm/xcale/pxa2xo_lcd.c .
> Does anyone have advice on how one should proceed when writing a driver for a 
> new graphics device?

Depends what the driver is for. The one mentioned above is for the built-in 
graphics controller in an XScale SoC where the driver can make assumptions 
about cache coherency and the like. If your driver is supposed to be machine 
independent you can't do that.

have fun

Home | Main Index | Thread Index | Old Index