diff options
author | Uri Lublin <uril@redhat.com> | 2011-07-14 16:15:56 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-07-31 17:22:45 +0300 |
commit | 3969e0b891233c00839bdad592dd88f6ef160ff5 (patch) | |
tree | ed3bd7dbccb9b3ccc2b529682d741ee7be20f4c7 | |
parent | 4029350783dcf61a9ffde552705674c9f91d6e39 (diff) |
spice: qxl driver: support PnP surprise removal #721118
This was (kind-of) cherry-picked from qspice (rhev-2.2) commit
commit 1d467e6be87eedb3b0ad2723468fb5555192b9a2, that fixes
rhbz #581514
-rw-r--r-- | display/res.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/display/res.c b/display/res.c index 00f7f21..5d28184 100644 --- a/display/res.c +++ b/display/res.c @@ -224,6 +224,9 @@ static _inline void CursorCmdAddRes(PDev *pdev, QXLCursorCmd *cmd, Resource *res AddRes(pdev, output, res); } +#define SUPPORT_SURPRISE_REMOVE + + /* Called with cursor_sem held */ static void WaitForCursorRing(PDev* pdev) { @@ -237,7 +240,7 @@ static void WaitForCursorRing(PDev* pdev) if (!wait) { break; } -#ifdef DBG +#ifdef SUPPORT_SURPRISE_REMOVE { LARGE_INTEGER timeout; // 1 => 100 nanoseconds timeout.QuadPart = -1 * (1000 * 1000 * 10); //negative => relative // 1s @@ -248,7 +251,7 @@ static void WaitForCursorRing(PDev* pdev) } #else WAIT_FOR_EVENT(pdev, pdev->cursor_event, NULL); -#endif //DBG +#endif //SUPPORT_SURPRISE_REMOVE } } @@ -267,7 +270,7 @@ static void WaitForCmdRing(PDev* pdev) } DEBUG_PRINT((pdev, 9, "%s: 0x%lx\n", __FUNCTION__, pdev)); -#ifdef DBG +#ifdef SUPPORT_SURPRISE_REMOVE { LARGE_INTEGER timeout; // 1 => 100 nanoseconds timeout.QuadPart = -1 * (1000 * 1000 * 10); //negative => relative // 1s @@ -278,7 +281,7 @@ static void WaitForCmdRing(PDev* pdev) } #else WAIT_FOR_EVENT(pdev, pdev->display_event, NULL); -#endif //DBG +#endif //SUPPORT_SURPRISE_REMOVE } } |