staging: android: ion: Call dma_map_sg for syncing and mapping [2/2]
authorLaura Abbott <labbott@redhat.com>
Mon, 3 Apr 2017 18:57:48 +0000 (11:57 -0700)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:43:12 +0000 (14:43 +0800)
commit72813bd1cba40da783a038fee7a494b7ec051fd5
tree9c7cb15915e2b3abbf98e0170cc47b558552a7d0
parent260235eeccb7e3c9866fc7a611bd3c6a33228bb0
staging: android: ion: Call dma_map_sg for syncing and mapping [2/2]

PD#SWPL-9254

Problem:
uncached display unexpectly.

Solution:
Technically, calling dma_buf_map_attachment should return a buffer
properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to
ensure this happens. As a side effect, this lets Ion buffers take
advantage of the dma_buf sync ioctls.

Verify:
galilei, franklin

Change-Id: Ib6ca06e59e81031d3c65c2df8824b46baaba6c9f
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion_priv.h