[PATCH 10/18] iommu/msm: Add IOMMU_DOMAIN_DMA support

2020-08-20 Thread Robin Murphy
Now that arch/arm is wired up for default domains and iommu-dma, implement the corresponding driver-side support for DMA domains. Signed-off-by: Robin Murphy --- drivers/iommu/msm_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/msm_iommu.c b

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

2020-08-20 Thread Robin Murphy
Now that arch/arm is wired up for default domains and iommu-dma, we can consolidate the shared mapping code onto the generic IOMMU API version, and retire the arch-specific implementation. Signed-off-by: Robin Murphy --- This is a cheeky revert of 07dc3678bacc ("drm/exynos: Fix cleanup of

[PATCH 09/18] iommu/mediatek-v1: Add IOMMU_DOMAIN_DMA support

2020-08-20 Thread Robin Murphy
Now that arch/arm is wired up for default domains and iommu-dma, implement the corresponding driver-side support for groups and DMA domains to replace the shared mapping workaround. Signed-off-by: Robin Murphy --- drivers/iommu/mtk_iommu.h| 2 - drivers/iommu/mtk_iommu_v1.c | 153

[PATCH 07/18] iommu/arm-smmu: Remove arch/arm workaround

2020-08-20 Thread Robin Murphy
Now that arch/arm is wired up for default domains and iommu-dma, remove the add_device workaround. Signed-off-by: Robin Murphy --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm

Re: [PATCH 10/18] iommu/msm: Add IOMMU_DOMAIN_DMA support

2020-08-20 Thread Robin Murphy
;iommu/msm: Add support for generic master bindings"). Robin. BR, -R On Thu, Aug 20, 2020 at 8:09 AM Robin Murphy wrote: Now that arch/arm is wired up for default domains and iommu-dma, implement the corresponding driver-side support for DMA domains. Signed-off-by: Robin Murphy

Re: [PATCH 17/18] media/omap3isp: Clean up IOMMU workaround

2020-08-20 Thread Robin Murphy
On 2020-08-20 17:53, Sakari Ailus wrote: Hi Robin, On Thu, Aug 20, 2020 at 04:08:36PM +0100, Robin Murphy wrote: Now that arch/arm is wired up for default domains and iommu-dma, devices behind IOMMUs will get mappings set up automatically as appropriate, so there is no need for drivers to do

Re: [PATCH 17/18] media/omap3isp: Clean up IOMMU workaround

2020-08-20 Thread Robin Murphy
On 2020-08-20 20:55, Sakari Ailus wrote: On Thu, Aug 20, 2020 at 06:25:19PM +0100, Robin Murphy wrote: On 2020-08-20 17:53, Sakari Ailus wrote: Hi Robin, On Thu, Aug 20, 2020 at 04:08:36PM +0100, Robin Murphy wrote: Now that arch/arm is wired up for default domains and iommu-dma, devices

Re: [PATCH 16/18] staging/media/tegra-vde: Clean up IOMMU workaround

2020-08-20 Thread Robin Murphy
On 2020-08-20 20:51, Dmitry Osipenko wrote: 20.08.2020 18:08, Robin Murphy пишет: Now that arch/arm is wired up for default domains and iommu-dma, we no longer need to work around the arch-private mapping. Signed-off-by: Robin Murphy --- drivers/staging/media/tegra-vde/iommu.c | 12

Re: [PATCH 12/18] iommu/tegra-gart: Add IOMMU_DOMAIN_DMA support

2020-08-20 Thread Robin Murphy
On 2020-08-20 21:16, Dmitry Osipenko wrote: 20.08.2020 18:08, Robin Murphy пишет: Now that arch/arm is wired up for default domains and iommu-dma, implement the corresponding driver-side support for DMA domains. Signed-off-by: Robin Murphy --- drivers/iommu/tegra-gart.c | 17

Re: [PATCH 05/15] drm/panfrost: use spinlock instead of atomic

2020-05-29 Thread Robin Murphy
submission/completion/timeout on different job slots. Given that, should this actually be considered a fix for 9e62b885f715 ("drm/panfrost: Simplify devfreq utilisation tracking")? Robin. ___ dri-devel mailing list dri-devel@lists.freed

[PATCH] drm: convert DT component matching to component_match_add_release()

2016-06-03 Thread Robin Murphy
defining it commonly as a static __maybe_unused default_release_of() in component.h or drm_of.h (and maybe default_compare_of() similarly)? (Apologies if there's already been some strong argument against that which I've not seen, but it seems like a reasonable thing to do.) Robin.

HDLCD crashes with 6d910bfa809e

2016-06-07 Thread Robin Murphy
reate a framebuffer, drm_gem_cma_create() fails, unconditionally calls the now-NULL drm->driver->gem_free_object() in its cleanup path, and fiery death ensues... Regards, Robin.

[PATCH] drm/fb_cma_helper: Implement fb_mmap callback

2016-06-07 Thread Robin Murphy
x27;s regular DMA ops, if the allocation is provided by an IOMMU then such assumptions can fall apart spectacularly. To resolve this, reroute the fb_mmap call to the appropriate DMA API implementation, as per the other cma_helper calls. Acked-by: Daniel Vetter Signed-off-by: Robin Murphy --- Rese

HDLCD crashes with 6d910bfa809e

2016-06-07 Thread Robin Murphy
Hi Liviu, On 07/06/16 14:35, liviu.dudau at arm.com wrote: > On Tue, Jun 07, 2016 at 01:06:00PM +0100, Robin Murphy wrote: >> Having just inadvertently merged -next into my working branch, I find >> dev6d910bfa809e ("drm/hlcd: Use lockless gem BO free callback") adversel

[PATCH] drm/fb_cma_helper: Implement fb_mmap callback

2016-06-07 Thread Robin Murphy
On 07/06/16 15:43, Daniel Vetter wrote: > On Tue, Jun 07, 2016 at 01:18:09PM +0100, Robin Murphy wrote: >> In the absence of an fb_mmap callback, the fbdev code falls back to a >> naive implementation which relies upon the DMA address being the same >> as the physical address,

HDLCD crashes with 6d910bfa809e

2016-06-07 Thread Robin Murphy
On 07/06/16 15:40, Daniel Vetter wrote: > On Tue, Jun 07, 2016 at 01:06:00PM +0100, Robin Murphy wrote: >> Hi Daniel, Liviu, >> >> Having just inadvertently merged -next into my working branch, I find >> dev6d910bfa809e ("drm/hlcd: Use lockless gem BO free call

[PATCH v4 43/44] dma-mapping: Remove dma_get_attr

2016-06-10 Thread Robin Murphy
_ALLOC_SINGLE_PAGES, attrs)) > + if (attrs & DMA_ATTR_ALLOC_SINGLE_PAGES) > alloc_sizes = min_size; > > count = PAGE_ALIGN(size) >> PAGE_SHIFT; [...] These all look appropriate to me; thanks! For arm64 and dma-iommu: Acked-by: Robin Murphy

