MLK-17701 swiotlb-xen: implement xen_swiotlb_get_sgtable callback
authorAndrii Anisov <andrii_anisov@epam.com>
Tue, 7 Feb 2017 17:58:03 +0000 (19:58 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:56:15 +0000 (14:56 -0500)
commitf6778aa1ecd161c085e677c8187563457e471e13
tree54bae49fa6ea4d89c9ea6c189e794cfe00f988f9
parent1b441a1b2fac9fd7c5f7cf6fd2c995e973e01a4f
MLK-17701 swiotlb-xen: implement xen_swiotlb_get_sgtable callback

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
(cherry picked from commit 69369f52d28a34c84acb6f2a8a585e743441566a)

on 8QM A0, video play use ion to allocate buffer and mmap buffer,
there is a call dma_get_sgtable, but xen arm not implement that.
when playing video, GPU driver will use sg dma address, but because
of xen_swiotlb_get_sgtable not implemented, sg->amd_address is not
exactly the address that ion allocated. This patch fixes the issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Leonard Crestez <leonard.crestez@nxp.com>
arch/arm/xen/mm.c
drivers/xen/swiotlb-xen.c
include/xen/swiotlb-xen.h