[RFC 10/17] drm: radeon: fix sg_table nents vs. orig_nents misuse

2020-04-28 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/radeon/radeon_ttm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/

[RFC 03/17] drm: armada: fix sg_table nents vs. orig_nents misuse

2020-04-28 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/armada/armada_gem.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/

[RFC 13/17] drm: virtio: fix sg_table nents vs. orig_nents misuse

2020-04-28 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/virtio/virtgpu_object.c | 11 ++- drivers/gpu/drm/virtio/virtgpu_vq.c | 8 2 files changed,

[RFC 16/17] drm: host1x: fix sg_table nents vs. orig_nents misuse

2020-04-28 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- drivers/gpu/host1x/job.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/host1x/jo

[RFC 14/17] drm: vmwgfx: fix sg_table nents vs. orig_nents misuse

2020-04-28 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/

Re: [Intel-gfx] [RFC 06/17] drm: i915: fix sg_table nents vs. orig_nents misuse

2020-04-30 Thread Marek Szyprowski
Hi On 28.04.2020 16:27, Tvrtko Ursulin wrote: > > On 28/04/2020 14:19, Marek Szyprowski wrote: >> 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

[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
t I will prepare a common dma_{map,sync,unmap}_sgtable() wrappers, which will use a proper sg_table entries and call respective DMA-mapping functions. I hope this will help to avoid issue like this in the future. Patches are based on top of Linux next-20200504. Best regards, Marek Szyprowski Reference

[PATCH v2 14/21] drm: vmwgfx: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 11/21] drm: rockchip: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 04/21] drm: etnaviv: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 16/21] drm: host1x: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 08/21] drm: msm: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 15/21] drm: xen: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 06/21] drm: i915: fix sg_table nents vs. orig_nents misuse for dmabuf objects

2020-05-04 Thread Marek Szyprowski
s)used to properly free the (over)allocated scatterlist. This patch only fixes the sg_table->nents entries in the sg_table objects exported by the dmabuf related functions, so the other drivers, which might share buffers with i915 could rely on the nents and orig_nents values. Signed-off-by: Mare

[PATCH v2 21/21] staging: ion: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 19/21] dmabuf: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 10/21] drm: radeon: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski Reviewed-by: Christian König --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse

[PATCH v2 01/21] drm: core: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/drm_cache.c| 2 +- drivers/gpu/drm/drm_gem_shmem_helper.c | 7 --- drivers/gpu/drm/drm_prim

[PATCH v2 03/21] drm: armada: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 09/21] drm: panfrost: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 05/21] drm: exynos: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 13/21] drm: virtio: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 20/21] media: pci: fix common ALSA DMA-mapping related code

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 02/21] drm: amdgpu: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski Reviewed-by: Christian König --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse

[PATCH v2 12/21] drm: tegra: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 07/21] drm: lima: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 17/21] drm: rcar-du: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v2 18/21] xen: gntdev: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