[PATCH v2 6/7] iommu/rockchip: use DMA API to map, to flush cache

2016-06-13 Thread Robin Murphy
--> iommu_map() --> dma_alloc_coherent(IOMMU dev) // for pagetable --> ops->alloc(IOMMU dev) --> swiotlb_alloc(IOMMU dev) There shouldn't be any need for this "virtual IOMMU" at all. I think the Exynos DRM driver is

[PATCH] drm: hdlcd: Unwind the DRM setup on error conditions in the right order.

2016-06-13 Thread Robin Murphy
atch in both functions. > > Reported-by: Robin Murphy > Signed-off-by: Liviu Dudau > --- > > Robin, > > I believe this should fix your problems with HDLCD failing to allocate CMA > memory and then crashing. Heh, I'm not sure I'd even clocked that there was yet anot

[PATCH] drivers/gpu/drm/i915/dma: style fixes

2014-06-02 Thread Robin Schroer
Fixed several double space pointer notations, and added one newline Signed-off-by: Robin Schroer --- drivers/gpu/drm/i915/i915_dma.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH] drivers/gpu/drm/i915/dma: style fixes

2014-06-02 Thread Robin Schroer
On Mon, Jun 02, 2014 at 05:21:32PM +0200, Daniel Vetter wrote: > On Mon, Jun 02, 2014 at 04:10:08PM +0100, Damien Lespiau wrote: > > On Mon, Jun 02, 2014 at 04:59:39PM +0200, Robin Schroer wrote: > > > Fixed several double space pointer notations, and added one newline > &g

[PATCH] drivers/gpu/drm/i915/intel_display: coding style fixes

2014-05-18 Thread Robin Schroer
Fixed several switch statements, curly braces, dereference operators and keywords. Signed-off-by: Robin Schroer --- drivers/gpu/drm/i915/intel_display.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu

[PATCH] drm: hdlcd: Work properly in big-endian mode

2016-12-07 Thread Robin Murphy
Under a big-endian kernel, colours on the framebuffer all come out a delightful shade of wrong, since we fail to take the reversed byte order into account. Fortunately, the HDLCD has a control bit to make it automatically byteswap big-endian data; let's use it as appropriate. Signed-off-by:

[PATCH] drm: hdlcd: Work properly in big-endian mode

