Re: Discrete Nvidia GPU shutdown with recent kernel / BIOS (on T440s laptop) - Should be automatic with runtime pm now ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,


Thanks for the details.


>> tl;dr : Should device allowed to do runtime pm that have no driver go
>> to D3 on their own ?
>
> Quick answer: See the comments at the start of local_pci_probe() in
> drivers/pci/pci-driver.c.  PCI devices without a kernel driver are
> always left in D0, regardless of the runtime PM status.  This is
> because userspace may try to use the device, and the kernel wouldn't
> know to take the device out of D3 when that happens.

Does linux expose some way for userspace to transition the device to
another power state without the need for a driver ?

I looked at the docs and tried poking some of the sysfs files, but
except enabling/disabling the runtme pm, I couldn't really change
anything, but maybe I missed something.


>>  And should pci root bridge go to D3 when all the
>> device on them are on D3 ?
>
> I don't know the answer to that.  It's probably closely related to the
> issue of whether PCI bridges need to have a kernel driver.

OK.

Do you know if there could be any adverse effect of transitioning it myself ?

Basically I'm doing this when turning off the card :

struct pci_dev *port_dev = pci_upstream_bridge(pdev);

pci_save_state(port_dev);
pci_clear_master(port_dev);
pci_disable_device(port_dev);
pci_set_power_state(port_dev, PCI_D3hot);


And this when waking it up :

pci_set_power_state(port_dev, PCI_D0);
pci_restore_state(port_dev);
pci_enable_device(port_dev);
pci_set_master(port_dev);

(I removed the return value checking to make the code more concise here).


Cheers,

   Sylvain
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux