On Mon, Feb 19, 2018 at 10:38:04AM +0100, Pierre Moreau wrote: > My bad; I did test suspend/resume, but not unbinding. Shouldn???t that > happen on shutdown as well, as the driver gets unloaded? I don???t remember > seeing that issue there though.
Sorry Pierre, I missed this question and am seeing it only now on saving the message away: On shutdown the driver isn't unloaded, rather the driver core walks the device hierarchy bottom-up in device_shutdown() and, for PCI- enumerated GPUs, invokes the bus shutdown hook pci_device_shutdown(). This in turn would normally invoke ->shutdown in nouveau_drm_pci_driver, but we haven't defined it. So the only thing that happens is that pci_device_shutdown() runtime resumes the device and optionally turns off busmastering if a kexec kernel is going to be loaded. So that's mostly fine, the only silly thing is that we shouldn't runtime resume the GPU if it's runtime suspended, only to turn off power immediately afterwards. I submitted a patch to the PCI subsystem a while ago but it was received with some skepticism, I'll have to respin it one of these days or come up with a better solution: https://patchwork.kernel.org/patch/9337553/ Thanks, Lukas _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
