[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACAvsv4RUe7RpRFcOqigyKMdXm-z0VaiF7RqVHL1bGmRALU3kw@mail.gmail.com>
Date: Fri, 2 Aug 2019 09:45:36 +1000
From: Ben Skeggs <skeggsb@...il.com>
To: Lyude Paul <lyude@...hat.com>
Cc: ML nouveau <nouveau@...ts.freedesktop.org>,
linux-pci@...r.kernel.org, Lukas Wunner <lukas@...ner.de>,
Aaron Plattner <aplattner@...dia.com>,
Maik Freudenberg <hhfeuer@....de>,
linux-kernel@...r.kernel.org, Daniel Drake <drake@...lessm.com>,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [Nouveau] [PATCH] PCI: Use pci_reset_bus() in quirk_reset_lenovo_thinkpad_50_nvgpu()
On Fri, 2 Aug 2019 at 08:01, Lyude Paul <lyude@...hat.com> wrote:
>
> Since quirk_nvidia_hda() was added there's now two nvidia device
> functions on any laptops with nvidia GPUs: the HDA controller, and the
> GPU itself. Unfortunately this has the sideaffect of breaking
> quirk_reset_lenovo_thinkpad_50_nvgpu() since pci_reset_function() was
> using pci_parent_bus_reset() to reset the GPU's respective PCI bus, and
> pci_parent_bus_reset() does not work on busses which have more then a
> single device function present.
>
> So, fix this by simply calling pci_reset_bus() instead which properly
> resets the GPU bus and all device functions under it, including both the
> GPU and the HDA controller.
>
> Fixes: b516ea586d71 ("PCI: Enable NVIDIA HDA controllers")
> Cc: Lukas Wunner <lukas@...ner.de>
> Cc: Daniel Drake <drake@...lessm.com>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Aaron Plattner <aplattner@...dia.com>
> Cc: Peter Wu <peter@...ensteyn.nl>
> Cc: Ilia Mirkin <imirkin@...m.mit.edu>
> Cc: Karol Herbst <kherbst@...hat.com>
> Cc: Maik Freudenberg <hhfeuer@....de>
> Cc: linux-pci@...r.kernel.org
> Signed-off-by: Lyude Paul <lyude@...hat.com>
Acked-by: Ben Skeggs <bskeggs@...hat.com>
> ---
> drivers/pci/quirks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 208aacf39329..44c4ae1abd00 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -5256,7 +5256,7 @@ static void quirk_reset_lenovo_thinkpad_p50_nvgpu(struct pci_dev *pdev)
> */
> if (ioread32(map + 0x2240c) & 0x2) {
> pci_info(pdev, FW_BUG "GPU left initialized by EFI, resetting\n");
> - ret = pci_reset_function(pdev);
> + ret = pci_reset_bus(pdev);
> if (ret < 0)
> pci_err(pdev, "Failed to reset GPU: %d\n", ret);
> }
> --
> 2.21.0
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
Powered by blists - more mailing lists