[PATCH 2/3] drm/exynos: gem: Rework scatter-list contiguity check on Prime import

2020-04-07 Thread Marek Szyprowski
Explicitly check if the imported buffer has been mapped as contiguous in the DMA address space, what is required by all Exynos DRM CRTC drivers. While touching this, set buffer flags depending on the availability of the IOMMU. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos

[PATCH 0/3] ExynosDRM - rework GEM internals

2020-04-07 Thread Marek Szyprowski
rner-cases. [1] https://patchwork.freedesktop.org/patch/359081/ patch Best regards Marek Szyprowski Samsung R&D Institute Poland Patch summary: Marek Szyprowski (3): drm/exynos: gem: Remove dead-code drm/exynos: gem: Rework scatter-list contiguity check on Prime import drm/exynos:

[PATCH 3/3] drm/exynos: gem: Get rid of the internal 'pages' array

2020-04-07 Thread Marek Szyprowski
König Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 28 + drivers/gpu/drm/exynos/exynos_drm_gem.c | 124 +++--- drivers/gpu/drm/exynos/exynos_drm_gem.h | 13 +-- 3 files changed, 42 insertions(+), 123 deletions(-) diff --git a/drivers/gp

[PATCH 1/3] drm/exynos: gem: Remove dead-code

2020-04-07 Thread Marek Szyprowski
The ExynosDRM page fault handler is never used, drm_gem_mmap() always calls exynos_drm_gem_mmap() function, which perform complete mapping for the given virtual address-space area. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 - drivers/gpu/drm/exynos

Re: [PATCH v2 10/16] drm/exynos: implement a drm bridge

2020-09-14 Thread Marek Szyprowski
nent_ops = { > @@ -1806,6 +1844,7 @@ static const struct component_ops > exynos_dsi_component_ops = { > static struct exynos_dsi *__exynos_dsi_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > + struct drm_bridge *bridge; >

Re: [PATCH v2 10/16] drm/exynos: implement a drm bridge

2020-09-14 Thread Marek Szyprowski
Hi, On 14.09.2020 10:29, Marek Szyprowski wrote: > On 11.09.2020 15:54, Michael Tretter wrote: >> Make the exynos_dsi driver a full drm bridge that can be found and used >> from other drivers. >> >> Other drivers can only attach to the bridge, if a mipi dsi device

Re: [PATCH 14/18] drm/exynos: Consolidate IOMMU mapping code

2020-09-18 Thread Marek Szyprowski
ruct device *dev, struct > device *master, > struct exynos_drm_ipp *ipp = &scaler->ipp; > > exynos_drm_ipp_unregister(dev, ipp); > - exynos_drm_unregister_dma(scaler->drm_dev, scaler->dev, > - &scaler->dma_priv); > + exynos_drm_unregister_dma(scaler->drm_dev, scaler->dev); > } > > static const struct component_ops scaler_component_ops = { > diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c > b/drivers/gpu/drm/exynos/exynos_mixer.c > index af192e5a16ef..18972e605c5d 100644 > --- a/drivers/gpu/drm/exynos/exynos_mixer.c > +++ b/drivers/gpu/drm/exynos/exynos_mixer.c > @@ -94,7 +94,6 @@ struct mixer_context { > struct platform_device *pdev; > struct device *dev; > struct drm_device *drm_dev; > - void*dma_priv; > struct exynos_drm_crtc *crtc; > struct exynos_drm_plane planes[MIXER_WIN_NR]; > unsigned long flags; > @@ -895,14 +894,12 @@ static int mixer_initialize(struct mixer_context > *mixer_ctx, > } > } > > - return exynos_drm_register_dma(drm_dev, mixer_ctx->dev, > -&mixer_ctx->dma_priv); > + return exynos_drm_register_dma(drm_dev, mixer_ctx->dev); > } > > static void mixer_ctx_remove(struct mixer_context *mixer_ctx) > { > - exynos_drm_unregister_dma(mixer_ctx->drm_dev, mixer_ctx->dev, > - &mixer_ctx->dma_priv); > + exynos_drm_unregister_dma(mixer_ctx->drm_dev, mixer_ctx->dev); > } > > static int mixer_enable_vblank(struct exynos_drm_crtc *crtc) Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 00/18] Convert arch/arm to use iommu-dma

