[PATCH 2/2] drm/amdgpu: fix scatter-gather mapping with user pages

2020-03-24 Thread Shane Francis
Calls to dma_map_sg may return segments / entries than requested if they fall on page bounderies. The old implementation did not support this use case. Signed-off-by: Shane Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

Re: [PATCH 2/2] drm/amdgpu: fix scatter-gather mapping with user pages

2020-03-23 Thread Shane Francis
> I think the other call to drm_prime_sg_to_page_addr_arrays in amdgpu > needs a similar fix. > > Alex Looking at the other call in amdgpu tmm it does not seem to undergo the segment remapping that happens in dma_map_sg, so should be safe. I will port the changes to drm/radeon as that seems to

Re: [PATCH 2/2] drm/amdgpu: fix scatter-gather mapping with user pages

2020-03-23 Thread Alex Deucher
On Mon, Mar 23, 2020 at 4:52 PM Shane Francis wrote: > > Calls to dma_map_sg may return segments / entries than requested > if they fall on page bounderies. The old implementation did not > support this use case. > > Signed-off-by: Shane Francis Fixes: be62dbf554c5 ("iommu/amd: Convert AMD

[PATCH 2/2] drm/amdgpu: fix scatter-gather mapping with user pages

2020-03-23 Thread Shane Francis
Calls to dma_map_sg may return segments / entries than requested if they fall on page bounderies. The old implementation did not support this use case. Signed-off-by: Shane Francis --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff