drm/rockchip: gem: partial sync use sg_phys instead of sg_dma_address

The sg_phys() always return the physical address of a scattergather, but
the sg_dma_address() return the iova address, for a device without iommu
that is a bad address.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I83641c6af324bbaca3d27ea14de41cfca729e258
This commit is contained in:
Jianqun Xu
2022-07-22 15:43:46 +08:00
committed by Tao Huang
parent e9753da75a
commit b8105eeb84

View File

@@ -1005,7 +1005,7 @@ static int rockchip_gem_prime_sgl_sync_range(struct device *dev,
if (len <= offset)
continue;
sg_dma_addr = sg_dma_address(sg);
sg_dma_addr = sg_phys(sg);
sg_left = len - offset;
sg_offset = sg->length - sg_left;