Displaying 20 results from an estimated 29 matches for "nvkm_device_tegra_probe_iommu".
2016 Jul 06
1
[PATCH -next] drm/nouveau/device: fix return value check in nvkm_device_tegra_probe_iommu()
...+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index ec12efb..2ed025d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -102,7 +102,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
if (iommu_present(&platform_bus_type)) {
tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
- if (IS_ERR(tdev->iommu.domain))
+ if (!tdev->iommu.domain)
goto error;
/*
2016 Jul 06
0
[PATCH -next] drm/nouveau/device: fix return value check in nvkm_device_tegra_probe_iommu()
On Wed, Jul 6, 2016 at 9:23 PM, <weiyj_lk at 163.com> wrote:
> From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
>
> In case of error, the function iommu_domain_alloc() returns NULL
> pointer not ERR_PTR(). The IS_ERR() test in the return value check
> should be replaced with NULL test.
Reviewed-by: Alexandre Courbot <acourbot at nvidia.com>
Thanks!
2024 Sep 02
2
[PATCH v2 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()
In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
and attached to it on success. Use iommu_paging_domain_alloc() to make it
explicit.
Signed-off-by: Lu Baolu <baolu.lu at linux.intel.com>
---
drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)...
2018 Jan 11
1
[PATCH 1/2] drm/nouveau: Remove redundant _get
From: Thierry Reding <treding at nvidia.com>
The nouveau_fence_get_get_driver_name() function has a redundant _get in
its name. Remove it.
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
drivers/gpu/drm/nouveau/nouveau_fence.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c
2019 Sep 16
2
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
...CONFIG_NOUVEAU_PLATFORM_DRIVER
> #include "priv.h"
>
> -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
> -#include <asm/dma-iommu.h>
> -#endif
> -
> static int
> nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev)
> {
> @@ -109,14 +105,13 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
> unsigned long pgsize_bitmap;
> int ret;
>
> -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
> - if (dev->archdata.mapping) {
> - struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
> -
> - arm_iommu_detach_device(dev);
>...
2024 Aug 12
2
[PATCH 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()
In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
and attached to it on success. Use iommu_paging_domain_alloc() to make it
explicit.
Signed-off-by: Lu Baolu <baolu.lu at linux.intel.com>
Link: https://lore.kernel.org/r/20240610085555.88197-7-baolu.lu at linux.intel.com
---
drivers/gpu/drm/nouveau/n...
2024 Sep 02
3
[PATCH v2 0/3] drm: Use iommu_paging_domain_alloc()
Commit <17de3f5fdd35> ("iommu: Retire bus ops") removes iommu ops from
the bus structure. The iommu subsystem no longer relies on bus for
operations. So iommu_domain_alloc() interface is no longer relevant.
A new helper named iommu_paging_domain_alloc() was introduced in the
iommu subsystem as a replacement of iommu_domain_alloc(). This helper
relies on the device for IOMMU API
2018 Apr 23
1
[PATCH] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
...F OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
+
+#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
+#include <asm/dma-iommu.h>
+#endif
+
#include <core/tegra.h>
#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
#include "priv.h"
@@ -105,6 +110,20 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
unsigned long pgsize_bitmap;
int ret;
+#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
+ if (dev->archdata.mapping) {
+ struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
+
+ arm_iommu_release_mapping(mapping);
+ arm_iommu_detach_device(dev);
+
+ if...
2018 May 30
2
[PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
.../drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> index 78597da6313a..d0538af1b967 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> @@ -105,6 +105,11 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
> unsigned long pgsize_bitmap;
> int ret;
>
> +#if IS_ENABLED(CONFIG_ARM)
Wouldn't CONFIG_ARM_DMA_USE_IOMMU be even more appropriate?
> + /* make sure we can use the IOMMU exclusively */
> + arm_dma_iommu_detach_device(dev);
As befor...
2019 Sep 16
1
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
..."
>>> -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
>>> -#include <asm/dma-iommu.h>
>>> -#endif
>>> -
>>> static int
>>> nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev)
>>> {
>>> @@ -109,14 +105,13 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
>>> unsigned long pgsize_bitmap;
>>> int ret;
>>> -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
>>> - if (dev->archdata.mapping) {
>>> - struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
>>> -...
2018 May 30
2
[PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
...gine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
>>> index 78597da6313a..d0538af1b967 100644
>>> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
>>> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
>>> @@ -105,6 +105,11 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
>>> unsigned long pgsize_bitmap;
>>> int ret;
>>> +#if IS_ENABLED(CONFIG_ARM)
>>
>> Wouldn't CONFIG_ARM_DMA_USE_IOMMU be even more appropriate?
>
> Not necessarily. arm_dma_iommu_detach_device() is always defi...
2015 Sep 04
4
[PATCH 0/4] tegra: DMA mask and IOMMU bit fixes
These 4 patches fix two issues that existed on Tegra regarding DMA:
1) The bit indicating whether to use an IOMMU or not was hardcoded ; make this
a platform property and use it in instmem
2) The DMA mask was not set for platform devices. Fix this by converting
more pci_dma* to the DMA API, and use that more generic code to set the
DMA mask properly for all platforms.
Tested on both x86
2018 May 30
8
[PATCH v4 0/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
From: Thierry Reding <treding at nvidia.com>
An unfortunate interaction between the 32-bit ARM DMA/IOMMU mapping code
and Tegra SMMU driver changes to support IOMMU groups introduced a boot-
time regression on Tegra124. This was caught very late because none of
the standard configurations that are tested on Tegra enable the ARM DMA/
IOMMU mapping code since it is not needed.
The reason for
2016 Feb 25
0
[PATCH v2] instmem/gk20a: set DMA mask early
...* The IOMMU bit defines the upper limit of the GPU-addressable space.
+ * This will be refined in nouveau_ttm_init but we need to do it early
+ * for instmem to behave properly
+ */
+ ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(tdev->func->iommu_bit));
+ if (ret)
+ return ret;
+
nvkm_device_tegra_probe_iommu(tdev);
ret = nvkm_device_tegra_power_up(tdev);
--
2.7.1
2016 Aug 15
1
[PATCH] drm/nouveau/tegra: Modify error handling
...+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 939682f..ffd8def 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -102,7 +102,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
if (iommu_present(&platform_bus_type)) {
tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
- if (IS_ERR(tdev->iommu.domain))
+ if (!tdev->iommu.domain)
goto error;
/*
--
1.9.1
2016 Oct 31
1
[PATCH] drm/nouveau/tegra: Fix error handling
...tion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 9b638bd905ff..f2bc0b7d9b93 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -102,7 +102,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
if (iommu_present(&platform_bus_type)) {
tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
- if (IS_ERR(tdev->iommu.domain))
+ if (!tdev->iommu.domain)
goto error;
/*
--
2.9.3
2018 May 30
0
[PATCH v3 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
...ons(+)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 78597da6313a..d0538af1b967 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -105,6 +105,11 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
unsigned long pgsize_bitmap;
int ret;
+#if IS_ENABLED(CONFIG_ARM)
+ /* make sure we can use the IOMMU exclusively */
+ arm_dma_iommu_detach_device(dev);
+#endif
+
if (!tdev->func->iommu_bit)
return;
--
2.17.0
2019 Sep 16
0
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
.../nvkm/engine/device/tegra.c
@@ -23,10 +23,6 @@
#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
#include "priv.h"
-#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
-#include <asm/dma-iommu.h>
-#endif
-
static int
nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev)
{
@@ -109,14 +105,13 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
unsigned long pgsize_bitmap;
int ret;
-#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
- if (dev->archdata.mapping) {
- struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
-
- arm_iommu_detach_device(dev);
- arm_iommu_release_mapping(mapping);
- }
-#e...
2019 Sep 16
0
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
...gt; #include "priv.h"
> > -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
> > -#include <asm/dma-iommu.h>
> > -#endif
> > -
> > static int
> > nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev)
> > {
> > @@ -109,14 +105,13 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
> > unsigned long pgsize_bitmap;
> > int ret;
> > -#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
> > - if (dev->archdata.mapping) {
> > - struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
> > -
> > - arm_io...
2018 May 30
0
[PATCH v4 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
...u/nvkm/engine/device/tegra.c
@@ -23,6 +23,10 @@
#ifdef CONFIG_NOUVEAU_PLATFORM_DRIVER
#include "priv.h"
+#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
+#include <asm/dma-iommu.h>
+#endif
+
static int
nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev)
{
@@ -105,6 +109,15 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
unsigned long pgsize_bitmap;
int ret;
+#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)
+ if (dev->archdata.mapping) {
+ struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
+
+ arm_iommu_detach_device(dev);
+ arm_iommu_release_mapping(mapping);
+ }
+#e...