Displaying 20 results from an estimated 50 matches for "pci_raw_set_power_st".
2019 Oct 16
2
[PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...roken_child_pm(struct pci_dev *dev)
> > +{
> > + if (!dev->bus || !dev->bus->self)
> > + return false;
> > + return dev->bus->self->broken_nv_runpm && dev->broken_nv_runpm;
> > +}
> > +
> > /**
> > * pci_raw_set_power_state - Use PCI PM registers to set the power state of
> > * given PCI device
> > @@ -850,6 +857,10 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
> > || (state == PCI_D2 && !dev->d2_support))
> >...
2019 Sep 27
2
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...ge->vendor != PCI_VENDOR_ID_INTEL)
+ return false;
+
+ for (i = 0; i < ARRAY_SIZE(intel_broken_d3_bridges); i++) {
+ if (bridge->device == intel_broken_d3_bridges[i]) {
+ pci_err(bridge, "found broken intel bridge\n");
+ return true;
+ }
+ }
+
+ return false;
+}
+
/**
* pci_raw_set_power_state - Use PCI PM registers to set the power state of
* given PCI device
@@ -827,6 +863,9 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
if (state < PCI_D0 || state > PCI_D3hot)
return -EINVAL;
+ if (state != PCI_D0 && intel_broken_pci_pm(d...
2019 Oct 16
3
[PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...; skipped.
>
> If I understand correctly, when we put a device in D3cold on an ACPI
> system, we do something like this:
>
> pci_set_power_state(D3cold)
> if (PCI_DEV_FLAGS_NO_D3)
> return 0 <-- nothing at all if quirked
> pci_raw_set_power_state
> pci_write_config_word(PCI_PM_CTRL, D3hot) <-- set to D3hot
> __pci_complete_power_transition(D3cold)
> pci_platform_power_transition(D3cold)
> platform_pci_set_power_state(D3cold)
> acpi_pci_set_power_state(D3cold)
> acpi_devi...
2019 Sep 30
4
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...veau 0000:01:00.0: DRM: MM: using COPY for buffer copies
> Sep 30 17:24:27 kernel: [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1
>
> I would assume it runtime suspends here. Then it wakes up because of PCI
> access from userspace:
>
> Sep 30 17:24:42 kernel: pci_raw_set_power_state: 56 callbacks suppressed
>
> and for some reason it does not get resumed properly. There are also few
> warnings from ACPI that might be relevant:
>
> Sep 30 17:24:27 kernel: ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20...
2019 Oct 16
4
[PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...urn pci_platform_pm ? pci_platform_pm->bridge_d3(dev) : false;
}
+static inline bool parent_broken_child_pm(struct pci_dev *dev)
+{
+ if (!dev->bus || !dev->bus->self)
+ return false;
+ return dev->bus->self->broken_nv_runpm && dev->broken_nv_runpm;
+}
+
/**
* pci_raw_set_power_state - Use PCI PM registers to set the power state of
* given PCI device
@@ -850,6 +857,10 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
|| (state == PCI_D2 && !dev->d2_support))
return -EIO;
+ /* check if the bus controller causes issues...
2019 Oct 16
0
[PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...pen, just the D3hot step should be
> skipped.
If I understand correctly, when we put a device in D3cold on an ACPI
system, we do something like this:
pci_set_power_state(D3cold)
if (PCI_DEV_FLAGS_NO_D3)
return 0 <-- nothing at all if quirked
pci_raw_set_power_state
pci_write_config_word(PCI_PM_CTRL, D3hot) <-- set to D3hot
__pci_complete_power_transition(D3cold)
pci_platform_power_transition(D3cold)
platform_pci_set_power_state(D3cold)
acpi_pci_set_power_state(D3cold)
acpi_device_set_power(ACPI_STATE_D3_COL...
2019 Oct 01
2
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...; > > Sep 30 17:24:27 kernel: [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1
> > >
> > > I would assume it runtime suspends here. Then it wakes up because of PCI
> > > access from userspace:
> > >
> > > Sep 30 17:24:42 kernel: pci_raw_set_power_state: 56 callbacks suppressed
> > >
> > > and for some reason it does not get resumed properly. There are also few
> > > warnings from ACPI that might be relevant:
> > >
> > > Sep 30 17:24:27 kernel: ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mism...
2019 Sep 27
0
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...dge, "found broken intel bridge\n");
If this ends up being a hardware defect, we should use a quirk to set
a bit in the pci_dev once, as we do for broken_intx_masking and
similar bits.
> + return true;
> + }
> + }
> +
> + return false;
> +}
> +
> /**
> * pci_raw_set_power_state - Use PCI PM registers to set the power state of
> * given PCI device
> @@ -827,6 +863,9 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
> if (state < PCI_D0 || state > PCI_D3hot)
> return -EINVAL;
>
> + if (state != PCI_D0 &a...
2019 Oct 16
0
[PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...) : false;
> }
>
> +static inline bool parent_broken_child_pm(struct pci_dev *dev)
> +{
> + if (!dev->bus || !dev->bus->self)
> + return false;
> + return dev->bus->self->broken_nv_runpm && dev->broken_nv_runpm;
> +}
> +
> /**
> * pci_raw_set_power_state - Use PCI PM registers to set the power state of
> * given PCI device
> @@ -850,6 +857,10 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
> || (state == PCI_D2 && !dev->d2_support))
> return -EIO;
>
> + /* check if the...
2019 Sep 30
0
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...ridge_d3(struct pci_dev *dev)
return pci_platform_pm ? pci_platform_pm->bridge_d3(dev) : false;
}
+static inline bool parent_broken_child_pm(struct pci_dev *dev)
+{
+ if (!dev->bus || !dev->bus->self)
+ return false;
+ return dev->bus->self->broken_child_pm;
+}
+
/**
* pci_raw_set_power_state - Use PCI PM registers to set the power state of
* given PCI device
@@ -844,6 +851,10 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
|| (state == PCI_D2 && !dev->d2_support))
return -EIO;
+ /* check if the bus controller causes issues...
2019 Oct 01
2
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...; > > Sep 30 17:24:27 kernel: [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1
> > >
> > > I would assume it runtime suspends here. Then it wakes up because of PCI
> > > access from userspace:
> > >
> > > Sep 30 17:24:42 kernel: pci_raw_set_power_state: 56 callbacks suppressed
> > >
> > > and for some reason it does not get resumed properly. There are also few
> > > warnings from ACPI that might be relevant:
> > >
> > > Sep 30 17:24:27 kernel: ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mism...
2017 Sep 13
2
Nouveau: kernel hang on Optimus+Intel+NVidia GeForce 1060m
...waking up, ACPI turns the power
> on, apparently successfully (Device [PEGP] transitioned to D0). But a
> read from the PCI bus to get the power state & other flags return
> 65535 (~0) and the kernel fails to set the device in D0 (although ACPI
> claims it is in D0)
> The call to pci_raw_set_power_state (in drivers/pci/pci.c) seems to
> fail because pci_read_config_word returns "~0" (and does not return
> any error code)
>
> I have tried different things; if I use pcie_port_pm=off, the NVidia
> card goes to state D3Hot (if I am not mistaken, its PCIE port is still
>...
2019 Sep 30
2
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
still happens with your patch applied. The machine simply gets shut down.
dmesg can be found here:
https://gist.githubusercontent.com/karolherbst/40eb091c7b7b33ef993525de660f1a3b/raw/2380e31f566e93e5ba7c87ef545420965d4c492c/gistfile1.txt
If there are no other things to try out, I will post the updated patch shortly.
On Mon, Sep 30, 2019 at 11:29 AM Mika Westerberg
<mika.westerberg at
2017 Sep 11
2
Nouveau: kernel hang on Optimus+Intel+NVidia GeForce 1060m
Hi Tobias,
On Mon, Sep 11, 2017 at 8:49 PM, Tobias Klausmann <
tobias.johannes.klausmann at mni.thm.de> wrote:
> Hi,
>
> i remember seeing the same error with earlier firmware version with a
> similar system (GP106) once in a while on boot, yet it does not happen
> with newer versions. Maybe you could try to update the firmware to the
> latest version from
2017 Nov 21
2
[PATCH v2] drm: don't continue with anything after the GPU couldn't be woken up
On Tue, Nov 21, 2017 at 6:46 PM, Thierry Reding
<thierry.reding at gmail.com> wrote:
> On Tue, Nov 21, 2017 at 04:01:16PM +0100, Karol Herbst wrote:
>> This should make systems more stable where resuming the GPU fails. This
>> can happen due to bad firmware or due to a bug within the kernel. The
>> last thing which should happen in either case is an unusable system.
2019 Oct 17
4
[PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
.../pci/quirks.c | 53 ++++++++++++++++++++++++++++++++++++++++++++
include/linux/pci.h | 1 +
3 files changed, 61 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b97d9e10c9cc..02e71e0bcdd7 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -850,6 +850,13 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
|| (state == PCI_D2 && !dev->d2_support))
return -EIO;
+ /*
+ * check if we have a bad combination of bridge controller and nvidia
+ * GPU, see quirk_broken_nv_runpm for more info
+ */
+ if (state != PCI_D0 && dev->...
2020 Mar 03
2
[PATCH v6] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
...pci_get_drvdata(pdev);
+ /* revert our workaround */
+ pdev->parent_d3cold = false;
nouveau_drm_device_remove(dev);
}
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 951099279192..6ece05723fa2 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -860,6 +860,14 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
|| (state == PCI_D2 && !dev->d2_support))
return -EIO;
+ /*
+ * Power management can be disabled for certain devices as they don't
+ * come back up later on runtime_resume. We rely on platform means to
+ * cut power consumption...
2019 Oct 01
1
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...zed nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1
> > > > >
> > > > > I would assume it runtime suspends here. Then it wakes up because of PCI
> > > > > access from userspace:
> > > > >
> > > > > Sep 30 17:24:42 kernel: pci_raw_set_power_state: 56 callbacks suppressed
> > > > >
> > > > > and for some reason it does not get resumed properly. There are also few
> > > > > warnings from ACPI that might be relevant:
> > > > >
> > > > > Sep 30 17:24:27 kernel: ACPI W...
2018 Nov 27
2
4.20.0-rc3 nouveau/Quadro P2000 Mobile: runpm causing ACPI errors, lockups
...[ 52.917084] ACPI Error: Method parse/execution failed \_SB.PCI0.PEG0.PG00._ON, AE_AML_LOOP_TIMEOUT (20181003/psparse-516)
[ 52.917108] acpi device:00: Failed to change power state to D0
[ 52.969287] video LNXVIDEO:00: Cannot transition to power state D0 for parent in (unknown)
[ 52.969289] pci_raw_set_power_state: 2 callbacks suppressed
[ 52.969291] nouveau 0000:01:00.0: Refused to change power state, currently in D3
[ 53.029514] video LNXVIDEO:00: Cannot transition to power state D0 for parent in (unknown)
[ 53.041027] nouveau 0000:01:00.0: Refused to change power state, currently in D3
[ 53.041...
2019 Sep 27
2
[RFC PATCH] pci: prevent putting pcie devices into lower device states on certain intel bridges
...nd
> similar bits.
okay, if you think this is the preferred way then I can change the
patch accordingly.
>
> > + return true;
> > + }
> > + }
> > +
> > + return false;
> > +}
> > +
> > /**
> > * pci_raw_set_power_state - Use PCI PM registers to set the power state of
> > * given PCI device
> > @@ -827,6 +863,9 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
> > if (state < PCI_D0 || state > PCI_D3hot)
> > r...