search for: nvkm_device_del

Displaying 20 results from an estimated 26 matches for "nvkm_device_del".

2018 Dec 07
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
..._defer(pdev)) - return -EPROBE_DEFER; - - /* We need to check that the chipset is supported before booting - * fbdev off the hardware, as there's no way to put it back. - */ - ret = nvkm_device_pci_new(pdev, NULL, "error", true, false, 0, &device); - if (ret) - return ret; - - nvkm_device_del(&device); - - /* Remove conflicting drivers (vesafb, efifb etc). */ - aper = alloc_apertures(3); - if (!aper) - return -ENOMEM; - - aper->ranges[0].base = pci_resource_start(pdev, 1); - aper->ranges[0].size = pci_resource_len(pdev, 1); - aper->count = 1; - - if (pci_resource_len(pdev,...
2020 Nov 06
2
[PATCH 2/3] drm/nouveau: manage nouveau_drm lifetime with devres
...ev); it sounded like that when using devm_drm_dev_alloc we still have an initial refcount of 1, so at least in this regard nothing changed so I am wondering why this change is necessary and if the reason is unrelated it might make sense to move it into its own patch. > fail_nvkm: > nvkm_device_del(&device); > return ret; > @@ -799,7 +794,6 @@ nouveau_drm_device_remove(struct drm_device *dev) > device = nvkm_device_find(client->device); > > nouveau_drm_device_fini(dev); > - drm_dev_put(dev); > nvkm_device_del(&device); >...
2018 Nov 23
2
[PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init()
...nouveau_drm.c @@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func, goto err_free; } + err = nouveau_drm_device_init(drm); + if (err) + goto err_put; + platform_set_drvdata(pdev, drm); return drm; +err_put: + drm_dev_put(drm); err_free: nvkm_device_del(pdevice); -- 2.19.1
2018 Dec 08
0
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...- /* We need to check that the chipset is supported before booting > - * fbdev off the hardware, as there's no way to put it back. > - */ > - ret = nvkm_device_pci_new(pdev, NULL, "error", true, false, 0, > &device); > - if (ret) > - return ret; > - > - nvkm_device_del(&device); > - > - /* Remove conflicting drivers (vesafb, efifb etc). */ > - aper = alloc_apertures(3); > - if (!aper) > - return -ENOMEM; > - > - aper->ranges[0].base = pci_resource_start(pdev, 1); > - aper->ranges[0].size = pci_resource_len(pdev, 1); > - aper-...
2020 Nov 06
0
[PATCH 2/3] drm/nouveau: manage nouveau_drm lifetime with devres
...ret) - goto fail_drm; + goto fail_nvkm; drm_dev->pdev = pdev; pci_set_drvdata(pdev, drm_dev); @@ -778,8 +775,6 @@ static int nouveau_drm_probe(struct pci_dev *pdev, nouveau_drm_device_fini(drm_dev); fail_pci: pci_disable_device(pdev); -fail_drm: - drm_dev_put(drm_dev); fail_nvkm: nvkm_device_del(&device); return ret; @@ -799,7 +794,6 @@ nouveau_drm_device_remove(struct drm_device *dev) device = nvkm_device_find(client->device); nouveau_drm_device_fini(dev); - drm_dev_put(dev); nvkm_device_del(&device); } @@ -1285,7 +1279,8 @@ nouveau_platform_device_create(const str...
2018 Dec 10
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...chipset is supported before booting >> - * fbdev off the hardware, as there's no way to put it back. >> - */ >> - ret = nvkm_device_pci_new(pdev, NULL, "error", true, false, 0, >> &device); >> - if (ret) >> - return ret; >> - >> - nvkm_device_del(&device); >> - >> - /* Remove conflicting drivers (vesafb, efifb etc). */ >> - aper = alloc_apertures(3); >> - if (!aper) >> - return -ENOMEM; >> - >> - aper->ranges[0].base = pci_resource_start(pdev, 1); >> - aper->ranges[0].size = pci_res...
2020 Oct 13
3
[PATCH] drm/nouveau/device: fix changing endianess code to work on older GPUs
...ns(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index dcb70677d0acc..7851bec5f0e5f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -2924,17 +2924,34 @@ nvkm_device_del(struct nvkm_device **pdevice) } } +/* returns true if the GPU is in the CPU native byte order */ static inline bool nvkm_device_endianness(struct nvkm_device *device) { - u32 boot1 = nvkm_rd32(device, 0x000004) & 0x01000001; #ifdef __BIG_ENDIAN - if (!boot1) - return false; + const bo...
2018 Aug 23
3
[PATCH 0/3] drm/nouveau: Fixup module probe to add ->shutdown()
This series is intended to add support for shutting down the GPU on kernel shutdown/reboot using the ->shutdown() hook, similar to what amdgpu does. This is mainly intended to workaround a bios issue on the P50 that was preventing nouveau from initializing the dedicated GM107 GPU on that system properly. You can find more details on this issue in the patch labeled "Shut down GPU on kernel
2020 May 27
2
[PATCH] nouveau: add fbdev dependency
...port. diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index eb10c80ed853..e8560444ab57 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -697,7 +697,8 @@ static int nouveau_drm_probe(struct pci_dev *pdev, nvkm_device_del(&device); /* Remove conflicting drivers (vesafb, efifb etc). */ - ret = remove_conflicting_pci_framebuffers(pdev, "nouveaufb"); + if (IS_ENABLED(CONFIG_FBDEV)) + ret = remove_conflicting_pci_framebuffers(pdev, "nouveaufb"); if (ret) return ret; -- 2.26.2
2019 Sep 16
6
[PATCH 0/2] drm/nouveau: Two more fixes
From: Thierry Reding <treding at nvidia.com> Hi Ben, I messed up the ordering of patches in my tree a bit, so these two fixes got separated from the others. I don't consider these particularily urgent because the crash that the first one fixes only happens on gp10b which we don't enable by default yet and the second patch fixes a crash that only happens on module unload (or driver
2020 Nov 06
4
[PATCH 0/3] drm/nouveau: extend the lifetime of nouveau_drm
Hi folks, Currently, when the device is removed (or the driver is unbound) the nouveau_drm structure de-allocated. However, it's still accessible from and used by some DRM layer callbacks. For example, file handles can be closed after the device has been removed (physically or otherwise). This series converts the Nouveau device structure to be allocated and de-allocated with the
2016 Sep 26
0
[PATCH v4 1/3] drm/nouveau: set streaming DMA mask early
...cessary for platforms where the default DMA mask of 32 + * does not cover any system memory, i.e., when all RAM is > 4 GB. + */ + dma_set_mask_and_coherent(device->dev, + DMA_BIT_MASK(device->mmu->dma_bits)); + ret = drm_get_pci_dev(pdev, pent, &driver_pci); if (ret) { nvkm_device_del(&device); -- 2.7.4
2019 Sep 16
0
[PATCH 2/2] drm/nouveau: tegra: Do not try to disable PCI device
...nouveau_drm *drm = nouveau_drm(dev); struct nvkm_client *client; struct nvkm_device *device; @@ -727,7 +726,6 @@ nouveau_drm_device_remove(struct drm_device *dev) device = nvkm_device_find(client->device); nouveau_drm_device_fini(dev); - pci_disable_device(pdev); drm_dev_put(dev); nvkm_device_del(&device); } @@ -738,6 +736,7 @@ nouveau_drm_remove(struct pci_dev *pdev) struct drm_device *dev = pci_get_drvdata(pdev); nouveau_drm_device_remove(dev); + pci_disable_device(pdev); } static int -- 2.23.0
2020 Apr 28
0
[PATCH v3 2/3] device: detect if changing endianness failed
...+++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drm/nouveau/nvkm/engine/device/base.c b/drm/nouveau/nvkm/engine/device/base.c index 37589f365..c732074bf 100644 --- a/drm/nouveau/nvkm/engine/device/base.c +++ b/drm/nouveau/nvkm/engine/device/base.c @@ -2924,6 +2924,20 @@ nvkm_device_del(struct nvkm_device **pdevice) } } +static inline bool +nvkm_device_endianness(void __iomem *pri) +{ + u32 boot1 = ioread32_native(pri + 0x000004) & 0x01000001; +#ifdef __BIG_ENDIAN + if (!boot1) + return false; +#else + if (boot1) + return false; +#endif + return true; +} + int nvkm_de...
2020 May 27
0
[PATCH] nouveau: add fbdev dependency
...u/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c > index eb10c80ed853..e8560444ab57 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c > @@ -697,7 +697,8 @@ static int nouveau_drm_probe(struct pci_dev *pdev, > nvkm_device_del(&device); > > /* Remove conflicting drivers (vesafb, efifb etc). */ > - ret = remove_conflicting_pci_framebuffers(pdev, "nouveaufb"); > + if (IS_ENABLED(CONFIG_FBDEV)) > + ret = remove_conflicting_pci_framebuffers(pdev, "nouveaufb&...
2020 Oct 13
0
[PATCH] drm/nouveau/device: fix changing endianess code to work on older GPUs
...drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c > index dcb70677d0acc..7851bec5f0e5f 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c > @@ -2924,17 +2924,34 @@ nvkm_device_del(struct nvkm_device **pdevice) > } > } > > +/* returns true if the GPU is in the CPU native byte order */ > static inline bool > nvkm_device_endianness(struct nvkm_device *device) > { > - u32 boot1 = nvkm_rd32(device, 0x000004) & 0x01000001; > #ifdef...
2020 Apr 17
2
[PATCH 1/3] device: use the correct mmio size when mapping
Fixes warnings on GPUs with smaller a smaller mmio region like vGPUs. Signed-off-by: Karol Herbst <kherbst at redhat.com> --- drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm/nouveau/nvkm/engine/device/base.c b/drm/nouveau/nvkm/engine/device/base.c index 8ebbe1656..17676c75a 100644 --- a/drm/nouveau/nvkm/engine/device/base.c +++
2020 Apr 17
2
[PATCH v2 1/3] device: use the correct mmio size when mapping
Fixes warnings on GPUs with smaller a smaller mmio region like vGPUs. Signed-off-by: Karol Herbst <kherbst at redhat.com> --- drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm/nouveau/nvkm/engine/device/base.c b/drm/nouveau/nvkm/engine/device/base.c index 8ebbe1656..17676c75a 100644 --- a/drm/nouveau/nvkm/engine/device/base.c +++
2018 Jul 03
0
[PATCH] drm/nouveau: Set DRIVER_ATOMIC cap earlier to fix debugfs
...module_param_named(runpm, nouveau_runtime_pm, int, 0400); @@ -509,6 +513,9 @@ static int nouveau_drm_probe(struct pci_dev *pdev, pci_set_master(pdev); + if (nouveau_atomic) + driver_pci.driver_features |= DRIVER_ATOMIC; + ret = drm_get_pci_dev(pdev, pent, &driver_pci); if (ret) { nvkm_device_del(&device); -- 2.17.1
2018 Jul 23
2
[PATCH] drm/nouveau: Set DRIVER_ATOMIC cap earlier to fix debugfs
...module_param_named(runpm, nouveau_runtime_pm, int, 0400); @@ -501,6 +505,9 @@ static int nouveau_drm_probe(struct pci_dev *pdev, pci_set_master(pdev); + if (nouveau_atomic) + driver_pci.driver_features |= DRIVER_ATOMIC; + ret = drm_get_pci_dev(pdev, pent, &driver_pci); if (ret) { nvkm_device_del(&device); diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index bc5c4f2402b4..abe297fda046 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -4441,10 +4441,6 @@ nv50_display_destroy(struct drm_device...