Displaying 20 results from an estimated 36 matches for "nouveau_drm_device_fini".
2020 Nov 06
2
[PATCH 2/3] drm/nouveau: manage nouveau_drm lifetime with devres
...;drm->parent;
> @@ -620,7 +617,6 @@ nouveau_drm_device_init(struct drm_device *dev)
> nouveau_cli_fini(&drm->master);
> fail_alloc:
> nvif_parent_dtor(&drm->parent);
> - kfree(drm);
> return ret;
> }
>
> @@ -654,7 +650,6 @@ nouveau_drm_device_fini(struct drm_device *dev)
> nouveau_cli_fini(&drm->client);
> nouveau_cli_fini(&drm->master);
> nvif_parent_dtor(&drm->parent);
> - kfree(drm);
> }
>
> /*
> @@ -720,6 +715,7 @@ static int nouveau_drm_probe(struct pci_dev *pd...
2020 Nov 06
0
[PATCH 2/3] drm/nouveau: manage nouveau_drm lifetime with devres
...t, &drm->parent);
drm->master.base.object.parent = &drm->parent;
@@ -620,7 +617,6 @@ nouveau_drm_device_init(struct drm_device *dev)
nouveau_cli_fini(&drm->master);
fail_alloc:
nvif_parent_dtor(&drm->parent);
- kfree(drm);
return ret;
}
@@ -654,7 +650,6 @@ nouveau_drm_device_fini(struct drm_device *dev)
nouveau_cli_fini(&drm->client);
nouveau_cli_fini(&drm->master);
nvif_parent_dtor(&drm->parent);
- kfree(drm);
}
/*
@@ -720,6 +715,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
{
struct nvkm_device *device;
struct drm_device *drm_...
2018 Dec 07
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...t
-nouveau_drm_load(struct drm_device *dev, unsigned long flags)
+nouveau_drm_device_init(struct drm_device *dev)
{
struct nouveau_drm *drm;
int ret;
@@ -613,7 +546,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
}
static void
-nouveau_drm_unload(struct drm_device *dev)
+nouveau_drm_device_fini(struct drm_device *dev)
{
struct nouveau_drm *drm = nouveau_drm(dev);
@@ -642,18 +575,116 @@ nouveau_drm_unload(struct drm_device *dev)
kfree(drm);
}
+static int nouveau_drm_probe(struct pci_dev *pdev,
+ const struct pci_device_id *pent)
+{
+ struct nvkm_device *device;
+ struct dr...
2018 Dec 08
0
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...ng flags)
> +nouveau_drm_device_init(struct drm_device *dev)
> {
> struct nouveau_drm *drm;
> int ret;
> @@ -613,7 +546,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long
> flags)
> }
>
> static void
> -nouveau_drm_unload(struct drm_device *dev)
> +nouveau_drm_device_fini(struct drm_device *dev)
> {
> struct nouveau_drm *drm = nouveau_drm(dev);
>
> @@ -642,18 +575,116 @@ nouveau_drm_unload(struct drm_device *dev)
> kfree(drm);
> }
>
> +static int nouveau_drm_probe(struct pci_dev *pdev,
> + const struct pci_device_id *pent)...
2020 Mar 10
2
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...| 1 +
3 files changed, 66 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index b65ae817eabf..2c86f0248305 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -618,6 +618,60 @@ nouveau_drm_device_fini(struct drm_device *dev)
kfree(drm);
}
+/*
+ * On some Intel PCIe bridge controllers doing a
+ * D0 -> D3hot -> D3cold -> D0 sequence causes Nvidia GPUs to not reappear.
+ * Skipping the intermediate D3hot step seems to make it work again. This is
+ * probably caused by not meeting the...
2018 Dec 10
2
next/master boot bisection: Oops in nouveau driver on jetson-tk1
...struct drm_device *dev)
>> {
>> struct nouveau_drm *drm;
>> int ret;
>> @@ -613,7 +546,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long
>> flags)
>> }
>>
>> static void
>> -nouveau_drm_unload(struct drm_device *dev)
>> +nouveau_drm_device_fini(struct drm_device *dev)
>> {
>> struct nouveau_drm *drm = nouveau_drm(dev);
>>
>> @@ -642,18 +575,116 @@ nouveau_drm_unload(struct drm_device *dev)
>> kfree(drm);
>> }
>>
>> +static int nouveau_drm_probe(struct pci_dev *pdev,
>> +...
2020 Mar 21
3
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...seeing how that would help.
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index b65ae817eabf..2ad825e8891c 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> @@ -618,6 +618,23 @@ nouveau_drm_device_fini(struct drm_device *dev)
> kfree(drm);
> }
>
> +static void quirk_broken_nv_runpm(struct drm_device *drm_dev)
> +{
> + struct pci_dev *pdev = drm_dev->pdev;
> + struct pci_dev *bridge = pci_upstream_bridge(pdev);
> +
> + if (!bridge || bridge-...
2024 Feb 22
1
[PATCH] drm/nouveau: use dedicated wq for fence uevents work
...ice *dev)
nouveau_cli_fini(&drm->client);
fail_master:
nouveau_cli_fini(&drm->master);
-fail_wq:
+fail_fence_wq:
+ destroy_workqueue(drm->fence_wq);
+fail_sched_wq:
destroy_workqueue(drm->sched_wq);
fail_alloc:
nvif_parent_dtor(&drm->parent);
@@ -725,6 +733,7 @@ nouveau_drm_device_fini(struct drm_device *dev)
nouveau_cli_fini(&drm->client);
nouveau_cli_fini(&drm->master);
+ destroy_workqueue(drm->fence_wq);
destroy_workqueue(drm->sched_wq);
nvif_parent_dtor(&drm->parent);
mutex_destroy(&drm->clients_lock);
diff --git a/drivers/gpu/drm...
2020 Nov 03
4
[PATCH 0/3] drm/nouveau: fix a use-after-free in postclose()
This series fixes a number of use-after-frees in nouveau's postclose()
handler. It was discovered by pointing IGT's core_hotunplug tests at a
nouveau device, but the steps to reproduce it are simple:
1. Open the device file
2. Unbind the driver or remove the device
3. Close the file opened in step 1.
During the device removal, the nouveau_drm structure is de-allocated,
but is
2024 Feb 23
1
[PATCH] drm/nouveau: use dedicated wq for fence uevents work
...aster);
> > -fail_wq:
> > +fail_fence_wq:
> > + destroy_workqueue(drm->fence_wq);
> > +fail_sched_wq:
> > destroy_workqueue(drm->sched_wq);
> > fail_alloc:
> > nvif_parent_dtor(&drm->parent);
> > @@ -725,6 +733,7 @@ nouveau_drm_device_fini(struct drm_device *dev)
> >
> > nouveau_cli_fini(&drm->client);
> > nouveau_cli_fini(&drm->master);
> > + destroy_workqueue(drm->fence_wq);
> > destroy_workqueue(drm->sched_wq);
> > nvif_parent_dtor(&d...
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 Mar 03
2
[PATCH v6] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...| 1 +
3 files changed, 65 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2cd83849600f..51d3a7ba7731 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -618,6 +618,59 @@ nouveau_drm_device_fini(struct drm_device *dev)
kfree(drm);
}
+/*
+ * On some Intel PCIe bridge controllers doing a
+ * D0 -> D3hot -> D3cold -> D0 sequence causes Nvidia GPUs to not reappear.
+ * Skipping the intermediate D3hot step seems to make it work again. Thise is
+ * probably caused by not meeting th...
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
2019 Sep 16
0
[PATCH 2/2] drm/nouveau: tegra: Do not try to disable PCI device
...emove(struct drm_device *dev)
{
- struct pci_dev *pdev = dev->pdev;
struct 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 Mar 20
0
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...cap,
but I'm sure the driver could keep it somewhere.
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index b65ae817eabf..2ad825e8891c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -618,6 +618,23 @@ nouveau_drm_device_fini(struct drm_device *dev)
kfree(drm);
}
+static void quirk_broken_nv_runpm(struct drm_device *drm_dev)
+{
+ struct pci_dev *pdev = drm_dev->pdev;
+ struct pci_dev *bridge = pci_upstream_bridge(pdev);
+
+ if (!bridge || bridge->vendor != PCI_VENDOR_ID_INTEL)
+ return;
+
+ switch (bridge-&g...
2020 Apr 15
2
[PATCH AUTOSEL 5.6 084/129] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
.../nouveau_drv.h | 2 +
2 files changed, 65 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index b65ae817eabf5..2d4c899e1f8b9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -618,6 +618,64 @@ nouveau_drm_device_fini(struct drm_device *dev)
kfree(drm);
}
+/*
+ * On some Intel PCIe bridge controllers doing a
+ * D0 -> D3hot -> D3cold -> D0 sequence causes Nvidia GPUs to not reappear.
+ * Skipping the intermediate D3hot step seems to make it work again. This is
+ * probably caused by not meeting the...
2020 Mar 24
1
[PATCH v8] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...au/nouveau_drv.h | 2 +
2 files changed, 65 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2cd83849600f..b1beed40e746 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -618,6 +618,64 @@ nouveau_drm_device_fini(struct drm_device *dev)
kfree(drm);
}
+/*
+ * On some Intel PCIe bridge controllers doing a
+ * D0 -> D3hot -> D3cold -> D0 sequence causes Nvidia GPUs to not reappear.
+ * Skipping the intermediate D3hot step seems to make it work again. This is
+ * probably caused by not meeting the...
2020 Mar 24
0
[PATCH v7] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...> >
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> > index b65ae817eabf..2ad825e8891c 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> > @@ -618,6 +618,23 @@ nouveau_drm_device_fini(struct drm_device *dev)
> > kfree(drm);
> > }
> >
> > +static void quirk_broken_nv_runpm(struct drm_device *drm_dev)
> > +{
> > + struct pci_dev *pdev = drm_dev->pdev;
> > + struct pci_dev *bridge = pci_upstream_bridge(pdev);
> &g...
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 Apr 22
0
[PATCH 5.4 076/118] drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges
.../nouveau_drv.h | 2 +
2 files changed, 65 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2cd83849600f3..b1beed40e746a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -618,6 +618,64 @@ nouveau_drm_device_fini(struct drm_device *dev)
kfree(drm);
}
+/*
+ * On some Intel PCIe bridge controllers doing a
+ * D0 -> D3hot -> D3cold -> D0 sequence causes Nvidia GPUs to not reappear.
+ * Skipping the intermediate D3hot step seems to make it work again. This is
+ * probably caused by not meeting the...