2016-12-07 Thread Robin Murphy
On 07/12/16 15:57, Daniel Vetter wrote: > On Wed, Dec 07, 2016 at 03:31:40PM +0000, Robin Murphy wrote: >> Under a big-endian kernel, colours on the framebuffer all come out a >> delightful shade of wrong, since we fail to take the reversed byte >> order into account. Fortuna

[PATCH] drm: hdlcd: Work properly in big-endian mode

2016-12-07 Thread Robin Murphy
On 07/12/16 16:42, Robin Murphy wrote: > On 07/12/16 15:57, Daniel Vetter wrote: >> On Wed, Dec 07, 2016 at 03:31:40PM +0000, Robin Murphy wrote: >>> Under a big-endian kernel, colours on the framebuffer all come out a >>> delightful shade of wrong, since we fai

[PATCH v5 2/4] drm: Add support for ARM's HDLCD controller.

2015-12-08 Thread Robin Murphy
; Cc: David Airlie > Cc: Robin Murphy I've given this a spin on my Juno, and the first thing of note is this: hdlcd 7ff6.hdlcd: master bind failed: -517 hdlcd 7ff5.hdlcd: master bind failed: -517 scpi_protocol scpi: SCP Protocol 1.0 Firmware 1.9.0 version [drm] found ARM HDLCD v

[PATCH v5 2/4] drm: Add support for ARM's HDLCD controller.

2015-12-10 Thread Robin Murphy
On 08/12/15 16:52, Liviu Dudau wrote: > On Tue, Dec 08, 2015 at 04:25:27PM +0000, Robin Murphy wrote: >> Hi Liviu, >> >> On 07/12/15 12:11, Liviu Dudau wrote: >>> The HDLCD controller is a display controller that supports resolutions >>> up to 4096x4096 pixel

Nouveau crashes in 4.6-rc on arm64

2016-04-07 Thread Robin Murphy
le to find time for a full bisection next week if isn't something sufficiently obvious to anyone who knows this driver. Thanks, Robin. -- next part -- [===>] 13458 Kb EFI stub: Booting Linux Kernel... EFI stub: Using DTB from config

Nouveau crashes in 4.6-rc on arm64

2016-04-08 Thread Robin Murphy
Hi Alex, On 08/04/16 05:47, Alexandre Courbot wrote: > Hi Robin, > > On 04/07/2016 08:50 PM, Robin Murphy wrote: >> Hello, >> >> With 4.6-rc2 (and -rc1) I'm seeing Nouveau blowing up at boot, from the >> look of it by dereferencing some offset from NULL i

Nouveau crashes in 4.6-rc on arm64

2016-04-20 Thread Robin Murphy
On 20/04/16 11:44, Robin Murphy wrote: > Hi Alex, > > On 20/04/16 05:35, Alexandre Courbot wrote: > [...] >>>> Bisection came down to 1733a2ad3674("drm/nouveau/device/pci: set as >>>> non-CPU-coherent on ARM64"), and sure enough reverting that removes

Nouveau crashes in 4.6-rc on arm64

2016-04-20 Thread Robin Murphy
e doing memcpy on a NULL pointer. We never caught this because we >> typically do not use Nouveau's fbcon with an ARM setup. >> >> I don't really like this special access for coherent objects, and >> actually had a patch in my tree to attempt to remove it (attached). &g

Re: [PATCH] drm/panel: Add simple panel mode for the ARM RTSMv8

2018-10-18 Thread Robin Murphy
for RTSMv8 is augmented accordingly. Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Robin Murphy Signed-off-by: Linus Walleij --- drivers/gpu/drm/panel/panel-simple.c | 30 Nit: binding doc? 1 file changed, 30 insertion

Re: [PATCH v3 1/3] drm/prime: Iterate SG DMA addresses separately

2018-05-25 Thread Robin Murphy
On 30/04/18 18:59, Sinan Kaya wrote: On 4/30/2018 9:54 AM, Robin Murphy wrote: For dma_map_sg(), DMA API implementations are free to merge consecutive segments into a single DMA mapping if conditions are suitable, thus the resulting DMA addresses which drm_prime_sg_to_page_addr_arrays

Re: [PATCH v2 2/2] drm/rockchip: vop: fix irq disabled after vop driver probed