Re: [PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-05-04 Thread Marek Szyprowski
Hi Christoph, On 04.05.2020 14:52, Christoph Hellwig wrote: > On Mon, May 04, 2020 at 02:50:17PM +0200, Marek Szyprowski wrote: >> v2: >> - dropped most of the changes to drm/i915 >> - added fixes for rcar-du, xen, media and ion >> - fixed a few issues pointed by kbuild

[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-05-05 Thread Marek Szyprowski
_table objects exported by dmabuf related functions. I hope that I didn't break anything there. Patches are based on top of Linux next-20200504. Best regards, Marek Szyprowski References: [1] https://lkml.org/lkml/2020/3/27/555 [2] https://lkml.org/lkml/2020/3/29/65 [3] Documentation/DMA

[PATCH v3 04/25] drm: armada: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/gpu/dr

[PATCH v3 19/25] dmabuf: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drive

[PATCH v3 24/25] samples: vfio-mdev/mbochs: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. While touching this code, also add missing call to dma_unmap_sgtable. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nent

[PATCH v3 25/25] media: pci: fix common ALSA DMA-mapping related codes

2020-05-05 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/

[PATCH v3 06/25] drm: exynos: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- d

[PATCH v3 05/25] drm: etnaviv: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- dr

[PATCH v3 20/25] staging: ion: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/stag

[PATCH v3 12/25] drm: rockchip: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- dri

[PATCH v3 23/25] rapidio: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- dr

[PATCH v3 08/25] drm: lima: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/gp

[PATCH v3 07/25] drm: i915: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
rig_nents values. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 13 + drivers/gpu/drm

[PATCH v3 01/25] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-05 Thread Marek Szyprowski
care of the proper use of the nents and orig_nents entries. Signed-off-by: Marek Szyprowski --- include/linux/dma-mapping.h | 32 include/linux/iommu.h | 6 ++ 2 files changed, 38 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma

[PATCH v3 03/25] drm: amdgpu: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drive

[PATCH v3 18/25] drm: rcar-du: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- driver

[PATCH v3 14/25] drm: virtio: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- d

[PATCH v3 17/25] drm: host1x: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/

[PATCH v3 15/25] drm: vmwgfx: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- d

[PATCH v3 02/25] drm: core: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- driver

[PATCH v3 16/25] xen: gntdev: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/xe

[PATCH v3 09/25] drm: msm: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/

[PATCH v3 10/25] drm: panfrost: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- dri

[PATCH v3 21/25] staging: tegra-vde: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/st

[PATCH v3 13/25] drm: tegra: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/gpu/d

[PATCH v3 22/25] misc: fastrpc: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/misc/

[PATCH v3 11/25] drm: radeon: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v3 00/25] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lkml.org/lkml/2020/5/5/187 --- drivers/gpu/dr

Re: [PATCH v3 01/25] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-05 Thread Marek Szyprowski
the different subsystems? > > FYI, I'll happily pick up the prep patches in an immutable branch of > the dma-mapping tree one we have settled on the details. Okay. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland

Re: [PATCH v3 02/25] drm: core: fix common struct sg_table related issues

2020-05-05 Thread Marek Szyprowski
sg(sgt->sgl, sg, sgt->orig_nents, count) { > Same here, e.g. > > for_each_sgtable_entry(sgt, sg, count) { > > ? > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 02/25] drm: core: fix common struct sg_table related issues

2020-05-08 Thread Marek Szyprowski
Hi Christoph, On 05.05.2020 13:09, Christoph Hellwig wrote: > On Tue, May 05, 2020 at 12:51:58PM +0200, Marek Szyprowski wrote: >> On 05.05.2020 12:15, Christoph Hellwig wrote: >>>> - for_each_sg_page(st->sgl, &sg_iter, st->nents, 0) >>>> +

[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-05-12 Thread Marek Szyprowski
map_sg function. In this patchset I only fixed the sg_table objects exported by dmabuf related functions. I hope that I didn't break anything there. Patches are based on top of Linux next-20200511. Best regards, Marek Szyprowski References: [1] https://lkml.org/lkml/2020/3/27/555. [2] https:

[PATCH v4 08/38] drm: armada: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 07/38] drm: amdgpu: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 37/38] media: pci: fix common ALSA DMA-mapping related codes

2020-05-12 Thread Marek Szyprowski
nts in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.k

[PATCH v4 22/38] drm: rockchip: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 09/38] drm: etnaviv: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 28/38] drm: host1x: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 23/38] drm: tegra: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 32/38] staging: ion: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 21/38] drm: rockchip: use common helper for a scatterlist contiguity check

2020-05-12 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1-m.szyprow...@sam

[PATCH v4 14/38] drm: mediatek: use common helper for a scatterlist contiguity check

2020-05-12 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf and do this check before allocating resources, so the error path is simpler. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thr

[PATCH v4 35/38] rapidio: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 26/38] drm: vmwgfx: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 04/38] drm: prime: add common helper to check scatterlist contiguity

2020-05-12 Thread Marek Szyprowski
It is a common operation done by DRM drivers to check the contiguity of the DMA-mapped buffer described by a scatterlist in the sg_table object. Let's add a common helper for this operation. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struc

[PATCH v4 12/38] drm: i915: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
rectly on the struct sg_table objects to the dmabuf related functions, so the other drivers, which might share buffers with i915 could rely on the properly set nents and orig_nents values. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_tab

