Disable runtime idle and D3 in WDF

Hi,

I am coming up with a driver for Windows 10 for my FPGA, and I am having trouble keeping the device in D0. While the device claims D3 capability, given that it is an FPGA it cannot handle D3hot & D3cold. Is there an easy way to disable this functionality in WDF? The driver is not the power policy owner, so not sure how we can disable the device from entering D3.

thanks!

If you are not the power policy owner, there is only one thing you can do. You need to send io // or whatever it is that the power policy owner uses to keep the device powered on to the policy owner. IOW you need to convince the policy owner not to idle.

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
Sent: Monday, April 10, 2017 10:45:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disable runtime idle and D3 in WDF

Hi,

I am coming up with a driver for Windows 10 for my FPGA, and I am having trouble keeping the device in D0. While the device claims D3 capability, given that it is an FPGA it cannot handle D3hot & D3cold. Is there an easy way to disable this functionality in WDF? The driver is not the power policy owner, so not sure how we can disable the device from entering D3.

thanks!


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

xxxxx@yahoo.com wrote:

I am coming up with a driver for Windows 10 for my FPGA, and I am having trouble keeping the device in D0. While the device claims D3 capability, given that it is an FPGA it cannot handle D3hot & D3cold.

I find your last sentence confusing. Why do you think an FPGA cannot
handle the D3 states? Is your programming volatile? You don’t have a
way to load the FPGA from EEPROM?

How is your FPGA connected? Is it on a PCI device? USB?

Is there an easy way to disable this functionality in WDF? The driver is not the power policy owner, so not sure how we can disable the device from entering D3.

There’s a more disturbing aspect to this. If you have an inbox driver
that is enforcing power state transitions, it’s possible that whatever
bus you’re connected to requires that behavior. If so, then your only
real choice is to change your hardware to survive a D0->D3->D0 transition.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

hi Tim, Doron,

Thanks for the responses, Yes the FPGA is connected via PCI. The d3 support is expected in future revisions, but the current revision was meant for SW development of the data stacks, so we are trying to get by, by avoiding the D3 transition.

Would WdfDeviceStopIdle help?

xxxxx@yahoo.com wrote:

Thanks for the responses, Yes the FPGA is connected via PCI. The d3 support is expected in future revisions, but the current revision was meant for SW development of the data stacks, so we are trying to get by, by avoiding the D3 transition.

Can’t you just alter your PCI configuration space to remove the “power
management” capability? If you don’t advertise the support, then the
bus can’t kill your power.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Only the power policy owner can call WdfDeviceStopIdle

Bent from my phone


From: xxxxx@lists.osr.com on behalf of xxxxx@yahoo.com
Sent: Tuesday, April 11, 2017 11:16:00 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Disable runtime idle and D3 in WDF

hi Tim, Doron,

Thanks for the responses, Yes the FPGA is connected via PCI. The d3 support is expected in future revisions, but the current revision was meant for SW development of the data stacks, so we are trying to get by, by avoiding the D3 transition.

Would WdfDeviceStopIdle help?


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:>

Hi Doron,
For my own edification, i thought the device driver is the power policy owner by default?
“By default, for framework-based drivers, the device’s function driver is the power policy owner.” from https://msdn.microsoft.com/en-us/windows/hardware/drivers/wdf/power-policy-ownership

Venkat, what is causing the device transition to D3?

xxxxx@yahoo.com wrote:

For my own edification, i thought the device driver is the power policy owner by default?
“By default, for framework-based drivers, the device’s function driver is the power policy owner.” from https://msdn.microsoft.com/en-us/windows/hardware/drivers/wdf/power-policy-ownership

The function driver is the power policy owner. The OP told us he is not
the PPO, so I assume he is a filter driver, and not the function driver.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Interesting. Mine is actually a function driver. Let me take a look to see why I thought the driver may not be the power policy owner.

> @venkat_narain said: > Interesting. Mine is actually a function driver. Let me take a look to see why I thought the driver may not be the power policy owner. Hi did u figure this out… I am also facing similar issues. If u could help it would be useful

Replying to a 3 year old post?

Peter