search for: nvkm_device_tegra_power_up

Displaying 18 results from an estimated 18 matches for "nvkm_device_tegra_power_up".

2017 Jun 09
4
[PATCH 1/3] drm/nouveau/tegra: Skip manual unpowergating when not necessary
...ions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 6474bd2a6d07..3d42cdbbe9c0 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -51,10 +51,12 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) reset_control_assert(tdev->rst); udelay(10); - ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D); - if (ret) - goto err_clamp; - udelay(10); + if (!tdev->pdev->dev.pm_domain) { + ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D); + i...
2019 Sep 16
2
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
...+++ b/drivers/gpu/drm/nouveau/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_io...
2016 Apr 01
1
[PATCH] tegra: acquire and enable reference clock if needed
...data, + .data = &gm20b_platform_data, }, { } }; diff --git a/drm/nouveau/nvkm/engine/device/tegra.c b/drm/nouveau/nvkm/engine/device/tegra.c index 9afa5f3e3c1c..ec12efb4689a 100644 --- a/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drm/nouveau/nvkm/engine/device/tegra.c @@ -35,6 +35,11 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) ret = clk_prepare_enable(tdev->clk); if (ret) goto err_clk; + if (tdev->clk_ref) { + ret = clk_prepare_enable(tdev->clk_ref); + if (ret) + goto err_clk_ref; + } ret = clk_prepare_enable(tdev->clk_pwr); if (ret) goto err_clk_pwr; @@ -57,6...
2019 Sep 16
1
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
...; @@ -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-&g...
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
...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
2017 Jun 12
0
[PATCH 1/3] drm/nouveau/tegra: Skip manual unpowergating when not necessary
...a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c > index 6474bd2a6d07..3d42cdbbe9c0 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c > @@ -51,10 +51,12 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) > reset_control_assert(tdev->rst); > udelay(10); > > - ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D); > - if (ret) > - goto err_clamp; > - udelay(10); > + if (!tdev->pdev->dev.pm_domain) { > + ret = tegra_powerg...
2019 Sep 16
0
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
...- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/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(...
2019 Sep 16
0
[PATCH 08/11] drm/nouveau: tegra: Skip IOMMU initialization if already attached
...gine/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) {...
2018 May 30
0
[PATCH v4 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
...- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/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(d...
2017 May 20
2
[PATCH] drm: remove NULL pointer check for clk_disable_unprepare
...ode_config_funcs = { diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 6474bd2..bde8ab2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -64,8 +64,7 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) err_clamp: clk_disable_unprepare(tdev->clk_pwr); err_clk_pwr: - if (tdev->clk_ref) - clk_disable_unprepare(tdev->clk_ref); + clk_disable_unprepare(tdev->clk_ref); err_clk_ref: clk_disable_unprepare(tdev->clk); err_clk: @@ -84,8 +83,7 @@ nvkm_d...
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 Jul 26
8
[RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU
Hello, There is a trouble on ARM with DMA allocations made by device drivers, the trouble is that DMA allocations are getting implicitly backed with IOMMU mapping by the driver core if IOMMU presents in a system and IOMMU could handle device. This is an undesired behaviour for drivers that manage IOMMU by themselves, like NVIDIA Tegra GPU driver. On arm32 the implicit backing happens if
2019 Sep 16
15
[PATCH 00/11] drm/nouveau: Enable GP10B by default
From: Thierry Reding <treding at nvidia.com> Hi, the GPU on Jetson TX2 (GP10B) does not work properly on all devices. Why exactly is not clear, but there are slight differences between the SKUs that were tested. It turns out that the biggest issue is that on some devices (e.g. the one that I have), pulsing the GPU reset twice as is done in the current code (once as part of the power-ungate
2019 Nov 02
13
[PATCH v2 0/9] drm/nouveau: Various fixes for GP10B
From: Thierry Reding <treding at nvidia.com> Hi Ben, here's a revised subset of the patches I had sent out a couple of weeks ago. I've reworked the BAR2 accesses in the way that you had suggested, which at least for GP10B turned out to be fairly trivial to do. I have not looked in detail at this for GV11B yet, but a cursory look showed that BAR2 is accessed in more places, so the
2019 Dec 09
11
[PATCH v3 0/9] drm/nouveau: Various fixes for GP10B
From: Thierry Reding <treding at nvidia.com> Hi Ben, here's a revised subset of the patches I had sent out a couple of weeks ago. I've reworked the BAR2 accesses in the way that you had suggested, which at least for GP10B turned out to be fairly trivial to do. I have not looked in detail at this for GV11B yet, but a cursory look showed that BAR2 is accessed in more places, so the
2017 Mar 29
15
[PATCH 00/15] Support for GP10B chipset
GP10B is the chip used in Tegra X2 SoCs. This patchset adds support for its base engines after reworking secboot a bit to accomodate its calling convention better. This patchset has been tested rendering simple off-screen buffers using Mesa and yielded the expected result. Alexandre Courbot (15): secboot: allow to boot multiple falcons secboot: pass instance to LS firmware loaders secboot:
2017 Dec 14
2
[bug report] null ptr deref in nouveau_platform_probe (tegra186-p2771-0000)
...0 (inlined by) __mutex_trylock_fast at kernel/locking/mutex.c:143 (inlined by) mutex_lock at kernel/locking/mutex.c:240 iommu_group_device_count at drivers/iommu/iommu.c:673 (inlined by) iommu_attach_device at drivers/iommu/iommu.c:1312 clk_prepare_enable at include/linux/clk.h:646 (inlined by) nvkm_device_tegra_power_up at drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:37 (inlined by) nvkm_device_tegra_new at drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:319 nouveau_platform_device_create at drivers/gpu/drm/nouveau/nouveau_drm.c:1193 nouveau_platform_probe at drivers/gpu/drm/nouveau/nouveau_platform.c:44...