[PATCH qxl-wddm-dod v2 07/25] On power wake call the init functions before setting the vidpn to black. Otherwise, BSOD.

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

 



---
 qxldod/QxlDod.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 1c6e477..fae5c92 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -283,12 +283,16 @@ NTSTATUS QxlDod::SetPowerState(_In_  ULONG HardwareUid,
                                _In_  DEVICE_POWER_STATE DevicePowerState,
                                _In_  POWER_ACTION       ActionType)
 {
+    NTSTATUS Status(STATUS_SUCCESS);
     PAGED_CODE();
     DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s HardwareUid = 0x%x ActionType = %s DevicePowerState = %s AdapterPowerState = %s\n", __FUNCTION__, HardwareUid, DbgPowerActionString(ActionType), DbgDevicePowerString(DevicePowerState), DbgDevicePowerString(m_AdapterPowerState)));
 
     if (HardwareUid == DISPLAY_ADAPTER_HW_ID)
     {
-        if (DevicePowerState == PowerDeviceD0)
+        // There is nothing to do to specifically power up/down the display adapter
+        Status = m_pHWDevice->SetPowerState(DevicePowerState, &(m_CurrentModes[0].DispInfo));
+
+        if (NT_SUCCESS(Status) && DevicePowerState == PowerDeviceD0)
         {
 
             // When returning from D3 the device visibility defined to be off for all targets
@@ -299,17 +303,13 @@ NTSTATUS QxlDod::SetPowerState(_In_  ULONG HardwareUid,
                 Visibility.Visible = FALSE;
                 SetVidPnSourceVisibility(&Visibility);
             }
+            // Store new adapter power state
+            m_AdapterPowerState = DevicePowerState;
         }
-
-        // Store new adapter power state
-        m_AdapterPowerState = DevicePowerState;
-
-        // There is nothing to do to specifically power up/down the display adapter
-        return m_pHWDevice->SetPowerState(DevicePowerState, &(m_CurrentModes[0].DispInfo));
     }
     // TODO: This is where the specified monitor should be powered up/down
     
-    return STATUS_SUCCESS;
+    return Status;
 }
 
 NTSTATUS QxlDod::QueryChildRelations(_Out_writes_bytes_(ChildRelationsSize) DXGK_CHILD_DESCRIPTOR* pChildRelations,
-- 
2.7.0.windows.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]