2020-09-18 Thread Marek Szyprowski
Hi all, On 24.08.2020 13:40, Marek Szyprowski wrote: > On 20.08.2020 17:08, Robin Murphy wrote: >> After 5 years or so of intending to get round to this, finally the >> time comes! The changes themselves actualy turn out to be relatively >> mechanical; the bigger concern app

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

2020-09-21 Thread Marek Szyprowski
nflict in the -next. Do you have any AMDGPU fixes for v5.9 in the queue? Maybe you can add that patch to the queue? Dave: would it be okay that way? Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/bridge: tc358764: restore connector support

2020-09-24 Thread Marek Szyprowski
"drm/bridge: tc358764: add drm_panel_bridge support" 385ca38da29c "drm/bridge: tc358764: drop drm_connector_(un)register" and removal of the calls to drm_panel_attach()/drm_panel_detach(), which were no-ops and has been removed in meanwhile. Signed-off-by: Marek Szyprowski

Re: [PATCH 05/18] ARM/dma-mapping: Switch to iommu_dma_ops

2020-09-28 Thread Marek Szyprowski
27; using the   * specified gfp mask.  Note that 'size' must be page aligned. I also wonder if it would be better to use per-arch __dma_clear_buffer() instead of setting __GFP_ZERO unconditionally in dma-iommu.c. This should be faster on ARM with highmem... > ... Best

Re: [Linaro-mm-sig] [PATCH v5 05/38] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-09-30 Thread Marek Szyprowski
Hi All, On 25.09.2020 23:23, Alex Deucher wrote: > On Tue, Sep 22, 2020 at 2:28 AM Marek Szyprowski > wrote: >> On 22.09.2020 01:15, Alex Goins wrote: >>> Tested-by: Alex Goins >>> >>> This change fixes a regression with drm_prime_sg_to_page_addr_arrays(

[PATCH RESEND] drm/bridge: tc358764: restore connector support

2020-09-30 Thread Marek Szyprowski
"drm/bridge: tc358764: add drm_panel_bridge support" 385ca38da29c "drm/bridge: tc358764: drop drm_connector_(un)register" and removal of the calls to drm_panel_attach()/drm_panel_detach(), which were no-ops and has been removed in meanwhile. Signed-off-by: Marek Szyprowski

Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM

2020-10-07 Thread Marek Szyprowski
e vm->file. This basically works with any sane driver, which doesn't free the mmaped buffer until the file is released. This is true for V4L2 and FBdev devices. This API is considered as deprecated in V4L2 world, so I think supporting this hack can be removed one day as nowadays userspace

Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM

2020-10-07 Thread Marek Szyprowski
Hi Daniel, On 07.10.2020 14:01, Daniel Vetter wrote: > On Wed, Oct 7, 2020 at 12:47 PM Marek Szyprowski > wrote: >> On 03.10.2020 11:40, Daniel Vetter wrote: >>>> After he three places above should use pin_user_pages_fast(), then >>>> this whole broken API sho

Re: [PATCH 00/18] Convert arch/arm to use iommu-dma

2020-08-24 Thread Marek Szyprowski
r the S5P-MFC driver is that the hardware is capable only for addressing 128MiB. They will probably need to call IOMMU API directly, but I would like to keep as much from the IOMMU/DMA-mapping code as possible. Anyway, we need to move ARM 32bit forward, so for the ARM DMA-mapping and Exynos DR

[PATCH v9 16/32] drm: rockchip: use common helper for a scatterlist contiguity check

2020-08-25 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers

[PATCH v9 21/32] drm: vmwgfx: fix common struct sg_table related issues

2020-08-25 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 v9 17/32] drm: rockchip: fix common struct sg_table related issues

2020-08-25 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 v9 27/32] staging: tegra-vde: fix common struct sg_table related issues

2020-08-25 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 v9 01/32] drm: prime: add common helper to check scatterlist contiguity

2020-08-25 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 Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/drm_gem_cma_hel

[PATCH v9 09/32] drm: lima: fix common struct sg_table related issues

2020-08-25 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 v9 07/32] drm: exynos: fix common struct sg_table related issues

