On Tue, Aug 30, 2016 at 6:54 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
Shouldn't this be merged with patch 14 somehow as it is introducing
these #ifdef USE_FRAMEBUFFER in the first place?
Ture, thanks!
Christophe
> ______________________________
On Tue, Aug 09, 2016 at 06:31:06PM +0300, Sameeh Jubran wrote:
> From: Dmitry Fleytman <dmitry@xxxxxxxxxx>
>
> Framebuffer should only be used in VGA mode,
> however the mode is only known at runtime therefore
> framebuffer logic should be active when the driver
> is operating in vga mode only.
>
> Signed-off-by: Sameeh Jubran <sameeh@xxxxxxxxxx>
> Signed-off-by: Dmitry Fleytman <dmitry@xxxxxxxxxx>
> ---
> qxldod/QxlDod.cpp | 21 +++++++++++----------
> qxldod/QxlDod.h | 1 +
> 2 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
> index 74cd259..557d796 100755
> --- a/qxldod/QxlDod.cpp
> +++ b/qxldod/QxlDod.cpp
> @@ -218,9 +218,10 @@ 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
> + if (m_pHWDevice->GetType() == VGA_DEVICE)
> + {
> + UnmapFrameBuffer(m_CurrentModes[Source]. FrameBuffer.Ptr, m_CurrentModes[Source]. DispInfo.Height * m_CurrentModes[Source]. DispInfo.Pitch);
> + }
> m_CurrentModes[Source].FrameBuffer.Ptr = NULL;
> m_CurrentModes[Source].Flags.FrameBufferIsActive = FALSE;
> }
> @@ -1395,10 +1396,11 @@ 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
> + if (m_pHWDevice->GetType() == VGA_DEVICE)
> + {
> + Status = UnmapFrameBuffer(m_CurrentModes[pCommitVidPn-> AffectedVidPnSourceId]. FrameBuffer.Ptr,
> + m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId]. DispInfo.Pitch * m_CurrentModes[pCommitVidPn-> AffectedVidPnSourceId]. DispInfo.Height);
> + }
> m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId]. FrameBuffer.Ptr = NULL;
> m_CurrentModes[pCommitVidPn->AffectedVidPnSourceId].Flags. FrameBufferIsActive = FALSE;
>
> @@ -1525,8 +1527,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)
> + if (m_pHWDevice->GetType() == VGA_DEVICE && !pCurrentBddMode->Flags.DoNotMapOrUnmap)
> {
> // Map the new frame buffer
> QXL_ASSERT(pCurrentBddMode->FrameBuffer.Ptr == NULL);
> @@ -1534,7 +1535,7 @@ NTSTATUS QxlDod::SetSourceModeAndPath(CONST D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo
> pCurrentBddMode->DispInfo.Pitch * pCurrentBddMode->DispInfo. Height,
> &(pCurrentBddMode->FrameBuffer.Ptr));
> }
> -#endif
> +
> if (NT_SUCCESS(Status))
> {
>
> diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
> index 19d172f..e5cb410 100755
> --- a/qxldod/QxlDod.h
> +++ b/qxldod/QxlDod.h
> @@ -263,6 +263,7 @@ public:
> virtual NTSTATUS SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition) = 0;
> virtual NTSTATUS Escape(_In_ CONST DXGKARG_ESCAPE* pEscap) = 0;
> ULONG GetId(void) { return m_Id; }
> + WIN_QXL_DEVICE_TYPE GetType(void) { return m_type; }
> protected:
> virtual NTSTATUS GetModeList(DXGK_DISPLAY_INFORMATION* pDispInfo) = 0;
> protected:
> --
> 2.7.0.windows.1
>
_________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel