[Spice-devel] [PATCH qxl-wddm-dod v2] Use DEVRAM if no more space is available in VRAM

Frediano Ziglio fziglio at redhat.com
Wed Apr 12 08:27:47 UTC 2017


Previous Windows drivers use mainly DEVRAM so in some environments
(like RHEV-M 4.0) VRAM is really limited.
This patch use DEVRAM as a fallback to avoid getting out of memory
conditions too earlier in such environments.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 qxldod/QxlDod.cpp | 2 ++
 1 file changed, 2 insertions(+)

Changes since v1:
- remove useless check

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 2573b25..813ab44 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -4077,6 +4077,8 @@ void *QxlDevice::AllocMem(UINT32 mspace_type, size_t size, BOOL force)
         FlushReleaseRing();
 
         ptr = mspace_malloc(m_MSInfo[mspace_type]._mspace, size);
+        if (!ptr && mspace_type == MSPACE_TYPE_VRAM)
+            ptr = mspace_malloc(m_MSInfo[MSPACE_TYPE_DEVRAM]._mspace, size);
         if (ptr) {
             break;
         }
-- 
2.9.3



More information about the Spice-devel mailing list