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)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 4 Jun 2019 04:31:12 +0000 (21:31 -0700)
commit39b402e7316706118830dd59a3ebebc4ef999268
treeb35be710cba71138967e452793ae4f2ad52b9620
parent2cf78c3aa388ab82e3d1b56e10b287a2d6a15236
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