Re: [PATCH v7 08/36] drm: exynos: fix common struct sg_table related issues

2020-07-07 Thread Andrzej Hajda
On 07.07.2020 11:40, Andrzej Hajda wrote: > On 19.06.2020 12:36, Marek Szyprowski wrote: >> The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function >> returns the number of the created entries in the DMA address space. >> However the subsequent calls to

Re: [PATCH v7 07/36] drm: exynos: use common helper for a scatterlist contiguity check

2020-07-07 Thread Andrzej Hajda
On 07.07.2020 11:35, Andrzej Hajda wrote: > Hi, > > On 19.06.2020 12:36, Marek Szyprowski wrote: >> Use common helper for checking the contiguity of the imported dma-buf. >> >> Signed-off-by: Marek Szyprowski Just fixing my signature :) Reviewed-by: Andr

Re: [PATCH v7 01/36] drm: prime: add common helper to check scatterlist contiguity

2020-07-07 Thread Andrzej Hajda
On 07.07.2020 16:30, Andrzej Hajda wrote: > On 19.06.2020 12:36, Marek Szyprowski wrote: >> 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 help

Re: [PATCH v7 03/36] drm: core: fix common struct sg_table related issues

2020-07-07 Thread Andrzej Hajda
des references to the > nents and orig_nents entries, making the code robust, easier to follow > and copy/paste safe. > > Signed-off-by: Marek Szyprowski I guess whole patchset can go via drm-misc, after r-b/a-b. Reviewed-by: Andrzej Hajda Regards Andrzej > --- > drivers/gpu

Re: [PATCH v7 02/36] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-07-07 Thread Andrzej Hajda
sulting code is simple and > easy to understand, so the comment describing the old code is no > longer needed. > > Signed-off-by: Marek Szyprowski Nice simplification. Reviewed-by: Andrzej Hajda Btw, I've wrongly re-configured my e-mail client, so my R-Bs for other patches

Re: [PATCH v7 01/36] drm: prime: add common helper to check scatterlist contiguity

2020-07-07 Thread Andrzej Hajda
On 19.06.2020 12:36, Marek Szyprowski wrote: > 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 > --- >

Re: [PATCH v7 08/36] drm: exynos: fix common struct sg_table related issues

2020-07-07 Thread Andrzej Hajda
On 19.06.2020 12:36, Marek Szyprowski wrote: > The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function > returns the number of the created entries in the DMA address space. > However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and > dma_unmap_sg must be called

Re: [PATCH v7 07/36] drm: exynos: use common helper for a scatterlist contiguity check

2020-07-07 Thread Andrzej Hajda
Hi, On 19.06.2020 12:36, Marek Szyprowski wrote: > Use common helper for checking the contiguity of the imported dma-buf. > > Signed-off-by: Marek Szyprowski > --- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 23 +++ > 1 file changed, 3 insertions(+), 20 deletions(-) > >

Re: [PATCH v2] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-04-14 Thread Andrzej Hajda
Hi, Gently ping. Regards Andrzej On 31.03.2017 13:02, Andrzej Hajda wrote: > In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages > is invalid. __iommu_mmap_attrs and __iommu_get_sgtable should not > use it and take advantage of contiguous nature of the allocation. > &

Re: [PATCH v2] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-04-03 Thread Andrzej Hajda
Hi Russel, On 31.03.2017 13:16, Russell King - ARM Linux wrote: > On Fri, Mar 31, 2017 at 01:02:51PM +0200, Andrzej Hajda wrote: >> In this version of the patch I have replaced temporal pages and >> iommu_dma_mmap with remap_pfn_range or rather its simplified version >

[PATCH v2] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-31 Thread Andrzej Hajda
In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages is invalid. __iommu_mmap_attrs and __iommu_get_sgtable should not use it and take advantage of contiguous nature of the allocation. Fixes: 44176bb ("arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU") Signed-of

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-30 Thread Andrzej Hajda
Hi Robin, On 30.03.2017 12:44, Robin Murphy wrote: > On 30/03/17 09:30, Andrzej Hajda wrote: >> On 30.03.2017 09:40, Geert Uytterhoeven wrote: >>> Hi Andrzej, >>> >>> On Thu, Mar 30, 2017 at 8:51 AM, Andrzej Hajda <a.ha...@samsung.com> wrote: &g

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-30 Thread Andrzej Hajda
On 30.03.2017 09:40, Geert Uytterhoeven wrote: > Hi Andrzej, > > On Thu, Mar 30, 2017 at 8:51 AM, Andrzej Hajda <a.ha...@samsung.com> wrote: >> On 29.03.2017 17:33, Robin Murphy wrote: >>> On 29/03/17 16:12, Andrzej Hajda wrote: >>>> On 29.03.2017 14:55, R

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-30 Thread Andrzej Hajda
On 29.03.2017 17:33, Robin Murphy wrote: > On 29/03/17 16:12, Andrzej Hajda wrote: >> On 29.03.2017 14:55, Robin Murphy wrote: >>> On 29/03/17 11:05, Andrzej Hajda wrote: >>>> In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages &g

[PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Andrzej Hajda
6bb ("arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU") Signed-off-by: Andrzej Hajda <a.ha...@samsung.com> --- Hi, I am not familiar with this framework so please don't be too cruel ;) Alternative solution I see is to always create vm_area->pages, I do not know which

Re: [PATCH 2/2] iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5

2017-03-20 Thread Andrzej Hajda
er available in the mentioned SoCs when IOMMU support is > enabled. To workaround this issue perform a full TLB/FLPD invalidation > in case of replacing any first level page descriptors in case of SYSMMU v5. It fixes also crashes of MFC encoder on Exynos5433. For both patches: Tested-by: A

[PATCH] iommu/mtk: fix handling of of_count_phandle_with_args result

2016-03-01 Thread Andrzej Hajda
The function can return negative value so it should be assigned to signed variable. The patch changes also type of related i variable to make code more compact and coherent. The problem has been detected using patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci. Signed-off-by: Andrzej