<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 30, 2016 at 6:54 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Shouldn't this be merged with patch 14 somehow as it is introducing<br>
these #ifdef USE_FRAMEBUFFER in the first place?<br></blockquote><div>Ture, thanks! </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Christophe<br>
<div><div class="h5"><br>
On Tue, Aug 09, 2016 at 06:31:06PM +0300, Sameeh Jubran wrote:<br>
> From: Dmitry Fleytman <<a href="mailto:dmitry@daynix.com">dmitry@daynix.com</a>><br>
><br>
> Framebuffer should only be used in VGA mode,<br>
> however the mode is only known at runtime therefore<br>
> framebuffer logic should be active when the driver<br>
> is operating in vga mode only.<br>
><br>
> Signed-off-by: Sameeh Jubran <<a href="mailto:sameeh@daynix.com">sameeh@daynix.com</a>><br>
> Signed-off-by: Dmitry Fleytman <<a href="mailto:dmitry@daynix.com">dmitry@daynix.com</a>><br>
> ---<br>
>  qxldod/QxlDod.cpp | 21 +++++++++++----------<br>
>  qxldod/QxlDod.h   |  1 +<br>
>  2 files changed, 12 insertions(+), 10 deletions(-)<br>
><br>
> diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp<br>
> index 74cd259..557d796 100755<br>
> --- a/qxldod/QxlDod.cpp<br>
> +++ b/qxldod/QxlDod.cpp<br>
> @@ -218,9 +218,10 @@ VOID QxlDod::CleanUp(VOID)<br>
>      {<br>
>          if (m_CurrentModes[Source].<wbr>FrameBuffer.Ptr)<br>
>          {<br>
> -#ifdef USE_FRAMEBUFFER<br>
> -            UnmapFrameBuffer(m_<wbr>CurrentModes[Source].<wbr>FrameBuffer.Ptr, m_CurrentModes[Source].<wbr>DispInfo.Height * m_CurrentModes[Source].<wbr>DispInfo.Pitch);<br>
> -#endif<br>
> +            if (m_pHWDevice->GetType() == VGA_DEVICE)<br>
> +            {<br>
> +                UnmapFrameBuffer(m_<wbr>CurrentModes[Source].<wbr>FrameBuffer.Ptr, m_CurrentModes[Source].<wbr>DispInfo.Height * m_CurrentModes[Source].<wbr>DispInfo.Pitch);<br>
> +            }<br>
>              m_CurrentModes[Source].<wbr>FrameBuffer.Ptr = NULL;<br>
>              m_CurrentModes[Source].Flags.<wbr>FrameBufferIsActive = FALSE;<br>
>          }<br>
> @@ -1395,10 +1396,11 @@ NTSTATUS QxlDod::CommitVidPn(_In_ CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPn)<br>
>      if (m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>FrameBuffer.Ptr &&<br>
>          !m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].Flags.<wbr>DoNotMapOrUnmap)<br>
>      {<br>
> -#ifdef USE_FRAMEBUFFER<br>
> -        Status = UnmapFrameBuffer(m_<wbr>CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>FrameBuffer.Ptr,<br>
> -                                  m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>DispInfo.Pitch * m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>DispInfo.Height);<br>
> -#endif<br>
> +        if (m_pHWDevice->GetType() == VGA_DEVICE)<br>
> +        {<br>
> +            Status = UnmapFrameBuffer(m_<wbr>CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>FrameBuffer.Ptr,<br>
> +                m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>DispInfo.Pitch * m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>DispInfo.Height);<br>
> +        }<br>
>          m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].<wbr>FrameBuffer.Ptr = NULL;<br>
>          m_CurrentModes[pCommitVidPn-><wbr>AffectedVidPnSourceId].Flags.<wbr>FrameBufferIsActive = FALSE;<br>
><br>
> @@ -1525,8 +1527,7 @@ NTSTATUS QxlDod::SetSourceModeAndPath(<wbr>CONST D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo<br>
>      pCurrentBddMode->DispInfo.<wbr>Height = pSourceMode-><a href="http://Format.Graphics.PrimSurfSize.cy" rel="noreferrer" target="_blank">Format.Graphics.<wbr>PrimSurfSize.cy</a>;<br>
>      pCurrentBddMode->DispInfo.<wbr>Pitch = pSourceMode-><a href="http://Format.Graphics.PrimSurfSize.cx" rel="noreferrer" target="_blank">Format.Graphics.<wbr>PrimSurfSize.cx</a> * BPPFromPixelFormat(<wbr>pCurrentBddMode->DispInfo.<wbr>ColorFormat) / BITS_PER_BYTE;<br>
><br>
> -#ifdef USE_FRAMEBUFFER<br>
> -    if (!pCurrentBddMode->Flags.<wbr>DoNotMapOrUnmap)<br>
> +    if (m_pHWDevice->GetType() == VGA_DEVICE && !pCurrentBddMode->Flags.<wbr>DoNotMapOrUnmap)<br>
>      {<br>
>          // Map the new frame buffer<br>
>          QXL_ASSERT(pCurrentBddMode-><wbr>FrameBuffer.Ptr == NULL);<br>
> @@ -1534,7 +1535,7 @@ NTSTATUS QxlDod::SetSourceModeAndPath(<wbr>CONST D3DKMDT_VIDPN_SOURCE_MODE* pSourceMo<br>
>                                  pCurrentBddMode->DispInfo.<wbr>Pitch * pCurrentBddMode->DispInfo.<wbr>Height,<br>
>                                  &(pCurrentBddMode-><wbr>FrameBuffer.Ptr));<br>
>      }<br>
> -#endif<br>
> +<br>
>      if (NT_SUCCESS(Status))<br>
>      {<br>
><br>
> diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h<br>
> index 19d172f..e5cb410 100755<br>
> --- a/qxldod/QxlDod.h<br>
> +++ b/qxldod/QxlDod.h<br>
> @@ -263,6 +263,7 @@ public:<br>
>      virtual NTSTATUS SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition) = 0;<br>
>      virtual NTSTATUS Escape(_In_ CONST DXGKARG_ESCAPE* pEscap) = 0;<br>
>      ULONG GetId(void) { return m_Id; }<br>
> +    WIN_QXL_DEVICE_TYPE GetType(void) { return m_type; }<br>
>  protected:<br>
>      virtual NTSTATUS GetModeList(DXGK_DISPLAY_<wbr>INFORMATION* pDispInfo) = 0;<br>
>  protected:<br>
> --<br>
> 2.7.0.windows.1<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.<wbr>org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/spice-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font size="4" color="#0b5394" face="times new roman, serif">Respectfully,<br></font><div style="font-size:12.8px;color:rgb(136,136,136)"><font size="4" color="#0b5394" face="times new roman, serif"><b><i>Sameeh Jubran</i></b></font></div><div style="font-size:12.8px;color:rgb(136,136,136)"><i style="color:rgb(7,55,99);font-family:"times new roman",serif;font-size:large"><span style="line-height:15px"><a href="https://il.linkedin.com/pub/sameeh-jubran/87/747/a8a" title="View public profile" name="UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_14e2c1de96f8c195_UNIQUE_ID_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_webProfileURL" style="color:rgb(17,85,204);margin:0px;padding:0px;border-width:0px;outline:none;vertical-align:baseline;text-decoration:none" target="_blank">Linkedin</a></span></i><br></div><div style="font-size:12.8px;color:rgb(136,136,136)"><font size="4" face="times new roman, serif" color="#073763"><i>Junior Software Engineer @ <a href="http://www.daynix.com" target="_blank">Daynix</a>.</i></font></div></div></div></div></div></div></div>
</div></div>