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)

My frame buffer will be specific to my hardware and need not be portable. I 
wanted to make sure I was not missing something.

Thank you Eduardo and Michael. 

On Aug 24, 2011, at 5:45 PM, Michael wrote:

> Hello,
> 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
> Michael

Frank Zerangue

Home | Main Index | Thread Index | Old Index