[PATCH v4 36/38] samples: vfio-mdev/mbochs: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
add missing call to dma_unmap_sgtable. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1-m.szyprow...@samsung.com/T/ --- samples/vfio-mde

[PATCH v4 38/38] videobuf2: use sgtable-based scatterlist wrappers

2020-05-12 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1-m.szyprow...@samsung.com/T/ --- .../media/common/videobuf2/videobuf2-dma-cont

[PATCH v4 15/38] drm: mediatek: use common helper for extracting pages array

2020-05-12 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1

[PATCH v4 20/38] drm: radeon: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 05/38] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-05-12 Thread Marek Szyprowski
describing the old code is no longer needed. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1-m.szyprow...@samsung.com/T/ --- drive

[PATCH v4 24/38] drm: v3d: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 11/38] drm: exynos: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 06/38] drm: core: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 27/38] xen: gntdev: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 31/38] staging: ion: remove dead code

2020-05-12 Thread Marek Szyprowski
ion_heap_pages_zero() function is not used at all, so remove it to simplify the ion_heap_sglist_zero() function later. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org

[PATCH v4 25/38] drm: virtio: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

Re: [PATCH v3 02/25] drm: core: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
Hi Christoph, On 08.05.2020 09:16, Christoph Hellwig wrote: > On Fri, May 08, 2020 at 09:12:13AM +0200, Marek Szyprowski wrote: >> Then we would just need one more helper to construct scatterlist, as the >> above two are read-only don't allow to modify scatte

[PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Marek Szyprowski
, which take care of the proper use of the nents and orig_nents entries. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1-m.szyprow...@sam

[PATCH v4 16/38] drm: msm: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 10/38] drm: exynos: use common helper for a scatterlist contiguity check

2020-05-12 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1-m.szyprow...@sam

[PATCH v4 33/38] staging: tegra-vde: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 02/38] scatterlist: add generic wrappers for iterating over sgtable objects

2020-05-12 Thread Marek Szyprowski
entries. While touching this, lets clarify some ambiguities in the comments for the existing for_each helpers. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org

[PATCH v4 29/38] drm: rcar-du: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
returns zero or an error code, so adjust the return value check for the vsp1_du_map_sg() function. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/202005120857

[PATCH v4 19/38] drm: panfrost: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 03/38] iommu: add generic helper for mapping sgtable objects

2020-05-12 Thread Marek Szyprowski
: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1-m.szyprow...@samsung.com/T/ --- include/linux/iommu.h | 16 1 file changed, 16

[PATCH v4 13/38] drm: lima: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 34/38] misc: fastrpc: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 30/38] dmabuf: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski

[PATCH v4 17/38] drm: omapdrm: use common helper for extracting pages array

2020-05-12 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse' thread: https://lore.kernel.org/dri-devel/20200512085710.14688-1

[PATCH v4 18/38] drm: omapdrm: fix common struct sg_table related issues

2020-05-12 Thread Marek Szyprowski
nents or orig_nents entries. This driver checks for a buffer contiguity in DMA address space, so it should test sg_table->nents entry. Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v4 00/38] DRM: fix struct sg_table nents vs. orig_nents misuse'

Re: [PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Marek Szyprowski
Hi Christoph, On 12.05.2020 14:18, Christoph Hellwig wrote: > On Tue, May 12, 2020 at 11:00:21AM +0200, Marek Szyprowski wrote: >> struct sg_table is a common structure used for describing a memory >> buffer. It consists of a scatterlist with memory pages and DMA addresses >>

Re: [PATCH v4 01/38] dma-mapping: add generic helpers for mapping sgtable objects

2020-05-12 Thread Marek Szyprowski
Hi Christoph, On 12.05.2020 15:09, Christoph Hellwig wrote: > On Tue, May 12, 2020 at 03:00:31PM +0200, Marek Szyprowski wrote: >>> if (n <= 0) >>> return -EINVAL; >>> sgt->nents = n; >>> return 0; >>> >> Inde

<    1   2   3   4   5   6   7   8   9   10   >