Re: [RFC 02/17] drm: amdgpu: fix sg_table nents vs. orig_nents misuse

2020-04-28 Thread Christian König
Am 28.04.20 um 15:19 schrieb Marek Szyprowski: The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the numer of the created entries in the DMA address space. However the subsequent calls to dma_sync_sg_for_{device,cpu} and dma_unmap_sg must be called with the original number of

[RFC 02/17] drm: amdgpu: fix sg_table nents vs. orig_nents misuse

2020-04-28 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the numer of the created entries in the DMA address space. However the subsequent calls to dma_sync_sg_for_{device,cpu} and dma_unmap_sg must be called with the original number of entries passed to dma_map_sg. The sg_table->nents