2018-05-29 Thread Robin Murphy
greater than the VOP usage count (except before the VOP driver has probed, but I don't think that matters), so although this looks like a sensible change in general I can't help be a little bit puzzled at how and why the flow works. Robin. +*/ + if (!pm

Re: [PATCH v2 2/2] drm/rockchip: vop: fix irq disabled after vop driver probed

2018-05-29 Thread Robin Murphy
On 29/05/18 13:17, Heiko Stübner wrote: Am Dienstag, 29. Mai 2018, 13:59:42 CEST schrieb Robin Murphy: On 28/05/18 14:20, Heiko Stuebner wrote: From: Sandy Huang The vop irq is shared between vop and iommu and irq probing in the iommu driver moved to the probe function recently. This can in

Re: [PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Robin Murphy
x27;t always right. Robin. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Robin Murphy
be even more appropriate? + /* make sure we can use the IOMMU exclusively */ + arm_dma_iommu_detach_device(dev); As before, I would just use the existing infrastructure the same way the Exynos DRM driver currently does in __exynos_iommu_attach() (albeit without then reattaching to another

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Robin Murphy
On 30/05/18 14:41, Thierry Reding wrote: On Wed, May 30, 2018 at 02:30:51PM +0100, Robin Murphy wrote: On 30/05/18 14:00, Thierry Reding wrote: On Wed, May 30, 2018 at 11:30:25AM +0100, Robin Murphy wrote: On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Depending on the

Re: [PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-30 Thread Robin Murphy
On 30/05/18 14:00, Thierry Reding wrote: On Wed, May 30, 2018 at 11:30:25AM +0100, Robin Murphy wrote: On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that

Re: [PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()

2018-05-30 Thread Robin Murphy
On 30/05/18 14:12, Thierry Reding wrote: On Wed, May 30, 2018 at 02:54:46PM +0200, Thierry Reding wrote: On Wed, May 30, 2018 at 10:59:30AM +0100, Robin Murphy wrote: On 30/05/18 09:03, Thierry Reding wrote: From: Thierry Reding Implement this function to enable drivers from detaching from

Re: [PATCH v4 1/2] ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()

2018-05-31 Thread Robin Murphy
landscape changing around it, but it's clearly not enough of a problem to consider stable backports :) Reviewed-by: Robin Murphy Signed-off-by: Thierry Reding --- Changes in v4: - new patch to fix existing arm_iommu_detach_device() to do what we need arch/arm/mm/dma-mapping.c | 12 +

Re: [PATCH v4 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-05-31 Thread Robin Murphy
I guess this disappears again anyway once the refcounting gets sorted out and the mapping releases itself properly, so: Reviewed-by: Robin Murphy + + arm_iommu_detach_device(dev); + arm_iommu_release_mapping(mapping); + } +#endif + if (

Re: [PATCH 1/2 v4] drm/pl111: Support the Versatile Express

2018-04-27 Thread Robin Murphy
On 26/04/18 08:52, Linus Walleij wrote: On Mon, Apr 23, 2018 at 2:04 PM, Robin Murphy wrote: I've given this a go on the nearest VExpress (with CA15_A7 tile) and sadly it doesn't quite work for me :( With the HDLCD driver configure out, the PL111 driver seems to repeatedly defer

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-27 Thread Robin Murphy
NULL and I've missed the tiny subtlety below. Does that fix matters? Robin. ->8- diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index b8ca06ea7d80..6a31229e4611 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm/dr

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-27 Thread Robin Murphy
Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to https://www.linuxquestions.org/questions/linux-kernel-70/%27nents%27-argument-of-dma_unmap_sg-4175621964

Re: [PATCH v2 2/5] dma-mapping: Introduce dma_iommu_detach_device() API

2018-04-30 Thread Robin Murphy
really after is a generic way for drivers to say "Hey, I actually have my own MMU (or want to control the one you already know about) so please give me direct DMA ops", which the arch code handles as appropriate (maybe it's also allowed to fail in cases like swiotlb=force or when th

Re: [PATCH] drm/vmwgfx: Fix scatterlist unmapping

2018-04-30 Thread Robin Murphy
On 27/04/18 18:39, Thomas Hellstrom wrote: On 04/27/2018 06:56 PM, Robin Murphy wrote: Hi Thomas, On 25/04/18 14:21, Thomas Hellstrom wrote: Hi, Robin, Thanks for the patch. It was some time since I put together that code, but I remember hitting something similar to https

Re: [VERY RFC 0/2] iommu: optionally skip attaching to a DMA domain

2018-04-30 Thread Robin Murphy
X can only use context bank N" condition is a real hardware limitation which should be described by firmware, but I don't have any immediate good ideas as to how :( The matter of opting out of DMA ops which expect the default domain is a separate and more general issue, so I won&#x

Re: [PATCH v2 2/5] dma-mapping: Introduce dma_iommu_detach_device() API

2018-04-30 Thread Robin Murphy
On 30/04/18 13:12, Thierry Reding wrote: On Mon, Apr 30, 2018 at 12:41:52PM +0100, Robin Murphy wrote: On 30/04/18 12:02, Thierry Reding wrote: On Thu, Apr 26, 2018 at 02:11:36PM +0200, Thierry Reding wrote: On Wed, Apr 25, 2018 at 08:19:34AM -0700, Christoph Hellwig wrote: On Wed, Apr 25

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-30 Thread Robin Murphy
On 27/04/18 20:42, Sinan Kaya wrote: On 4/27/2018 11:54 AM, Robin Murphy wrote: ubuntu@ubuntu:~/amdgpu$_./vectoradd_hip.exe [  834.002206] create_process:620 [  837.413021] Unable to handle kernel NULL pointer dereference at virtual address 0018 £5 says that's sg_dma_len(NULL),

[PATCH v3 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-30 Thread Robin Murphy
g dma-contiguous segments such that it returns 0 < count < nents, we can relax the current count == nents check to only consider genuine failure as other drivers do. Reported-by: Sinan Kaya Reviewed-by: Christian König Signed-off-by: Robin Murphy --- v3: No change drivers/gpu/drm/amd/amdgpu/a

[PATCH v3 3/3] drm/radeon: Allow dma_map_sg() coalescing

2018-04-30 Thread Robin Murphy
ap_sg() coalescing dma-contiguous segments such that it returns 0 < count < nents, we can relax the current count == nents check to only consider genuine failure as other drivers do. Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Robin Murphy --- v3: No change driv

[PATCH v3 1/3] drm/prime: Iterate SG DMA addresses separately

2018-04-30 Thread Robin Murphy
the total DMA length should still be equal to the total buffer length. All we need is a second scatterlist cursor to iterate through the DMA addresses independently of the page addresses. Reviewed-by: Christian König Signed-off-by: Robin Murphy --- v3: Move dma_len == 0 logic earlier to avoid

Re: [PATCH 1/2 v4] drm/pl111: Support the Versatile Express

2018-04-30 Thread Robin Murphy
On 27/04/18 19:51, Linus Walleij wrote: On Fri, Apr 27, 2018 at 5:02 PM, Robin Murphy wrote: I dug a little bit and it seems pl111_modeset_init() is deferring because it can't find endpoint 0. And given that that's apparently pointing at some non-existent panel rather than the DVI

Re: [PATCH 2/2] ARM: dts: Modernize the Vexpress PL111 integration

2018-04-30 Thread Robin Murphy
location of the video RAM depending on which chip select is used on each platform. This plays nicely with the new PL111 DRM driver and follows the standard ways of assigning bridges and memory pools for graphics. Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Robin Murphy Signed-off-by: Linus Walleij

Re: [PATCH 03/13] drm/kms/mode/exynos-dsi: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-03 Thread Robin Murphy
videomode *vm = &dsi->vm; struct drm_display_mode *m = adjusted_mode; FWIW you could just pass &dsi->vm and adjusted_mode directly to the helper and get rid of these locals too. Robin. - vm->hactive = m->hdisplay; - vm->vactive = m->vdisplay; -

Re: [PATCH v1 03/13] drm/kms/mode/exynos-dsi: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-04 Thread Robin Murphy
On 04/05/18 09:15, Satendra Singh Thakur wrote: To avoid duplicate logic for the same Reviewed-by: Robin Murphy Please read section 13 of Documentation/process/submitting-patches.rst for what this tag means; specifically, it is definitely not "this guy read my patch". FWIW,

Re: [RFC PATCH 01/10] devfreq: rockchip-dfi: Move GRF definitions to a common place.

2018-05-15 Thread Robin Murphy
grf.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Rockchip Generic Register Files definitions Nit: s/Generic/General/ (that's what the TRMs say) Robin. + * + * Copyright (c) 2018, Collabora Ltd. + * Author: Enric Balletbo i Serra + */ + +#ifndef __SOC_RK3399_GRF

Re: [RFC PATCH] efi/fb: Convert PCI bus address to resource if translated by the bridge

2018-05-17 Thread Robin Murphy
ize - 1) { + base += window->offset; + break; + } + } + Is this not pretty much just pcibios_bus_to_resource()? Robin. for (i = 0; i <= PCI_STD_RESOURCE_END; i++) { struct resource *res = &dev->resource[i];

Re: [PATCH] efi/fb: Convert PCI bus address to resource if translated by the bridge

2018-05-18 Thread Robin Murphy
t it, so it's probably worth renaming one or the other. Robin. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU

2018-08-16 Thread Robin Murphy
On 15/08/18 20:56, Dmitry Osipenko wrote: On Friday, 3 August 2018 18:43:41 MSK Robin Murphy wrote: On 02/08/18 19:24, Dmitry Osipenko wrote: On Friday, 27 July 2018 20:16:53 MSK Dmitry Osipenko wrote: On Friday, 27 July 2018 20:03:26 MSK Jordan Crouse wrote: On Fri, Jul 27, 2018 at 05:02

Re: [PATCH v3] of/platform: initialise AMBA default DMA masks

2018-09-06 Thread Robin Murphy
"OF: Don't set default coherent DMA mask") the OF core stops setting the default DMA mask on new devices, especially those lines of the patch: - if (!dev->coherent_dma_mask) - dev->coherent_dma_mask = DMA_BIT_MASK(32); Robin Murphy solved a similar problem in a55

Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*

2018-11-29 Thread Robin Murphy
o refcount domain users and release hardware contexts for domains with no devices currently attached. Robin. doing that, except that we're doing it behind the back of the DMA mapping subsystem, so that it keeps using the IOMMU version of the DMA ops for the device and doing any mapping o

Re: [PATCH] of/device: add blacklist for iommu dma_ops

2018-12-03 Thread Robin Murphy
main will already have been allocated by the time we get here, regardless of whether we pretend of_iommu_configure() did nothing, I'm puzzled as to how this change is 'solving' that aspect as claimed :/ Is CONFIG_IOMMU_DEFAULT_PASSTHROUGH a sufficient workaround for msm at the mo

Re: [PATCH v3 4/9] drm/rockchip/rockchip_drm_gem.c: Convert to use vm_insert_range

2018-12-07 Thread Robin Murphy
some version of the Arm Mali driver, possibly on RK3288). Robin. } static int rockchip_drm_gem_object_mmap_dma(struct drm_gem_object *obj, ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 1/9] mm: Introduce new vm_insert_range API

2018-12-07 Thread Robin Murphy
also clean up a couple more places where you're not already removing such checks) Robin. + + for (i = 0; i < page_count; i++) { + ret = vm_insert_page(vma, uaddr, pages[i]); + if (ret < 0) + return ret; + ua

Re: [PATCH v3 1/9] mm: Introduce new vm_insert_range API

2018-12-07 Thread Robin Murphy
On 2018-12-07 7:28 pm, Souptick Joarder wrote: On Fri, Dec 7, 2018 at 10:41 PM Matthew Wilcox wrote: On Fri, Dec 07, 2018 at 03:34:56PM +, Robin Murphy wrote: +int vm_insert_range(struct vm_area_struct *vma, unsigned long addr, + struct page **pages, unsigned long

Re: [PATCH v3 4/9] drm/rockchip/rockchip_drm_gem.c: Convert to use vm_insert_range

2018-12-07 Thread Robin Murphy
On 2018-12-07 8:30 pm, Souptick Joarder wrote: On Fri, Dec 7, 2018 at 8:20 PM Robin Murphy wrote: On 06/12/2018 18:42, Souptick Joarder wrote: Convert to use vm_insert_range() to map range of kernel memory to user vma. Signed-off-by: Souptick Joarder Tested-by: Heiko Stuebner Acked-by

Re: [PATCH 02/10] arm64/iommu: don't remap contiguous allocations for coherent devices

2018-12-10 Thread Robin Murphy
nto the correct order... Robin. } else { iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs); dma_release_from_contiguous(dev, page, @@ -309,7 +314,9 @@ static void __iommu_free_attrs(struct device *dev, size_t size

[PATCH] gpu: host1x: Remove redundant of_dma_configure() call

2018-09-12 Thread Robin Murphy
Now that the Host1x bus_type implements a .dma_configure callback, subdevices should automatically get configured for DMA as their drivers bind, so there's no need to also force it at device creation time. CC: Thierry Reding CC: Mikko Perttunen Signed-off-by: Robin Murphy --- I *believ

Re: [PATCH] gpu: host1x: Remove redundant of_dma_configure() call

2018-09-26 Thread Robin Murphy
On 26/09/18 15:13, Thierry Reding wrote: On Wed, Sep 26, 2018 at 04:10:54PM +0200, Thierry Reding wrote: On Wed, Sep 12, 2018 at 05:47:54PM +0100, Robin Murphy wrote: Now that the Host1x bus_type implements a .dma_configure callback, subdevices should automatically get configured for DMA as

Re: [PATCH] drm/exynos: Use selected dma_dev default iommu domain instead of a fake one

2018-09-28 Thread Robin Murphy
. Reviewed-by: Robin Murphy Signed-off-by: Marek Szyprowski --- Inki: If possible, please consider this patch as a fix for v4.19-rc, this will help doing a rework in IOMMU and DMA-IOMMU frameworks in v4.20 without breaking Exynos DRM. It worked for current IOMMU code, but such usage is considered as

Re: [PATCH 1/3 v4] ARM: dts: Modernize the Vexpress PL111 integration

2018-07-13 Thread Robin Murphy
.clcd failed with error -2 FWIW the same happens on PB-A8; looks like converting to OF graph bindings falls foul of the "panel-dpi" check in clcdfb_of_get_mode(). Robin. ___ dri-devel mailing list dri-devel@lists.freede

Re: [RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU

2018-07-27 Thread Robin Murphy
about the specific details of which devices have magic associations with specific contexts, and we almost certainly need a more expressive interface than iommu_domain_alloc() to have any hope of reliable results. Robin. Some of the above is due to a SW driver model (and its work-in-progress s

Re: [RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU

2018-08-03 Thread Robin Murphy
On 02/08/18 19:24, Dmitry Osipenko wrote: On Friday, 27 July 2018 20:16:53 MSK Dmitry Osipenko wrote: On Friday, 27 July 2018 20:03:26 MSK Jordan Crouse wrote: On Fri, Jul 27, 2018 at 05:02:37PM +0100, Robin Murphy wrote: On 27/07/18 15:10, Dmitry Osipenko wrote: On Friday, 27 July 2018 12

Re: [PATCH 2/2] arm64: dts: sdm845: Add gpu and gmu device nodes

2018-08-09 Thread Robin Murphy
, And here? Otherwise, assuming the table walk really isn't cache-coherent, and the global and CB interrupts really do ha

Re: [PATCH 1/4] scsi: check that busses support the DMA API before setting dma parameters

2024-08-27 Thread Robin Murphy
t thinking ahead, might it be worth a logical "are SG segment limits relevant?" wrapper around the dev->dma_parms reference? Not a big deal for now if we think this site is the only user, so either way, Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- drive

Re: [PATCH v2 02/15] drm/panthor: Add uAPI

2023-09-04 Thread Robin Murphy
ee "kernel" VA space impinging on usable process VAs. Even then we're not sure that's a significant concern beyond OpenCL SVM. Thanks, Robin.

Re: [PATCH v2 02/15] drm/panthor: Add uAPI

2023-09-04 Thread Robin Murphy
VA space is limited to 4G on a 32-bit build :-(. Robin, any chance you could advise me on what to do here? 1. assume this limitation is here for a good reason, and limit the GPU VA space to 32-bits on 32-bit kernels or 2. update the interface to make iova an u64 I'm not sure I can answe

Re: [PATCH 8/9] dt-bindings: reserved-memory: MediaTek: Add reserved memory for SVP

2023-09-12 Thread Robin Murphy
a particular driver" and don't actually bear any relationship to firmware or hardware at all. However, the fact that Linux's implementation of how to reuse reserved memory areas is called CMA is indeed still irrelevant and has no place in the binding itself. Thanks, Robin.

Re: [PATCH 8/9] dt-bindings: reserved-memory: MediaTek: Add reserved memory for SVP

2023-09-12 Thread Robin Murphy
On 12/09/2023 4:53 pm, Rob Herring wrote: On Tue, Sep 12, 2023 at 11:13:50AM +0100, Robin Murphy wrote: On 12/09/2023 9:28 am, Krzysztof Kozlowski wrote: On 12/09/2023 08:16, Yong Wu (吴勇) wrote: Hi Rob, Thanks for your review. On Mon, 2023-09-11 at 10:44 -0500, Rob Herring wrote

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Robin Murphy
alone just a non-broken build - than there are for building this driver for x86. Using pm_ptr() is trivial, and if you want to support COMPILE_TEST then there's really no justifiable excuse not to. Thanks, Robin.

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Robin Murphy
On 2024-03-11 1:22 pm, Boris Brezillon wrote: On Mon, 11 Mar 2024 13:11:28 + Robin Murphy wrote: On 2024-03-11 11:52 am, Boris Brezillon wrote: On Mon, 11 Mar 2024 13:49:56 +0200 Jani Nikula wrote: On Mon, 11 Mar 2024, Boris Brezillon wrote: On Mon, 11 Mar 2024 13:05:01 +0200

Re: [PATCH] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Robin Murphy
- pm_ptr() already takes care of allowing the compiler to optimise out the ops structure itself without any further annotations. Thanks, Robin. static DEFINE_RUNTIME_DEV_PM_OPS(panthor_pm_ops, panthor_device_suspend,

Re: [PATCH] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Robin Murphy
properly test this configuration does worry me a little. Well, as long as it doesn't regress the PM behavior, I think I'm happy to take the risk. Worst case scenario, someone complains that this is not working properly when they do the !PM bringup :-). Indeed, I've no objection to this

Re: [PATCH] drm/panthor: Don't use virt_to_pfn()

2024-03-18 Thread Robin Murphy
!dummy_page_virt) return -ENOMEM; ptdev->pm.dummy_latest_flush = virt_to_page(dummy_page_virt); Cheers, Robin. if (ret) return ret; @@ -184,7 +186,7 @@ int panthor_device_init(struct panthor_device *ptdev) * happens while the dummy

Re: [PATCH] drm/msm/a6xx: don't set IO_PGTABLE_QUIRK_ARM_OUTER_WBWA with coherent SMMU

2023-09-25 Thread Robin Murphy
this is the way it is? [ just came across this code in the tree while trying to figure out what to do with iommu_set_pgtable_quirks()... ] Thanks, Robin. Fixes: 54af0ceb7595 ("arm64: dts: qcom: sm8350: add GPU, GMU, GPU CC and SMMU nodes") Reported-by: David Heidelberg Signed

Re: [PATCH] drm/msm/a6xx: don't set IO_PGTABLE_QUIRK_ARM_OUTER_WBWA with coherent SMMU

2023-09-29 Thread Robin Murphy
On 29/09/2023 4:45 pm, Will Deacon wrote: On Mon, Sep 25, 2023 at 06:54:42PM +0100, Robin Murphy wrote: On 2023-04-10 19:52, Dmitry Baryshkov wrote: If the Adreno SMMU is dma-coherent, allocation will fail unless we disable IO_PGTABLE_QUIRK_ARM_OUTER_WBWA. Skip setting this quirk for the

Re: [PATCH v2 6/8] dt-bindings: reserved-memory: Add secure CMA reserved memory range

2023-11-14 Thread Robin Murphy
tible. It needs to describe *this* secure memory interface offered by *this* TEE, so that software knows that to use it requires making those particular SiP calls with that particular UUID etc. Thanks, Robin.

[PATCH v3] drm/mediatek: Stop using iommu_present()

2023-11-23 Thread Robin Murphy
decisively seems more useful than deferring forever. Signed-off-by: Robin Murphy --- I realised that last time I sent this I probably should have CCed a wider audience of reviewers, so here's one with an updated commit message as well to make the resend more worthwhile. drivers/gpu/drm/med

Re: [PATCH 06/10] iommu: Replace iommu_device_lock with iommu_probe_device_lock

2023-11-29 Thread Robin Murphy
much less need to serialise against it! Thanks, Robin. Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommu.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 08f29a1dfcd5f8..9557c2ec08d

Re: [PATCH 10/10] ACPI: IORT: Allow COMPILE_TEST of IORT

2023-11-30 Thread Robin Murphy
t theoretical bug becomes real. There's really no practical value to be had from compile-testing IORT. Thanks, Robin.

Re: [PATCH] treewide: Fix common grammar mistake "the the"

2024-04-11 Thread Robin Murphy
y still not right... repeated words aren't *always* redundant, sometimes they're meant to be other words ;) Thanks, Robin.

Re: [PATCH 2/9] iommu/rockchip: Attach multiple power domains

2024-06-14 Thread Robin Murphy
n't spread the "collect the resources" trick into those subsystems as well. Thanks, Robin.

Re: [PATCH v4 1/2] iommu/io-pgtable-arm: Add way to debug pgtable walk

2024-06-17 Thread Robin Murphy
hmark on a Neoverse N1, any difference I think I see is still well within the noise, so maybe a handful of extra indirect calls isn't really enough to worry about? Cheers, Robin. Signed-off-by: Rob Clark --- drivers/iommu/io-pgtable-arm.c | 51 -- i

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Robin Murphy
aint as a workaround for a driver shortcoming is "the right thing to do" ;) Robin. Signed-off-by: Sinan Kaya --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Robin Murphy
On 11/04/18 15:33, Sinan Kaya wrote: On 4/11/2018 8:03 AM, Robin Murphy wrote: On 10/04/18 21:59, Sinan Kaya wrote: Code is expecing to observe the same number of buffers returned from dma_map_sg() function compared to sg_alloc_table_from_pages(). This doesn't hold true universally espec

[PATCH 2/2] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-11 Thread Robin Murphy
Now that drm_prime_sg_to_page_addr_arrays() understands the case where dma_map_sg() has coalesced segments and returns 0 < count < nents, we can relax the check to only consider genuine failure. Signed-off-by: Robin Murphy --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file chan

[PATCH 1/2] drm/prime: Iterate SG DMA addresses separately

2018-04-11 Thread Robin Murphy
ngth. All we need is a separate scatterlist cursor to iterate the DMA addresses separately from the CPU addresses. Signed-off-by: Robin Murphy --- Off the back of Sinan's proposal for a workaround, I took a closer look and this jumped out - I have no hardware to test it, nor do I really k

Re: [1/2] drm/prime: Iterate SG DMA addresses separately

2018-04-11 Thread Robin Murphy
On 11/04/18 18:11, Robin Murphy wrote: For dma_map_sg(), DMA API implementations are free to merge consecutive segments into a single DMA mapping if conditions are suitable, thus the resulting DMA addresses may be packed into fewer entries than ttm->sg->nents i

<    1   2   3   4   5   6   >