2020-08-25 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 v9 08/32] drm: i915: fix common struct sg_table related issues

2020-08-25 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 --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 11 +++ drive

[PATCH v9 12/32] drm: msm: fix common struct sg_table related issues

2020-08-25 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 v9 18/32] drm: tegra: fix common struct sg_table related issues

2020-08-25 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 v9 22/32] drm: xen: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
nents or orig_nents entries. This driver reports the number of the pages in the imported scatterlist, so it should refer to sg_table->orig_nents entry. Signed-off-by: Marek Szyprowski Acked-by: Oleksandr Andrushchenko --- drivers/gpu/drm/xen/xen_drm_front_gem.c | 2 +- 1 file changed, 1 insert

[PATCH v9 10/32] drm: mediatek: use common helper for a scatterlist contiguity check

2020-08-25 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 --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 28 ++ 1 file changed, 6 insertions(+), 22

[PATCH v9 03/32] drm: core: fix common struct sg_table related issues

2020-08-25 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 v9 00/32] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-08-25 Thread Marek Szyprowski
ike ask for merging of the 1-27 patches via DRM misc tree. 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-API-HOWTO.txt [4] https://lore.kernel.org/linux-iommu/20200512121931.gd20...@lst.de/T/#ma18c958a

[PATCH v9 05/32] drm: etnaviv: fix common struct sg_table related issues

2020-08-25 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 v9 19/32] drm: v3d: fix common struct sg_table related issues

2020-08-25 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 v9 02/32] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-08-25 Thread Marek Szyprowski
describing the old code is no longer needed. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/drm_prime.c | 49 - 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c

[PATCH v9 04/32] drm: armada: fix common struct sg_table related issues

2020-08-25 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 v9 25/32] drm: rcar-du: fix common struct sg_table related issues

2020-08-25 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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 3 +-- drivers/media/platform/vsp1/vsp1_drm.c | 8 2 files changed, 5 insertions(+), 6

[PATCH v9 06/32] drm: exynos: use common helper for a scatterlist contiguity check

2020-08-25 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Acked-by : Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a

[PATCH v9 20/32] drm: virtio: fix common struct sg_table related issues

2020-08-25 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 v9 14/32] drm: omapdrm: fix common struct sg_table related issues

2020-08-25 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 --- drivers/gpu/drm/omapdrm/omap_gem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/

[PATCH v9 11/32] drm: mediatek: use common helper for extracting pages array

2020-08-25 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm

[PATCH v9 30/32] samples: vfio-mdev/mbochs: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
add missing call to dma_unmap_sgtable. Signed-off-by: Marek Szyprowski --- samples/vfio-mdev/mbochs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c index 3cc5e5921682..e03068917273 100644 --- a/samples/vfio-mdev

[PATCH v9 29/32] rapidio: fix common struct sg_table related issues

2020-08-25 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 v9 26/32] dmabuf: fix common struct sg_table related issues

2020-08-25 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 v9 28/32] misc: fastrpc: fix common struct sg_table related issues

2020-08-25 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 v9 13/32] drm: omapdrm: use common helper for extracting pages array

2020-08-25 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/omapdrm/omap_gem.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm

[PATCH v9 24/32] drm: host1x: fix common struct sg_table related issues

2020-08-25 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 v9 15/32] drm: panfrost: fix common struct sg_table related issues

2020-08-25 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 v9 31/32] media: pci: fix common ALSA DMA-mapping related codes

2020-08-25 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/media/pci/cx23885/cx23885-alsa.c | 2 +- drivers/media/pci/cx25821/cx25821-alsa.c | 2 +- drivers/media/pci/cx88/cx88-als

[PATCH v9 32/32] videobuf2: use sgtable-based scatterlist wrappers

2020-08-25 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski --- .../common/videobuf2/videobuf2-dma-contig.c | 34 --- .../media/common/videobuf2/videobuf2-dma-sg.c | 32 +++-- .../common/videobuf2/videobuf2-vmalloc.c | 12 +++ 3 files changed, 31 insertions(+), 47 deletions(-) diff

[PATCH v9 23/32] xen: gntdev: fix common struct sg_table related issues

2020-08-25 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: [v4,04/15] drm/bridge: tc358764: add drm_panel_bridge support

