From: Sandy Stutsman <sstut...@redhat.com>

WDDM DOD driver doesn't touch the frame buffer (bar0), so no reason to map in 
into memory.
Especially as there were rare BSOD failures when the mapping failed.  Leaving 
the code
in place so it clear where the frame buffer should be mapped if we need to do 
it in the future.
---
 qxldod/QxlDod.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index e6c4ada..ff987c4 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -218,7 +218,9 @@ VOID QxlDod::CleanUp(VOID)
     {
         if (m_CurrentModes[Source].FrameBuffer.Ptr)
         {
+#ifdef USE_FRAMEBUFFER
             UnmapFrameBuffer(m_CurrentModes[Source].FrameBuffer.Ptr, 
m_CurrentModes[Source].DispInfo.Height * m_CurrentModes[Source].DispInfo.Pitch);
+#endif
             m_CurrentModes[Source].FrameBuffer.Ptr = NULL;
             m_CurrentModes[Source].Flags.FrameBufferIsActive = FALSE;
         }
@@ -1393,8 +1395,10 @@ NTSTATUS QxlDod::CommitVidPn(_In_ CONST 
DXGKARG_COMMITVIDPN* CONST pCommitVidPn)
     if (m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].FrameBuffer.Ptr &&
         
!m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].Flags.DoNotMapOrUnmap)
     {
+#ifdef USE_FRAMEBUFFER
         Status = 
UnmapFrameBuffer(m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].FrameBuffer.Ptr,
                                   
m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].DispInfo.Pitch * 
m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].DispInfo.Height);
+#endif
         m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].FrameBuffer.Ptr = 
NULL;
         
m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].Flags.FrameBufferIsActive = 
FALSE;
 
@@ -1521,7 +1525,7 @@ NTSTATUS QxlDod::SetSourceModeAndPath(CONST 
D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo
     pCurrentBddMode->DispInfo.Height = 
pSourceMode->Format.Graphics.PrimSurfSize.cy;
     pCurrentBddMode->DispInfo.Pitch = 
pSourceMode->Format.Graphics.PrimSurfSize.cx * 
BPPFromPixelFormat(pCurrentBddMode->DispInfo.ColorFormat) / BITS_PER_BYTE;
 
-
+#ifdef USE_FRAMEBUFFER
     if (!pCurrentBddMode->Flags.DoNotMapOrUnmap)
     {
         // Map the new frame buffer
@@ -1530,7 +1534,7 @@ NTSTATUS QxlDod::SetSourceModeAndPath(CONST 
D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo
                                 pCurrentBddMode->DispInfo.Pitch * 
pCurrentBddMode->DispInfo.Height,
                                 &(pCurrentBddMode->FrameBuffer.Ptr));
     }
-
+#endif
     if (NT_SUCCESS(Status))
     {
 
-- 
1.8.3.1

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

Reply via email to