gpu: ion: Set the dma_address of the sg list at alloc time
authorRebecca Schultz Zavin <rebecca@android.com>
Thu, 7 Jun 2012 21:51:21 +0000 (14:51 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:49 +0000 (13:40 -0700)
commit891671dde6b0723a52bd8e6e45fe3aff968fb8fc
tree3712c231b31c9e62dc0d5ea153e3d7c567439d4b
parent823dc6c0d427884c45287210ea8c1c3eb05d4af7
gpu: ion: Set the dma_address of the sg list at alloc time

This patch sets the dma_address field of the sglist representing
an allocation at allocation time.  This technically breaks the dma api
which states that these addresses should be set when a particular device
takes ownership of a buffer via the dma_map apis.  In the case of our
systems the only dma address space is physical addresses.  Additionally,
we can not afford the overhead of calling dma_map_sg from this location
as it implies a cache invalidate that is not necessary if the memory
was previously mapped cached.  Instead, the expectation is that memory
being returned from the heaps is ready for dma in that if any cached
mappings of that memory exist they have been invalidated.

Change-Id: Ib3025e80cee52ac0e9d809291e0196a084ea97bd
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
drivers/gpu/ion/ion.c