2020-08-27 Thread Marek Szyprowski
with segmentation fault. I'm not able to check currently if there is anything on the display because of having only remote access to the board. If this is important I will try to ask someone to help checking at the board's display at the office. Best regards -- Marek Szyprowski, PhD

Re: [RFT 3/4] ARM: dts: exynos: Move CMU assigned ISP clocks to buses in Exynos3250

2020-08-31 Thread Marek Szyprowski
ompatible = "samsung,exynos-bus"; > clocks = <&cmu CLK_DIV_ACLK_266>; > clock-names = "bus"; > + assigned-clocks = <&cmu CLK_MOUT_ACLK_266_SUB>; > + assigned

Re: [RFT 3/4] ARM: dts: exynos: Move CMU assigned ISP clocks to buses in Exynos3250

2020-08-31 Thread Marek Szyprowski
Hi Krzysztof, On 31.08.2020 10:19, Krzysztof Kozlowski wrote: > On Mon, Aug 31, 2020 at 10:11:02AM +0200, Marek Szyprowski wrote: >> On 29.08.2020 19:25, Krzysztof Kozlowski wrote: >>> Commit 52005dece527 ("ARM: dts: Add assigned clock parents to CMU node >>>

Re: [RFT 2/4] ARM: dts: exynos: Move fixed clocks under root node in Exynos3250

2020-08-31 Thread Marek Szyprowski
/dts/exynos3250-artik5-eval.dt.yaml: clock@0: 'reg' does not > match any of the regexes: 'pinctrl-[0-9]+' > > Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski > --- > arch/arm/boot/dts/exynos3250.dtsi | 42 +-- > 1

Re: [RFT 09/10] arm64: dts: exynos: Correct port of USB-C connector node on Exynos5433 TM2

2020-08-31 Thread Marek Szyprowski
> - port { > - muic_to_usb: endpoint { > - remote-endpoint = > <&usb_to_muic>; > - }; > - }; > - }; >

Re: [PATCH 07/10] arm64: dts: exynos: Replace deprecated "gpios" i2c-gpio property in Exynos5433

2020-08-31 Thread Marek Szyprowski
arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: i2c-gpio-0: 'scl-gpios' > is a required property > > Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski > --- > arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 4 ++-- > 1 file changed, 2

Re: [RFT 10/10] arm64: dts: exynos: Enable Arizona interrupt controller in Exynos5433 TM2

2020-08-31 Thread Marek Szyprowski
7; is a required property >arch/arm64/boot/dts/exynos/exynos5433-tm2e.dt.yaml: wm5110-codec@0: > '#interrupt-cells' is a required property > > Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski However I really wonder if it makes sense to expose this to DTS.

Re: [PATCH] drm/exynos: Drop local dma_parms

2020-09-04 Thread Marek Szyprowski
rv_dev); > - > return ret; > } > > @@ -114,8 +92,6 @@ static void drm_iommu_detach_device(struct drm_device > *drm_dev, > arm_iommu_attach_device(subdrv_dev, *dma_priv); > } else if (IS_ENABLED(CONFIG_IOMMU_DMA)) > iommu_detac

Re: [PATCH 00/16] drm/exynos: Convert driver to drm bridge

2020-09-04 Thread Marek Szyprowski
00b ]--- I've didn't check the code yet, but the conversion also lacks "select DRM_SAMSUNG_DSIM" in the Exynos DSI driver's Kconfig, as I wasn't even able to compile it with the current exynos_defconfig. I've tested it on top of next-20200824, because it d

Re: [PATCH 02/16] drm/exynos: extract helper functions for probe

2020-09-04 Thread Marek Szyprowski
truct exynos_dsi *dsi = platform_get_drvdata(pdev); > + struct exynos_dsi *dsi; > > - of_node_put(dsi->in_bridge_node); > + dsi = __exynos_dsi_probe(pdev); > + if (IS_ERR(dsi)) > + return PTR_ERR(dsi); > + platform_set_drvdata(pdev, &dsi->

Re: [PATCH 02/16] drm/exynos: extract helper functions for probe

2020-09-04 Thread Marek Szyprowski
Hi On 04.09.2020 11:04, Marek Szyprowski wrote: > On 03.09.2020 18:57, Michael Tretter wrote: >> As the driver shall be usable with drivers that use the component >> framework and drivers that don't, split the common probing code into a >> separate function that ca

Re: [PATCH v9 14/32] drm: omapdrm: fix common struct sg_table related issues

2020-09-04 Thread Marek Szyprowski
Hi Tomi, On 02.09.2020 10:00, Tomi Valkeinen wrote: > On 01/09/2020 22:33, Robin Murphy wrote: >> On 2020-08-26 07:32, Marek Szyprowski wrote: >>> The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function >>> returns the number of the created entri

Re: [PATCH v9 14/32] drm: omapdrm: fix common struct sg_table related issues

2020-09-04 Thread Marek Szyprowski
Hi again, On 04.09.2020 14:06, Marek Szyprowski wrote: > Hi Tomi, > > On 02.09.2020 10:00, Tomi Valkeinen wrote: >> On 01/09/2020 22:33, Robin Murphy wrote: >>> On 2020-08-26 07:32, Marek Szyprowski wrote: >>>> The Documentation/DMA-API-HOWTO.txt states

[PATCH v10 01/30] drm: prime: add common helper to check scatterlist contiguity

2020-09-04 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 Reviewed-by: Andrzej Hajda Reviewed-by: Robin Murphy --- driver

[PATCH v10 03/30] drm: core: fix common struct sg_table related issues

2020-09-04 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 v10 02/30] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-09-04 Thread Marek Szyprowski
describing the old code is no longer needed. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Reviewed-by: Robin Murphy --- drivers/gpu/drm/drm_prime.c | 49 - 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/drm_prime.c b

[PATCH v10 21/30] drm: xen: fix common struct sg_table related issues

2020-09-04 Thread Marek Szyprowski
nents or orig_nents entries. This driver reports the number of the pages in the imported scatterlist, so it should refer to sg_table->orig_nents entry. Signed-off-by: Marek Szyprowski Acked-by: Oleksandr Andrushchenko --- drivers/gpu/drm/xen/xen_drm_front_gem.c | 2 +- 1 file changed, 1 insert

[PATCH v10 13/30] drm: omapdrm: use common helper for extracting pages array

2020-09-04 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy --- drivers/gpu/drm/omapdrm/omap_gem.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/omapdrm

[PATCH v10 11/30] drm: mediatek: use common helper for extracting pages array

2020-09-04 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy Acked-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH v10 15/30] drm: rockchip: use common helper for a scatterlist contiguity check

2020-09-04 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/gpu/drm/rockchip

[PATCH v10 10/30] drm: mediatek: use common helper for a scatterlist contiguity check

2020-09-04 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 Reviewed-by: Robin Murphy Acked-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 28

[PATCH v10 23/30] drm: host1x: fix common struct sg_table related issues

2020-09-04 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 v10 27/30] rapidio: fix common struct sg_table related issues

2020-09-04 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 v10 25/30] dmabuf: fix common struct sg_table related issues

2020-09-04 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 v10 14/30] drm: panfrost: fix common struct sg_table related issues

2020-09-04 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 v10 24/30] drm: rcar-du: fix common struct sg_table related issues

2020-09-04 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 Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 3 +-- drivers/media/platform/vsp1/vsp1_drm.c | 8 2 files changed, 5 insertions(+), 6

[PATCH v10 17/30] drm: tegra: fix common struct sg_table related issues

2020-09-04 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 v10 06/30] drm: exynos: use common helper for a scatterlist contiguity check

2020-09-04 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Acked-by : Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a

[PATCH v10 00/30] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-09-04 Thread Marek Szyprowski
le I would like ask for merging most of the patches via DRM tree. 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-API-HOWTO.txt [4] https://lore.kernel.org/linux-iommu/20200512121931.gd20...@lst.

[PATCH v10 08/30] drm: i915: fix common struct sg_table related issues

2020-09-04 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 Reviewed-by: Robin Murphy Reviewed-by: Michael J. Ruhl --- drivers/gpu/dr

[PATCH v10 20/30] drm: vmwgfx: fix common struct sg_table related issues

2020-09-04 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 v10 09/30] drm: lima: fix common struct sg_table related issues

2020-09-04 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 v10 16/30] drm: rockchip: fix common struct sg_table related issues

2020-09-04 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 v10 26/30] staging: tegra-vde: fix common struct sg_table related issues

2020-09-04 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 v10 05/30] drm: etnaviv: fix common struct sg_table related issues

2020-09-04 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 v10 12/30] drm: msm: fix common struct sg_table related issues

2020-09-04 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 v10 04/30] drm: armada: fix common struct sg_table related issues

2020-09-04 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 v10 19/30] drm: virtio: fix common struct sg_table related issues

2020-09-04 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 v10 29/30] media: pci: fix common ALSA DMA-mapping related codes

2020-09-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. While touching this code, update it to use the modern DMA_FROM_DEVICE definitions. Signed-off-by: Marek Szyprowski --- drivers/media/pci/cx23885/cx23885-alsa.c

[PATCH v10 07/30] drm: exynos: fix common struct sg_table related issues

2020-09-04 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 v10 28/30] samples: vfio-mdev/mbochs: fix common struct sg_table related issues

2020-09-04 Thread Marek Szyprowski
add missing call to dma_unmap_sgtable. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy --- samples/vfio-mdev/mbochs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c index 3cc5e5921682..e03068917273 100644

[PATCH v10 22/30] xen: gntdev: fix common struct sg_table related issues

2020-09-04 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 v10 18/30] drm: v3d: fix common struct sg_table related issues

2020-09-04 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 v10 30/30] videobuf2: use sgtable-based scatterlist wrappers

2020-09-04 Thread Marek Szyprowski
. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy --- .../common/videobuf2/videobuf2-dma-contig.c | 34 --- .../media/common/videobuf2/videobuf2-dma-sg.c | 32 +++-- .../common/videobuf2/videobuf2-vmalloc.c | 12 +++ 3 files changed, 31 insertions

Re: [PATCH v10 30/30] videobuf2: use sgtable-based scatterlist wrappers

2020-09-07 Thread Marek Szyprowski
Hi Tomasz, On 07.09.2020 15:07, Tomasz Figa wrote: > On Fri, Sep 4, 2020 at 3:35 PM Marek Szyprowski > wrote: >> Use recently introduced common wrappers operating directly on the struct >> sg_table objects and scatterlist page iterators to make the code a bit >> more co

[PULL] scatterlists related fixes

2020-09-10 Thread Marek Szyprowski
Hi Dave & Daniel, Please pull a set of fixes for various DRM drivers that finally resolve incorrect usage of the scatterlists (struct sg_table nents and orig_nents entries), what causes issues when IOMMU is used. Best regards Marek Szyprowski, PhD Samsung R&D Institute Poland The f

[PATCH] drm/exynos: Fix dma_parms allocation

2020-05-20 Thread Marek Szyprowski
Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices") driver core handles allocation of the dma_parms structure for platform device, so there is no need to manually allocate nor free it. Reported-by: Tomi Valkeinen Signed-off-by: Marek

[PATCH] drm/exynos: Properly propagate return value in drm_iommu_attach_device()

2020-05-21 Thread Marek Szyprowski
Propagate the proper error codes from the called functions instead of unconditionally returning 0. Reported-by: kbuild test robot Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v5 39/38] drm: xen: fix common struct sg_table related issues

2020-05-22 Thread Marek Szyprowski
nents or orig_nents entries. This driver reports the number of the pages in the imported scatterlist, so it should refer to sg_table->orig_nents entry. Signed-off-by: Marek Szyprowski Acked-by: Oleksandr Andrushchenko --- For more information, see '[PATCH v5 00/38] DRM: fix struct sg_tab

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

2020-05-26 Thread Marek Szyprowski
arately would take a lots of time because of the dependencies on the sgtable helpers and changes in the DRM core. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ___ dri-devel mailing list dri-devel@lists.freedesktop.org http

Re: [PATCH 0/8] Convert the intel iommu driver to the dma-iommu api

2020-05-29 Thread Marek Szyprowski
> all. Per my previous email, I'd guess that it can be fixed simply by > adjusting the __sgt_iter() function to do something more sensible. > (Better yet, if possible, ditch __sgt_iter() and use the common DRM > function that AMD uses). > > This would at least allow us to make

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