Re: [Spice-devel] [Qemu-devel] [PATCH Qemu] Change spice-server protocol for GL texture passing

2016-07-18 Thread Marc-André Lureau
Hi

- Original Message -
> Forgot to add RFC to the subject
> 

What's the rationale? if you share the texture id, you must share the GL 
context too, right? Why not use a lower level dmabuf fd that can be imported by 
the server gl context (which is also what the protocol require anyway)?

> 
> > 
> > ---
> >  ui/spice-core.c|  5 -
> >  ui/spice-display.c | 29 -
> >  2 files changed, 8 insertions(+), 26 deletions(-)
> > 
> > diff --git a/ui/spice-core.c b/ui/spice-core.c
> > index da05054..f7647f7 100644
> > --- a/ui/spice-core.c
> > +++ b/ui/spice-core.c
> > @@ -828,11 +828,6 @@ void qemu_spice_init(void)
> >  
> >  #ifdef HAVE_SPICE_GL
> >  if (qemu_opt_get_bool(opts, "gl", 0)) {
> > -if ((port != 0) || (tls_port != 0)) {
> > -error_report("SPICE GL support is local-only for now and "
> > - "incompatible with -spice port/tls-port");
> > -exit(1);
> > -}
> >  if (egl_rendernode_init() != 0) {
> >  error_report("Failed to initialize EGL render node for SPICE
> >  GL");
> >  exit(1);
> > diff --git a/ui/spice-display.c b/ui/spice-display.c
> > index 2a77a54..72137bd 100644
> > --- a/ui/spice-display.c
> > +++ b/ui/spice-display.c
> > @@ -852,6 +852,10 @@ static void qemu_spice_gl_block_timer(void *opaque)
> >  static QEMUGLContext qemu_spice_gl_create_context(DisplayChangeListener
> >  *dcl,
> >QEMUGLParams *params)
> >  {
> > +SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
> > +
> > +spice_qxl_gl_init(>qxl, qemu_egl_display, qemu_egl_rn_ctx);
> > +
> >  eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
> > qemu_egl_rn_ctx);
> >  return qemu_egl_create_context(dcl, params);
> > @@ -864,28 +868,11 @@ static void
> > qemu_spice_gl_scanout(DisplayChangeListener
> > *dcl,
> >uint32_t w, uint32_t h)
> >  {
> >  SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
> > -EGLint stride = 0, fourcc = 0;
> > -int fd = -1;
> > -
> > -if (tex_id) {
> > -fd = egl_get_fd_for_texture(tex_id, , );
> > -if (fd < 0) {
> > -fprintf(stderr, "%s: failed to get fd for texture\n",
> > __func__);
> > -return;
> > -}
> > -dprint(1, "%s: %dx%d (stride %d, fourcc 0x%x)\n", __func__,
> > -   w, h, stride, fourcc);
> > -} else {
> > -dprint(1, "%s: no texture (no framebuffer)\n", __func__);
> > -}
> > -
> > -assert(!tex_id || fd >= 0);
> >  
> > -/* note: spice server will close the fd */
> > -spice_qxl_gl_scanout(>qxl, fd,
> > - surface_width(ssd->ds),
> > - surface_height(ssd->ds),
> > - stride, fourcc, y_0_top);
> > +spice_qxl_gl_scanout_texture(>qxl, tex_id,
> > + surface_width(ssd->ds),
> > + surface_height(ssd->ds),
> > + y_0_top);
> >  
> >  qemu_spice_gl_monitor_config(ssd, x, y, w, h);
> >  }
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk PATCH egl] egl: Fix usage of Vertex Array Object

2016-07-18 Thread Lukas Venhoda
VAO shouldn't be bound indefinitely.

Move glEnableVertexAttribArray and glVertexAttribPointer to init.
These settings and currently bound Vertex Buffer Object will be saved to VAO.
Unbinding VAO will set these to default (unbinding them).

Instead of calling these settings every frame, bind VAO before draw call,
and unbind it afterwards.

Setting VertexAttribPointer only once could be much faster in some situations,
where the display driver might try to optimize the binding.
With VAO these optimalisations are saved and reused.
---
 src/spice-widget-egl.c  | 28 ++--
 src/spice-widget-priv.h |  1 +
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 0698af3..0d7eb6c 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -147,9 +147,9 @@ static gboolean spice_egl_init_shaders(SpiceDisplay 
*display, GError **err)
 
 glUniform1i(tex_loc, 0);
 
-/* we only use one VAO, so we always keep it bound */
 glGenVertexArrays(1, );
 glBindVertexArray(buf);
+d->egl.vao_id = buf;
 
 glGenBuffers(1, );
 glBindBuffer(GL_ARRAY_BUFFER, buf);
@@ -162,6 +162,17 @@ static gboolean spice_egl_init_shaders(SpiceDisplay 
*display, GError **err)
 glGenTextures(1, >egl.tex_id);
 glGenTextures(1, >egl.tex_pointer_id);
 
+glEnableVertexAttribArray(d->egl.attr_pos);
+glVertexAttribPointer(d->egl.attr_pos, 4, GL_FLOAT,
+  GL_FALSE, 0, 0);
+
+glEnableVertexAttribArray(d->egl.attr_tex);
+glVertexAttribPointer(d->egl.attr_tex, 2, GL_FLOAT,
+  GL_FALSE, 0,
+  (void *)VERTS_ARRAY_SIZE);
+
+glBindVertexArray(0);
+
 success = TRUE;
 
 end:
@@ -445,35 +456,24 @@ draw_rect_from_arrays(SpiceDisplay *display, const void 
*verts, const void *tex)
 {
 SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
 
-glBindBuffer(GL_ARRAY_BUFFER, d->egl.vbuf_id);
+glBindVertexArray(d->egl.vao_id);
 
 if (verts) {
-glEnableVertexAttribArray(d->egl.attr_pos);
 glBufferSubData(GL_ARRAY_BUFFER,
 0,
 VERTS_ARRAY_SIZE,
 verts);
-glVertexAttribPointer(d->egl.attr_pos, 4, GL_FLOAT,
-  GL_FALSE, 0, 0);
 }
 if (tex) {
-glEnableVertexAttribArray(d->egl.attr_tex);
 glBufferSubData(GL_ARRAY_BUFFER,
 VERTS_ARRAY_SIZE,
 TEX_ARRAY_SIZE,
 tex);
-glVertexAttribPointer(d->egl.attr_tex, 2, GL_FLOAT,
-  GL_FALSE, 0,
-  (void *)VERTS_ARRAY_SIZE);
 }
 
 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-if (verts)
-glDisableVertexAttribArray(d->egl.attr_pos);
-if (tex)
-glDisableVertexAttribArray(d->egl.attr_tex);
 
-glBindBuffer(GL_ARRAY_BUFFER, 0);
+glBindVertexArray(0);
 }
 
 static GLvoid
diff --git a/src/spice-widget-priv.h b/src/spice-widget-priv.h
index e36baf3..641e78e 100644
--- a/src/spice-widget-priv.h
+++ b/src/spice-widget-priv.h
@@ -136,6 +136,7 @@ struct _SpiceDisplayPrivate {
 EGLConfig   conf;
 EGLContext  ctx;
 gintmproj, attr_pos, attr_tex;
+guint   vao_id;
 guint   vbuf_id;
 guint   tex_id;
 guint   tex_pointer_id;
-- 
2.7.4

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


Re: [Spice-devel] [PATCH RFC 00/12] Remote Virgl support

2016-07-18 Thread David Jaša
Hi,

On Po, 2016-07-18 at 16:16 +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > > What is the state of the hardware supported encoding?
> > > How can we pass buffers to the hardware encoder? 
> > 
> > The state here is a bit of a mess.
> > One reason to pass texture instead of dma buffers is that we use gstreamer
> > and gstreamer for hardware acceleration uses VAAPI and one way to pass
> > frames to VAAPI is to use GL textures. There is a quite strong requirement
> > that dma buffers should be mmap-able in gstreamer but this is not true.
> > Note that in theory VAAPI can import DRM prime/dma buffers however this is
> > currently not exported/implemented by gstreamer-vaapi.
> 
> Any chance to extend gstreamer-vaapi?
> 
> > The current status of hardware encoding is a bit confusing.
> > On one side there is VAAPI which should be an independent (from card brand)
> > library to use hardware decoding/encoding however some vendor (like Nvidia)
> > seems not really keen on supporting it for encoding (the binding for Nvidia
> > is using vdpau which is limited to decoding). VAAPI was proposed by Intel
> > so for Intel is really good.
> 
> Hmm.  But vaapi support is pretty much required to have gstreamer handle
> video encoding for us I guess?
> 
> > On the other side we could have patent/licensing issues due to the fact that
> > main encoding supported (basically mpeg2, h264, hevc) all have patents while
> > more open encoding (vp8, vp9) are not currently widely supported.
> 
> That is nasty indeed.  Recent intel hardware supports vp8 + vp9 too.
> Nvidia is H.264 only as far I know.
> 
> Not sure if offloading the encoding to the hardware helps with the
> patent situation.  At least we don't have to ship a (cpu) software
> encoder then.  But possibly some kind of firmware or gpu program must be
> uploaded ...
> 

Cisco's OpenH264 encodes and decodes basic profile of h.264 and Cisco is
covering patent fees for anybody who uses it. It is not shipped with
everybody's OS by default but given the motivation and implementation,
it should be available pretty much anywhere in quite near term (it
actually is available on most systems running Firefox - but it Firefox's
directories, not system ones).

Cisco already provides a Fedora repo with decoder packaged for Firefox
and Gstreamer. Given that, we could probably depend on h.264 basic being
available universally pretty soon.

David

Fedora's OpenH264 wiki page: https://fedoraproject.org/wiki/OpenH264

> > >  (1) Extend the display channel interface to have callbacks for these
> > >  (and thin wrapper functions which map spice display channel to
> > >  QemuConsole so spice-server doesn't need to worry about that).
> > > 
> > 
> > So you mean a way for spice-server display channel to call some Qemu
> > function, right?
> 
> Yes.  Add function pointers to QXLInterface & raise minor display
> channel interface version should do.
> 
> > >  (2) Have qemu create one context per spice-server (or per display
> > >  channel) and create a new spice_server_set_egl_context() function
> > >  to hand over the context to spice-server.
> > > 
> > 
> > Yes, I added a spice_qxl_gl_init function which set display and context.
> 
> Ah, didn't notice that on the first check.  Yes, that looks good
> interface-wise.  Possibly we should create a new context instead of
> reusing qemu_egl_rn_ctx.  But that doesn't affect the spice-server
> interface.
> 
> But can you make that a separate patch please?
> 
> > Probably I feel more confident having more flexibility as is not clear
> > the resulting information we need.
> 
> I surely don't want to rush things on the interface side.  I think we
> should have at least a proof-of-concept implementation showing the
> qemu/spice-server we created actually works before merging things.
> 
> > Another stuff I would like to have changed in Qemu is the number of
> > pending frames sent by it. I think that a single frame is not enough.
> > There should be at least 2/3 frames. The reason is that streaming/network
> > requires more time and would be better if there could be one frame which
> > is encoding/pending and one which is new which could be replaced by a
> > new frame that will arrive if encoding/network is not fast enough.
> 
> Hmm.  The guest will not give us 2-3 frames though.  We'll have either
> one or two, depending on whenever the guest uses page-flips or not.  So
> implementing a buffering scheme as outlined above requires us to copy
> (or let the gpu copy) the frames.
> 
> Question is where to do it best.  It is doable in qemu and spice-server.
> But spice-server knows more about the network/encoder state and can
> possibly avoid the copy, for example in case it isn't going the encode
> the frame anyway due to full network buffers, or in case no client is
> connected in the first place.
> 
> cheers,
>   Gerd
> 
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> 

Re: [Spice-devel] [PATCH RFC 00/12] Remote Virgl support

2016-07-18 Thread Gerd Hoffmann
  Hi,

> > What is the state of the hardware supported encoding?
> > How can we pass buffers to the hardware encoder? 
> 
> The state here is a bit of a mess.
> One reason to pass texture instead of dma buffers is that we use gstreamer
> and gstreamer for hardware acceleration uses VAAPI and one way to pass
> frames to VAAPI is to use GL textures. There is a quite strong requirement
> that dma buffers should be mmap-able in gstreamer but this is not true.
> Note that in theory VAAPI can import DRM prime/dma buffers however this is
> currently not exported/implemented by gstreamer-vaapi.

Any chance to extend gstreamer-vaapi?

> The current status of hardware encoding is a bit confusing.
> On one side there is VAAPI which should be an independent (from card brand)
> library to use hardware decoding/encoding however some vendor (like Nvidia)
> seems not really keen on supporting it for encoding (the binding for Nvidia
> is using vdpau which is limited to decoding). VAAPI was proposed by Intel
> so for Intel is really good.

Hmm.  But vaapi support is pretty much required to have gstreamer handle
video encoding for us I guess?

> On the other side we could have patent/licensing issues due to the fact that
> main encoding supported (basically mpeg2, h264, hevc) all have patents while
> more open encoding (vp8, vp9) are not currently widely supported.

That is nasty indeed.  Recent intel hardware supports vp8 + vp9 too.
Nvidia is H.264 only as far I know.

Not sure if offloading the encoding to the hardware helps with the
patent situation.  At least we don't have to ship a (cpu) software
encoder then.  But possibly some kind of firmware or gpu program must be
uploaded ...

> >  (1) Extend the display channel interface to have callbacks for these
> >  (and thin wrapper functions which map spice display channel to
> >  QemuConsole so spice-server doesn't need to worry about that).
> > 
> 
> So you mean a way for spice-server display channel to call some Qemu
> function, right?

Yes.  Add function pointers to QXLInterface & raise minor display
channel interface version should do.

> >  (2) Have qemu create one context per spice-server (or per display
> >  channel) and create a new spice_server_set_egl_context() function
> >  to hand over the context to spice-server.
> > 
> 
> Yes, I added a spice_qxl_gl_init function which set display and context.

Ah, didn't notice that on the first check.  Yes, that looks good
interface-wise.  Possibly we should create a new context instead of
reusing qemu_egl_rn_ctx.  But that doesn't affect the spice-server
interface.

But can you make that a separate patch please?

> Probably I feel more confident having more flexibility as is not clear
> the resulting information we need.

I surely don't want to rush things on the interface side.  I think we
should have at least a proof-of-concept implementation showing the
qemu/spice-server we created actually works before merging things.

> Another stuff I would like to have changed in Qemu is the number of
> pending frames sent by it. I think that a single frame is not enough.
> There should be at least 2/3 frames. The reason is that streaming/network
> requires more time and would be better if there could be one frame which
> is encoding/pending and one which is new which could be replaced by a
> new frame that will arrive if encoding/network is not fast enough.

Hmm.  The guest will not give us 2-3 frames though.  We'll have either
one or two, depending on whenever the guest uses page-flips or not.  So
implementing a buffering scheme as outlined above requires us to copy
(or let the gpu copy) the frames.

Question is where to do it best.  It is doable in qemu and spice-server.
But spice-server knows more about the network/encoder state and can
possibly avoid the copy, for example in case it isn't going the encode
the frame anyway due to full network buffers, or in case no client is
connected in the first place.

cheers,
  Gerd

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


Re: [Spice-devel] [spice-gtk PATCH v1] EGL: Update shader version to 330

2016-07-18 Thread Lukas Venhoda
SELF NACK

We require OpenGL 3.0 after all

Got confused by this part of code:

static const EGLint ctx_att[] = {
#ifdef EGL_CONTEXT_MAJOR_VERSION
EGL_CONTEXT_MAJOR_VERSION, 3,
#else
EGL_CONTEXT_CLIENT_VERSION, 3,
#endif
EGL_NONE
};

Still, do we really need to support OGL 3.0?
Basically all hardware since 2006 supports OGL 3.3 and up, with most of it
skipping 3.0 - 3.2 altogether
Intel GPUs support it since Sandy Bridge, but before that they supported
only version 2.1


On Mon, Jul 18, 2016 at 10:44 AM, Lukas Venhoda  wrote:

> Since spice-widget-egl already requires Opengl 3.3,
> change shader version from 130 (OGL3.0) to 330 (OGL3.3)
>
> This change enables more advanced features in OpenGL shaders.
> ---
>  src/spice-widget-egl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
> index 0698af3..2b34271 100644
> --- a/src/spice-widget-egl.c
> +++ b/src/spice-widget-egl.c
> @@ -37,7 +37,7 @@
>
>  static const char *spice_egl_vertex_src =   \
>  "   \
> -  #version 130\n\
> +  #version 330\n\
>  \
>in vec4 position; \
>in vec2 texcoords;\
> @@ -53,7 +53,7 @@ static const char *spice_egl_vertex_src =   \
>
>  static const char *spice_egl_fragment_src = \
>  "   \
> -  #version 130\n\
> +  #version 330\n\
>  \
>in vec2 tcoords;  \
>out vec4 fragmentColor;   \
> --
> 2.7.4
>
>
-- 
Lukas Venhoda
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] how we can use more effectively spice protocol alternate to windows RDP

2016-07-18 Thread Sabit Numan Ari
Hello,

Can i please get an update/information for my e-mail please?
I am looking forward to hear about from you.

Kind regards.


Sabit Numan ARI
Senior System Engineer


[gantek_renkli_logo]

Tel

:+90 216 538 80 65

Mobile

:+90 5322758814

Fax

:+90 216 322 04 43

E-mail

:sabit@gantek.com

Address

:S.Sinan Eroglu Cad. No: 3 Kavacik



34805 Istanbul, TURKEY

Web

: www.gantek.com

[cid:image002.png@01D185C8.3729BA50]Please consider the environment before 
printing this e-mail.
"This message and attachments are confidential and intended solely for the 
individual(s) stated in this message. If you received this message although you 
are not the addressed you are responsible to keep the message confidential. The 
sender has no responsibility for the accuracy or correctness of the information 
in the message and its attachments. Our company shall have no liability for any 
changes or late receiving, loss of integrity and confidentiality, viruses and 
any damages caused in anyway to your computer system."

From: Sabit Numan Ari
Sent: Thursday, June 30, 2016 12:54 PM
To: 'spice-devel@lists.freedesktop.org'
Cc: Asiye Yigit
Subject: how we can use more effectively spice protocol alternate to windows RDP

Hello Dear Developer Team;
we have a big issue related to using spice protocol on Centos. we are trying to 
find out an alternative way to windows RDP protocol.
however, we saw that spice protocol is consunimg 2 times much bandwith than 
windows RDP.
will you please tell us how  we can configure spice in order to use the less 
bandwith than windows RDP?
If we achieve this problem, we can replace all windows terminal server with 
Linux environment.
please guide us.
best regards;



Sabit Numan ARI
Senior System Engineer


[gantek_renkli_logo]

Tel

:+90 216 538 80 65

Mobile

:+90 5322758814

Fax

:+90 216 322 04 43

E-mail

:sabit@gantek.com

Address

:S.Sinan Eroglu Cad. No: 3 Kavacik



34805 Istanbul, TURKEY

Web

: www.gantek.com

[cid:image002.png@01D185C8.3729BA50]Please consider the environment before 
printing this e-mail.
"This message and attachments are confidential and intended solely for the 
individual(s) stated in this message. If you received this message although you 
are not the addressed you are responsible to keep the message confidential. The 
sender has no responsibility for the accuracy or correctness of the information 
in the message and its attachments. Our company shall have no liability for any 
changes or late receiving, loss of integrity and confidentiality, viruses and 
any damages caused in anyway to your computer system."

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


Re: [Spice-devel] [PATCH RFC 00/12] Remote Virgl support

2016-07-18 Thread Frediano Ziglio
> 
> On Fr, 2016-07-15 at 14:49 +0100, Frediano Ziglio wrote:
> > This patch is an improve to last one. There are still many work
> > to be done. The main reason I'm posting is to discuss the Qemu
> > API changes ("Define a new interface for Qemu to pass texture"
> > patch). This code add dependency to EGL directly.
> 
> I'm not convinced it is a good idea to pass around texture ids instead
> of dma bufs, especially as we'll also receive dma-bufs in the future
> (intel-vgpu will export the guest display as dma-buf).
> 
> > The main idea is still extracting raw data and passing to the
> > normal flow (display_channel_process_draw).
> 
> What is the state of the hardware supported encoding?
> How can we pass buffers to the hardware encoder?
> 

The state here is a bit of a mess.
One reason to pass texture instead of dma buffers is that we use gstreamer
and gstreamer for hardware acceleration uses VAAPI and one way to pass
frames to VAAPI is to use GL textures. There is a quite strong requirement
that dma buffers should be mmap-able in gstreamer but this is not true.
Note that in theory VAAPI can import DRM prime/dma buffers however this is
currently not exported/implemented by gstreamer-vaapi.

The current status of hardware encoding is a bit confusing.
On one side there is VAAPI which should be an independent (from card brand)
library to use hardware decoding/encoding however some vendor (like Nvidia)
seems not really keen on supporting it for encoding (the binding for Nvidia
is using vdpau which is limited to decoding). VAAPI was proposed by Intel
so for Intel is really good.
On the other side we could have patent/licensing issues due to the fact that
main encoding supported (basically mpeg2, h264, hevc) all have patents while
more open encoding (vp8, vp9) are not currently widely supported.

> > Changes from last version:
> > - this set supports all cards using a different protocol from Qemu
> >   that now can pass EGL information (display and context) and
> >   texture directly. This allows spice-server to choose dma buffers
> >   or just GL data;
> 
> I think we should decouple the scanout buffer passing and the egl
> context handling.
> 
> qemu already has functions for context management in ui/console.h:
> 
>   QEMUGLContext dpy_gl_ctx_create(QemuConsole *con,
>   QEMUGLParams *params);
>   void dpy_gl_ctx_destroy(QemuConsole *con, QEMUGLContext ctx);
>   int dpy_gl_ctx_make_current(QemuConsole *con, QEMUGLContext ctx);
>   QEMUGLContext dpy_gl_ctx_get_current(QemuConsole *con);
> 
> We should use them to create a EGL context for spice-server.  I can
> think of two ways to do this:
> 
>  (1) Extend the display channel interface to have callbacks for these
>  (and thin wrapper functions which map spice display channel to
>  QemuConsole so spice-server doesn't need to worry about that).
> 

So you mean a way for spice-server display channel to call some Qemu
function, right?

>  (2) Have qemu create one context per spice-server (or per display
>  channel) and create a new spice_server_set_egl_context() function
>  to hand over the context to spice-server.
> 

Yes, I added a spice_qxl_gl_init function which set display and context.
Note that we need display too. In order to support gstreamer GL upload
(I still have to learn how to do it) passing display/context is required.
This as VAAPI and gstreamer will setup their contexts too.

> (2) is simpler, (1) is more flexible.  Not sure we actually need the
> flexibility though.
> 
> cheers,
>   Gerd
> 
> 

Probably I feel more confident having more flexibility as is not clear
the resulting information we need.
For instance one issue is how to initialize VAAPI which is encapsulated
inside gstreamer in order to setup the library when we don't have a
X/Wayland display. This to support server/daemon setups.
VAAPI is able to initialize a VADisplay (which is the first handle
representing basically the card) using the DRM handle but this should
be the same card used by Qemu.

Another stuff I would like to have changed in Qemu is the number of
pending frames sent by it. I think that a single frame is not enough.
There should be at least 2/3 frames. The reason is that streaming/network
requires more time and would be better if there could be one frame which
is encoding/pending and one which is new which could be replaced by a
new frame that will arrive if encoding/network is not fast enough.

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


Re: [Spice-devel] [PATCH RFC 00/12] Remote Virgl support

2016-07-18 Thread Gerd Hoffmann
On Fr, 2016-07-15 at 14:49 +0100, Frediano Ziglio wrote:
> This patch is an improve to last one. There are still many work
> to be done. The main reason I'm posting is to discuss the Qemu
> API changes ("Define a new interface for Qemu to pass texture"
> patch). This code add dependency to EGL directly.

I'm not convinced it is a good idea to pass around texture ids instead
of dma bufs, especially as we'll also receive dma-bufs in the future
(intel-vgpu will export the guest display as dma-buf).

> The main idea is still extracting raw data and passing to the
> normal flow (display_channel_process_draw).

What is the state of the hardware supported encoding?
How can we pass buffers to the hardware encoder?

> Changes from last version:
> - this set supports all cards using a different protocol from Qemu
>   that now can pass EGL information (display and context) and
>   texture directly. This allows spice-server to choose dma buffers
>   or just GL data;

I think we should decouple the scanout buffer passing and the egl
context handling.

qemu already has functions for context management in ui/console.h:

  QEMUGLContext dpy_gl_ctx_create(QemuConsole *con,
  QEMUGLParams *params);
  void dpy_gl_ctx_destroy(QemuConsole *con, QEMUGLContext ctx);
  int dpy_gl_ctx_make_current(QemuConsole *con, QEMUGLContext ctx);
  QEMUGLContext dpy_gl_ctx_get_current(QemuConsole *con);

We should use them to create a EGL context for spice-server.  I can
think of two ways to do this:

 (1) Extend the display channel interface to have callbacks for these
 (and thin wrapper functions which map spice display channel to
 QemuConsole so spice-server doesn't need to worry about that).

 (2) Have qemu create one context per spice-server (or per display
 channel) and create a new spice_server_set_egl_context() function
 to hand over the context to spice-server.

(2) is simpler, (1) is more flexible.  Not sure we actually need the
flexibility though.

cheers,
  Gerd

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


[Spice-devel] [spice-gtk PATCH v1] EGL: Update shader version to 330

2016-07-18 Thread Lukas Venhoda
Since spice-widget-egl already requires Opengl 3.3,
change shader version from 130 (OGL3.0) to 330 (OGL3.3)

This change enables more advanced features in OpenGL shaders.
---
 src/spice-widget-egl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 0698af3..2b34271 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -37,7 +37,7 @@
 
 static const char *spice_egl_vertex_src =   \
 "   \
-  #version 130\n\
+  #version 330\n\
 \
   in vec4 position; \
   in vec2 texcoords;\
@@ -53,7 +53,7 @@ static const char *spice_egl_vertex_src =   \
 
 static const char *spice_egl_fragment_src = \
 "   \
-  #version 130\n\
+  #version 330\n\
 \
   in vec2 tcoords;  \
   out vec4 fragmentColor;   \
-- 
2.7.4

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


Re: [Spice-devel] [RFC PATCH qxl-wddm-dod 02/28] Add printer class to dump debug print statements to kernel debugger output

2016-07-18 Thread Frediano Ziglio
> 
> From: Sandy Stutsman 
> 
> Allows the usage of Kd_IHVVIDEO_Mask to control print level while debugging
> ---
>  qxldod/driver.cpp | 24 +++-
>  qxldod/driver.h   | 22 ++
>  2 files changed, 41 insertions(+), 5 deletions(-)
> 
> diff --git a/qxldod/driver.cpp b/qxldod/driver.cpp
> index 4d1913c..2098421 100755
> --- a/qxldod/driver.cpp
> +++ b/qxldod/driver.cpp
> @@ -667,7 +667,29 @@ void DebugPrintFunc(const char *format, ...)
>  va_start(list, format);
>  vDbgPrintEx(DPFLTR_DEFAULT_ID, 9 | DPFLTR_MASK, format, list);
>  }
> +ULONG kd_debug_printer::_xlate [] = { 0, 0, 1, 2, 3 };
> +

This can be const.
Also can be a static inside kd_debug_printer::kd_debug_printer.

> +kd_debug_printer::kd_debug_printer(ULONG level) : _off(FALSE)
> +{
> +if (!level || level > 5) {
> +_off = TRUE;
> +_level = 0x;
> +
> +}
> +else {
> +_level = _xlate[level - 1];
> +}
> +}
> +
> +void kd_debug_printer::print(const char * fmt, ...)
> +{
> +va_list list;
> +va_start(list, fmt);
> +if (_off) {
> +return;
> +}
> +vDbgPrintEx(DPFLTR_IHVVIDEO_ID, _level, fmt, list);


If you call va_start you should also call va_end, so perhaps

   if (_off) {
   return;
   }
   va_list list;
   va_start(list, fmt);
   vDbgPrintEx(DPFLTR_IHVVIDEO_ID, _level, fmt, list);
   va_end(list);

> +}
>  #endif
>  
>  #pragma code_seg(pop) // End Non-Paged Code
> -
> diff --git a/qxldod/driver.h b/qxldod/driver.h
> index e64c098..d7f7bf8 100755
> --- a/qxldod/driver.h
> +++ b/qxldod/driver.h
> @@ -208,15 +208,29 @@ DodSystemDisplayWrite(
>  _In_  UINT  PositionY);
>  
>  #if DBG
> +class kd_debug_printer
> +{
> +public:
> +kd_debug_printer(ULONG level);
> +void print(const char * fmt, ...);
> +private:
> +ULONG _level;
> +BOOLEAN _off;

why not bool?
I think that _off == TRUE it's the same as _level == 0x.

> +static ULONG _xlate[6];

_xlate contains just 5 items.

> + };
>  
>  extern int nDebugLevel;
>  void DebugPrintFuncSerial(const char *format, ...);
>  
> -void DebugPrintFunc(const char *format, ...);
> +void DebugPrintFunc(const char *format, ...);
> +
> +#define DbgPrint(level, line)   \
> +if (level > nDebugLevel) {} \
> +else {  \
> +   DebugPrintFuncSerial line;   \
> + }  \
> + kd_debug_printer(level).print line
>

I would use the classic do {} while(0) trick instead of the
empty statement but it's just question of style.
  
> -#define DbgPrint(level, line) \
> -if (level > nDebugLevel) {} \
> -else DebugPrintFuncSerial line
>  #else
>  #define DbgPrint(level, line)
>  #endif

Why not using variadic macros?
But probably does not fit in this patch anyway.

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


Re: [Spice-devel] [RFC PATCH vdagent 14/16] Adding ioctl operation to update Vdagent state

2016-07-18 Thread Frediano Ziglio
> 
> From: Sameeh Jubran 
> 
> This patch adds new ioctl operation to Vdagent in order to update
> the driver on Vdagent state. This allows the driver to know
> when Vdagent is running and when it is off.
> 
> Signed-off-by: Sameeh Jubran 
> Signed-off-by: Dmitry Fleytman 
> ---
>  vdagent/desktop_layout.cpp| 21 +
>  vdagent/desktop_layout.h  |  1 +
>  vdagent/display_configuration.cpp | 15 +++
>  vdagent/display_configuration.h   |  2 ++
>  4 files changed, 39 insertions(+)
> 
> diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp
> index 7aff7e7..a8d9e2d 100644
> --- a/vdagent/desktop_layout.cpp
> +++ b/vdagent/desktop_layout.cpp
> @@ -44,6 +44,7 @@ DesktopLayout::DesktopLayout()
>  
>  DesktopLayout::~DesktopLayout()
>  {
> +set_vdagent_running_for_displays(false);
>  clean_displays();
>  if (_display_config){
>  delete _display_config;
> @@ -122,6 +123,8 @@ void DesktopLayout::set_displays()
>  DWORD display_id = 0;
>  int dev_sets = 0;
>  
> +set_vdagent_running_for_displays(true);
> +
>  lock();
>  if (!consistent_displays()) {
>  unlock();
> @@ -276,6 +279,22 @@ bool DesktopLayout::get_qxl_device_id(WCHAR* device_key,
> DWORD* device_id)
>  return key_found;
>  }
>  
> +void DesktopLayout::set_vdagent_running_for_displays(bool running)
> +{
> +DISPLAY_DEVICE dev_info;
> +DWORD dev_id = 0;
> +lock();
> +ZeroMemory(_info, sizeof(dev_info));
> +dev_info.cb = sizeof(dev_info);
> +while (EnumDisplayDevices(NULL, dev_id, _info, 0)) {
> +dev_id++;
> +if (!(dev_info.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) &&
> wcsstr(dev_info.DeviceString, L"QXL")) {
> +_display_config->set_vdagent_running(dev_info.DeviceName,
> running);
> +}
> +}
> +unlock();
> +}
> +
>  bool DesktopLayout::init_dev_mode(LPCTSTR dev_name, DEVMODE* dev_mode,
>  DisplayMode* mode)
>  {
>  ZeroMemory(dev_mode, sizeof(DEVMODE));
> @@ -299,6 +318,8 @@ bool DesktopLayout::init_dev_mode(LPCTSTR dev_name,
> DEVMODE* dev_mode, DisplayMo
>  // update current DisplayMode (so mouse scaling works properly)
>  mode->_width = dev_mode->dmPelsWidth;
>  mode->_height = dev_mode->dmPelsHeight;
> +
> +set_vdagent_running_for_displays(true);
>  return true;
>  
>  }
> diff --git a/vdagent/desktop_layout.h b/vdagent/desktop_layout.h
> index fd6af76..da5a40b 100644
> --- a/vdagent/desktop_layout.h
> +++ b/vdagent/desktop_layout.h
> @@ -83,6 +83,7 @@ private:
>  static bool consistent_displays();
>  static bool is_attached(LPCTSTR dev_name);
>  static bool get_qxl_device_id(WCHAR* device_key, DWORD* device_id);
> +void set_vdagent_running_for_displays(bool enable_pointer);
>  private:
>  mutex_t _mutex;
>  Displays _displays;
> diff --git a/vdagent/display_configuration.cpp
> b/vdagent/display_configuration.cpp
> index f20605a..95fd4c3 100644
> --- a/vdagent/display_configuration.cpp
> +++ b/vdagent/display_configuration.cpp
> @@ -67,6 +67,15 @@ typedef struct WDDM_MONITOR_CONFIG_ESCAPE {
>  int _ioctl;
>  QXLHead _head;
>  } WDDM_MONITOR_CONFIG_ESCAPE;
> +typedef struct WDDM_VDAGENT_RUNNING_ESCAPE{
> +WDDM_VDAGENT_RUNNING_ESCAPE(bool running)
> +{
> +_ioctl = QXL_ESCAPE_VDAGENT_RUNNING;
> +_vdagent_state.running = running;
> +}
> +int_ioctl;
> +QXLEscapeVDAgentRunning_vdagent_state;
> +} WDDM_VDAGENT_RUNNING_ESCAPE;

This style is really confusing, it's a mix of C and C++,
there is no reason for the typedef.
I think also there is some missing empty line and space.
Also the choice of all capital is confusing (maybe just me)

>  #endif
>  DisplayConfig* DisplayConfig::create_config()
>  {
> @@ -529,6 +538,12 @@ bool WDDMInterface::escape(LPCTSTR device_name, void*
> data, UINT size_data)
>  return NT_SUCCESS(status);
>  }
>  
> +bool WDDMInterface::set_vdagent_running(LPCTSTR device_name, bool running)
> +{
> +WDDM_VDAGENT_RUNNING_ESCAPE wddm_escape(running);
> +return escape(device_name, _escape, sizeof(wddm_escape));
> +}
> +
>  CCD::CCD()
>  :_NumPathElements(0)
>  ,_NumModeElements(0)
> diff --git a/vdagent/display_configuration.h
> b/vdagent/display_configuration.h
> index eeba1c2..06f592a 100644
> --- a/vdagent/display_configuration.h
> +++ b/vdagent/display_configuration.h
> @@ -132,6 +132,7 @@ public:
>  DRIVER_TYPE type() { return _driver_type; };
>  void set_monitors_config(bool flag) { _send_monitors_config = flag; }
>  virtual void update_config_path() {};
> +virtual bool set_vdagent_running(LPCTSTR device_name, bool running) {
> return false; };
>  
>  protected:
>  DRIVER_TYPE _driver_type;
> @@ -176,6 +177,7 @@ private:
>  
>  void close_adapter(D3DKMT_HANDLE handle);
>  bool escape(LPCTSTR device_name, void* data, UINT 

Re: [Spice-devel] [RFC PATCH vdagent 06/16] Fix include path to spice-protocol

2016-07-18 Thread Frediano Ziglio
> 
> Signed-off-by: Dmitry Fleytman 
> ---
>  vdagent/vdagent.vcxproj | 16 
>  vdservice/vdservice.vcxproj |  8 
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/vdagent/vdagent.vcxproj b/vdagent/vdagent.vcxproj
> index 4f6f54a..bffc8a6 100644
> --- a/vdagent/vdagent.vcxproj
> +++ b/vdagent/vdagent.vcxproj
> @@ -154,7 +154,7 @@
>Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
>  
>Disabled
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
>
> WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
>true
>EnableFastChecks
> @@ -180,7 +180,7 @@
>
>  
>Disabled
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
>
> WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
>true
>EnableFastChecks
> @@ -211,7 +211,7 @@
>  
>  
>Disabled
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
>
> WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
>true
>EnableFastChecks
> @@ -240,7 +240,7 @@
>  
>  
>Disabled
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
>
> WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
>true
>EnableFastChecks
> @@ -267,7 +267,7 @@
>
>Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
>  
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
>
> WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
>MultiThreaded
>
> @@ -295,7 +295,7 @@
>X64
>  
>  
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
>
> WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
>MultiThreaded
>
> @@ -321,7 +321,7 @@
>
>  
>
> WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
>MultiThreaded
>  
>  
> @@ -336,7 +336,7 @@
>
>  
>
> WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
> -
> ..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
>MultiThreaded
>true
>  
> diff --git a/vdservice/vdservice.vcxproj b/vdservice/vdservice.vcxproj
> index 7ea66ea..b324802 100644
> --- a/vdservice/vdservice.vcxproj
> +++ b/vdservice/vdservice.vcxproj
> @@ -93,7 +93,7 @@
>Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
>  
>Disabled
> -
> ..\common;$(SPICE_PROTOCOL_DIR);%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
>
> WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
>true
>EnableFastChecks
> @@ -117,7 +117,7 @@
>  
>  
>Disabled
> -
> ..\common;$(SPICE_PROTOCOL_DIR);%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
>
> WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
>true
>EnableFastChecks
> @@ -137,7 +137,7 @@
>
>Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
>  
> -
> ..\common;$(SPICE_PROTOCOL_DIR);%(AdditionalIncludeDirectories)
> +
> ..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
>
> 

Re: [Spice-devel] [RFC PATCH vdagent 04/16] spice-protocol: use internal repository and bump up head to include new commits

2016-07-18 Thread Frediano Ziglio
> 
> ---
>  .gitmodules| 2 +-
>  spice-protocol | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/.gitmodules b/.gitmodules
> index 04211d8..2cde8ab 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -1,6 +1,6 @@
>  [submodule "spice-protocol"]
>   path = spice-protocol
> - url = git://git.freedesktop.org/git/spice/spice-protocol.git
> + url = ../daynix-spice.win10_spice_protocol.git
>  [submodule "cximage"]
>   path = cximage
>   url = ../daynix-spice.cximage.git
> diff --git a/spice-protocol b/spice-protocol
> index 666b5c5..0356725 16
> --- a/spice-protocol
> +++ b/spice-protocol
> @@ -1 +1 @@
> -Subproject commit 666b5c5780acf3176a9cff61ad549d30bb1b9824
> +Subproject commit 0356725f6d22aed3bf9328291b7f614211b99cdc

I would separate the two hunks.

Why using an internal repo?

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


Re: [Spice-devel] [RFC PATCH vdagent 03/16] Add cximage submodule

2016-07-18 Thread Frediano Ziglio
> 
> Signed-off-by: Dmitry Fleytman 
> ---
>  .gitmodules | 3 +++
>  cximage | 1 +
>  2 files changed, 4 insertions(+)
>  create mode 16 cximage
> 
> diff --git a/.gitmodules b/.gitmodules
> index f946a4d..04211d8 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -1,3 +1,6 @@
>  [submodule "spice-protocol"]
>   path = spice-protocol
>   url = git://git.freedesktop.org/git/spice/spice-protocol.git
> +[submodule "cximage"]
> + path = cximage
> + url = ../daynix-spice.cximage.git

This should be made public

> diff --git a/cximage b/cximage
> new file mode 16
> index 000..516061f
> --- /dev/null
> +++ b/cximage
> @@ -0,0 +1 @@
> +Subproject commit 516061fb908954ced223fea7703f5b5d79daac26

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


Re: [Spice-devel] [RFC PATCH vdagent 02/16] Provide support for Windows 10 CCD API

2016-07-18 Thread Frediano Ziglio
> 
> From: Sandy Stutsman 
> 
> ---
>  Spice.props   |  38 ++
>  vdagent.sln   |  94 ++--
>  vdagent/CCD.h | 259 +++
>  vdagent/D3Dkmt.h  | 134 ++
>  vdagent/desktop_layout.cpp| 152 ++-
>  vdagent/desktop_layout.h  |   9 +-
>  vdagent/display_configuration.cpp | 889
>  ++
>  vdagent/display_configuration.h   | 192 
>  vdagent/vdagent.vcxproj   | 380 
>  vdservice/vdservice.vcxproj   | 197 +
>  10 files changed, 2185 insertions(+), 159 deletions(-)
>  create mode 100644 Spice.props
>  create mode 100644 vdagent/CCD.h
>  create mode 100644 vdagent/D3Dkmt.h
>  create mode 100644 vdagent/display_configuration.cpp
>  create mode 100644 vdagent/display_configuration.h
>  create mode 100644 vdagent/vdagent.vcxproj
>  create mode 100644 vdservice/vdservice.vcxproj
> 
> diff --git a/Spice.props b/Spice.props
> new file mode 100644
> index 000..217bfc7
> --- /dev/null
> +++ b/Spice.props
> @@ -0,0 +1,38 @@
> +
> + xmlns="http://schemas.microsoft.com/developer/msbuild/2003;>
> +  
> +  
> +
> D:\SANDBOX\Master\spice-protocol
> +D:\Sandbox\WSpice\
> +

Can't we use relative directories here?

> cximage.lib;jasper.lib;jbig.lib;jpeg.lib;libdcr.lib;mng.lib;png.lib;tiff.lib;zlib.lib
> +
> cximage.lib;jasper.lib;jbig.lib;jpeg.lib;libdcr.lib;mng.lib;png.lib;tiff.lib;zlib.lib
> +$(SPICE_LIBS)\$(Platform)\Release
> +
> $(SPICE_LIBS)\$(Platform)\Debug
> +  
> +  
> +  
> +  
> +
> +  $(SPICE_PROTOCOL_DIR)
> +  true
> +
> +
> +  $(SPICE_LIBS)
> +  true
> +
> +
> +  $(SPICE_LIB_LIST)
> +  true
> +
> +
> +  $(SPICE_DEBUG_LIB_LIST)
> +  true
> +
> +
> +  $(SPICE_LIBS_DIR)
> +
> +
> +  $(SPICE_DEBUG_LIBS_DIR)
> +
> +  
> +
> \ No newline at end of file
> diff --git a/vdagent.sln b/vdagent.sln
> index 2622f2e..1c29664 100644
> --- a/vdagent.sln
> +++ b/vdagent.sln
> @@ -1,36 +1,58 @@
> -
> -Microsoft Visual Studio Solution File, Format Version 10.00
> -# Visual Studio 2008
> -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdagent",
> "vdagent\vdagent.vcproj", "{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}"
> -EndProject
> -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdservice",
> "vdservice\vdservice.vcproj", "{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}"
> -EndProject
> -Global
> - GlobalSection(SolutionConfigurationPlatforms) = preSolution
> - Debug|Win32 = Debug|Win32
> - Debug|x64 = Debug|x64
> - Release|Win32 = Release|Win32
> - Release|x64 = Release|x64
> - EndGlobalSection
> - GlobalSection(ProjectConfigurationPlatforms) = postSolution
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|Win32.ActiveCfg = 
> Debug|Win32
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|Win32.Build.0 = 
> Debug|Win32
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|x64.ActiveCfg = 
> Debug|x64
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|x64.Build.0 = 
> Debug|x64
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|Win32.ActiveCfg =
> Release|Win32
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|Win32.Build.0 =
> Release|Win32
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|x64.ActiveCfg = 
> Release|x64
> - {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|x64.Build.0 = 
> Release|x64
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|Win32.ActiveCfg = 
> Debug|Win32
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|Win32.Build.0 = 
> Debug|Win32
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|x64.ActiveCfg = 
> Debug|x64
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|x64.Build.0 = 
> Debug|x64
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|Win32.ActiveCfg =
> Release|Win32
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|Win32.Build.0 =
> Release|Win32
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.ActiveCfg = 
> Release|x64
> - {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.Build.0 = 
> Release|x64
> - EndGlobalSection
> - GlobalSection(SolutionProperties) = preSolution
> - HideSolutionNode = FALSE
> - EndGlobalSection
> -EndGlobal
> +
> +Microsoft Visual Studio Solution File, Format Version 12.00
> +# Visual Studio 14
> +VisualStudioVersion = 14.0.23107.0
> +MinimumVisualStudioVersion = 10.0.40219.1
> +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdagent",
> "vdagent\vdagent.vcxproj", "{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}"
> +EndProject
> +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdservice",
> "vdservice\vdservice.vcxproj", "{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}"
> +EndProject
> +Global
> + 

Re: [Spice-devel] [RFC PATCH vdagent 01/16] Fix 'Run-Time Check Failure #2' when running a 64bit guest

2016-07-18 Thread Frediano Ziglio
> 
> From: Sandy Stutsman 
> 
> ---
>  vdagent/display_setting.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/vdagent/display_setting.cpp b/vdagent/display_setting.cpp
> index 1ec7397..f5eb0d7 100644
> --- a/vdagent/display_setting.cpp
> +++ b/vdagent/display_setting.cpp
> @@ -306,7 +306,7 @@ bool DisplaySetting::reload_wallpaper(HKEY
> desktop_reg_key)
>  wallpaper_path[value_size] = '\0';
>  }
>  
> -if (SystemParametersInfo(SPI_GETDESKWALLPAPER, sizeof(cur_wallpaper),
> cur_wallpaper, 0)) {
> +if (SystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, cur_wallpaper,
> 0)) {
>  if (_tcscmp(cur_wallpaper, TEXT("")) != 0) {
>  vd_printf("wallpaper wasn't disabled");
>  return true;

I would prefer a SPICE_N_ELEMENTS here. The problem is that SystemParametersInfo
wants the size in character not bytes.

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


[Spice-devel] [RFC PATCH vdagent 09/16] Unify debug options

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 vdagent/vdagent.vcxproj | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vdagent/vdagent.vcxproj b/vdagent/vdagent.vcxproj
index 8ada675..fbd2209 100644
--- a/vdagent/vdagent.vcxproj
+++ b/vdagent/vdagent.vcxproj
@@ -194,7 +194,7 @@
   
   
   Level3
-  EditAndContinue
+  ProgramDatabase
 
 
   
Version.lib;$(SPICE_DEBUG_LIB_LIST);wtsapi32.lib;%(AdditionalDependencies)
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 14/16] Adding ioctl operation to update Vdagent state

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

This patch adds new ioctl operation to Vdagent in order to update
the driver on Vdagent state. This allows the driver to know
when Vdagent is running and when it is off.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 vdagent/desktop_layout.cpp| 21 +
 vdagent/desktop_layout.h  |  1 +
 vdagent/display_configuration.cpp | 15 +++
 vdagent/display_configuration.h   |  2 ++
 4 files changed, 39 insertions(+)

diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp
index 7aff7e7..a8d9e2d 100644
--- a/vdagent/desktop_layout.cpp
+++ b/vdagent/desktop_layout.cpp
@@ -44,6 +44,7 @@ DesktopLayout::DesktopLayout()
 
 DesktopLayout::~DesktopLayout()
 {
+set_vdagent_running_for_displays(false);
 clean_displays();
 if (_display_config){
 delete _display_config;
@@ -122,6 +123,8 @@ void DesktopLayout::set_displays()
 DWORD display_id = 0;
 int dev_sets = 0;
 
+set_vdagent_running_for_displays(true);
+
 lock();
 if (!consistent_displays()) {
 unlock();
@@ -276,6 +279,22 @@ bool DesktopLayout::get_qxl_device_id(WCHAR* device_key, 
DWORD* device_id)
 return key_found;
 }
 
+void DesktopLayout::set_vdagent_running_for_displays(bool running)
+{
+DISPLAY_DEVICE dev_info;
+DWORD dev_id = 0;
+lock();
+ZeroMemory(_info, sizeof(dev_info));
+dev_info.cb = sizeof(dev_info);
+while (EnumDisplayDevices(NULL, dev_id, _info, 0)) {
+dev_id++;
+if (!(dev_info.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) && 
wcsstr(dev_info.DeviceString, L"QXL")) {
+_display_config->set_vdagent_running(dev_info.DeviceName, running);
+}
+}
+unlock();
+}
+
 bool DesktopLayout::init_dev_mode(LPCTSTR dev_name, DEVMODE* dev_mode, 
DisplayMode* mode)
 {
 ZeroMemory(dev_mode, sizeof(DEVMODE));
@@ -299,6 +318,8 @@ bool DesktopLayout::init_dev_mode(LPCTSTR dev_name, 
DEVMODE* dev_mode, DisplayMo
 // update current DisplayMode (so mouse scaling works properly)
 mode->_width = dev_mode->dmPelsWidth;
 mode->_height = dev_mode->dmPelsHeight;
+
+set_vdagent_running_for_displays(true);
 return true;
 
 }
diff --git a/vdagent/desktop_layout.h b/vdagent/desktop_layout.h
index fd6af76..da5a40b 100644
--- a/vdagent/desktop_layout.h
+++ b/vdagent/desktop_layout.h
@@ -83,6 +83,7 @@ private:
 static bool consistent_displays();
 static bool is_attached(LPCTSTR dev_name);
 static bool get_qxl_device_id(WCHAR* device_key, DWORD* device_id);
+void set_vdagent_running_for_displays(bool enable_pointer);
 private:
 mutex_t _mutex;
 Displays _displays;
diff --git a/vdagent/display_configuration.cpp 
b/vdagent/display_configuration.cpp
index f20605a..95fd4c3 100644
--- a/vdagent/display_configuration.cpp
+++ b/vdagent/display_configuration.cpp
@@ -67,6 +67,15 @@ typedef struct WDDM_MONITOR_CONFIG_ESCAPE {
 int _ioctl;
 QXLHead _head;
 } WDDM_MONITOR_CONFIG_ESCAPE;
+typedef struct WDDM_VDAGENT_RUNNING_ESCAPE{
+WDDM_VDAGENT_RUNNING_ESCAPE(bool running)
+{
+_ioctl = QXL_ESCAPE_VDAGENT_RUNNING;
+_vdagent_state.running = running;
+}
+int_ioctl;
+QXLEscapeVDAgentRunning_vdagent_state;
+} WDDM_VDAGENT_RUNNING_ESCAPE;
 #endif
 DisplayConfig* DisplayConfig::create_config() 
 {
@@ -529,6 +538,12 @@ bool WDDMInterface::escape(LPCTSTR device_name, void* 
data, UINT size_data)
 return NT_SUCCESS(status);
 }
 
+bool WDDMInterface::set_vdagent_running(LPCTSTR device_name, bool running)
+{
+WDDM_VDAGENT_RUNNING_ESCAPE wddm_escape(running);
+return escape(device_name, _escape, sizeof(wddm_escape));
+}
+
 CCD::CCD()
 :_NumPathElements(0)
 ,_NumModeElements(0)
diff --git a/vdagent/display_configuration.h b/vdagent/display_configuration.h
index eeba1c2..06f592a 100644
--- a/vdagent/display_configuration.h
+++ b/vdagent/display_configuration.h
@@ -132,6 +132,7 @@ public:
 DRIVER_TYPE type() { return _driver_type; };
 void set_monitors_config(bool flag) { _send_monitors_config = flag; }
 virtual void update_config_path() {};
+virtual bool set_vdagent_running(LPCTSTR device_name, bool running) { 
return false; };
 
 protected:
 DRIVER_TYPE _driver_type;
@@ -176,6 +177,7 @@ private:
 
 void close_adapter(D3DKMT_HANDLE handle);
 bool escape(LPCTSTR device_name, void* data, UINT sizeData);
+bool set_vdagent_running(LPCTSTR device_name, bool running);
 
 private:
 //GDI Function pointers
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 12/16] Unify build output directories

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 vdagent.sln | 42 +-
 vdagent/vdagent.vcxproj | 55 ++--
 vdservice/vdservice.vcxproj | 56 ++---
 3 files changed, 77 insertions(+), 76 deletions(-)

diff --git a/vdagent.sln b/vdagent.sln
index 38a728d..2346d1a 100644
--- a/vdagent.sln
+++ b/vdagent.sln
@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
+VisualStudioVersion = 14.0.25123.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdagent", 
"vdagent\vdagent.vcxproj", "{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}"
 EndProject
@@ -13,10 +13,10 @@ Global
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
-   Win10 Debug|Win32 = Win10 Debug|Win32
-   Win10 Debug|x64 = Win10 Debug|x64
-   Win10 Release|Win32 = Win10 Release|Win32
-   Win10 Release|x64 = Win10 Release|x64
+   Win10_Debug|Win32 = Win10_Debug|Win32
+   Win10_Debug|x64 = Win10_Debug|x64
+   Win10_Release|Win32 = Win10_Release|Win32
+   Win10_Release|x64 = Win10_Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|Win32.ActiveCfg = 
Debug|Win32
@@ -27,14 +27,14 @@ Global
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|Win32.Build.0 = 
Release|Win32
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|x64.ActiveCfg = 
Release|x64
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|x64.Build.0 = 
Release|x64
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 
Debug|Win32.ActiveCfg = Win10 Debug|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 
Debug|Win32.Build.0 = Win10 Debug|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 
Debug|x64.ActiveCfg = Win10 Debug|x64
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 Debug|x64.Build.0 
= Win10 Debug|x64
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 
Release|Win32.ActiveCfg = Win10 Release|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 
Release|Win32.Build.0 = Win10 Release|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 
Release|x64.ActiveCfg = Win10 Release|x64
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10 
Release|x64.Build.0 = Win10 Release|x64
+   
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Debug|Win32.ActiveCfg = 
Win10_Debug|Win32
+   
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Debug|Win32.Build.0 = 
Win10_Debug|Win32
+   
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Debug|x64.ActiveCfg = 
Win10_Debug|x64
+   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Debug|x64.Build.0 
= Win10_Debug|x64
+   
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Release|Win32.ActiveCfg = 
Win10_Release|Win32
+   
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Release|Win32.Build.0 = 
Win10_Release|Win32
+   
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Release|x64.ActiveCfg = 
Win10_Release|x64
+   
{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Win10_Release|x64.Build.0 = 
Win10_Release|x64
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|Win32.ActiveCfg = 
Debug|Win32
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|Win32.Build.0 = 
Debug|Win32
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|x64.ActiveCfg = 
Debug|x64
@@ -43,14 +43,14 @@ Global
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|Win32.Build.0 = 
Release|Win32
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.ActiveCfg = 
Release|x64
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.Build.0 = 
Release|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|Win32.ActiveCfg = Win10 Debug|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|Win32.Build.0 = Win10 Debug|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|x64.ActiveCfg = Debug|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 Debug|x64.Build.0 
= Debug|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|Win32.ActiveCfg = Win10 Release|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|Win32.Build.0 = Win10 Release|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|x64.ActiveCfg = Release|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|x64.Build.0 = Release|x64
+   
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10_Debug|Win32.ActiveCfg = 

[Spice-devel] [RFC PATCH vdagent 11/16] Unify projects configurations

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 vdagent.sln |  10 +--
 vdservice/vdservice.vcxproj | 170 
 2 files changed, 175 insertions(+), 5 deletions(-)

diff --git a/vdagent.sln b/vdagent.sln
index 1c29664..38a728d 100644
--- a/vdagent.sln
+++ b/vdagent.sln
@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+VisualStudioVersion = 14.0.24720.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdagent", 
"vdagent\vdagent.vcxproj", "{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}"
 EndProject
@@ -43,12 +43,12 @@ Global
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|Win32.Build.0 = 
Release|Win32
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.ActiveCfg = 
Release|x64
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.Build.0 = 
Release|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|Win32.ActiveCfg = Debug|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|Win32.Build.0 = Debug|Win32
+   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|Win32.ActiveCfg = Win10 Debug|Win32
+   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|Win32.Build.0 = Win10 Debug|Win32
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Debug|x64.ActiveCfg = Debug|x64
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 Debug|x64.Build.0 
= Debug|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|Win32.ActiveCfg = Release|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|Win32.Build.0 = Release|Win32
+   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|Win32.ActiveCfg = Win10 Release|Win32
+   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|Win32.Build.0 = Win10 Release|Win32
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|x64.ActiveCfg = Release|x64
{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Win10 
Release|x64.Build.0 = Release|x64
EndGlobalSection
diff --git a/vdservice/vdservice.vcxproj b/vdservice/vdservice.vcxproj
index 7cf2628..9b54f95 100644
--- a/vdservice/vdservice.vcxproj
+++ b/vdservice/vdservice.vcxproj
@@ -17,6 +17,22 @@
   Release
   x64
 
+
+  Win10 Debug
+  Win32
+
+
+  Win10 Debug
+  x64
+
+
+  Win10 Release
+  Win32
+
+
+  Win10 Release
+  x64
+
   
   
 {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}
@@ -31,22 +47,44 @@
 Unicode
 true
   
+  
+Application
+v140
+Unicode
+true
+  
   
 Application
 v140
 Unicode
   
+  
+Application
+v140
+Unicode
+  
   
 Application
 v140
 Unicode
 true
   
+  
+Application
+v140
+Unicode
+true
+  
   
 Application
 v140
 Unicode
   
+  
+Application
+v140
+Unicode
+  
   
   
   
@@ -54,18 +92,34 @@
 
 
   
+  
+
+
+  
   
 
 
   
+  
+
+
+  
   
 
 
   
+  
+
+
+  
   
 
 
   
+  
+
+
+  
   
   
 <_ProjectFileVersion>14.0.23107.0
@@ -75,21 +129,41 @@
 $(Configuration)\
 true
   
+  
+$(SolutionDir)$(Configuration)\
+$(Configuration)\
+true
+  
   
 $(SolutionDir)$(Platform)\$(Configuration)\
 $(Platform)\$(Configuration)\
 true
   
+  
+$(SolutionDir)$(Platform)\$(Configuration)\
+$(Platform)\$(Configuration)\
+true
+  
   
 $(SolutionDir)$(Configuration)\
 $(Configuration)\
 false
   
+  
+$(SolutionDir)$(Configuration)\
+$(Configuration)\
+false
+  
   
 $(SolutionDir)$(Platform)\$(Configuration)\
 $(Platform)\$(Configuration)\
 false
   
+  
+$(SolutionDir)$(Platform)\$(Configuration)\
+$(Platform)\$(Configuration)\
+false
+  
   
 
   Disabled
@@ -111,6 +185,29 @@
   MachineX86
 
   
+  
+
+  Disabled
+  
..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
+  
WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
+  true
+  EnableFastChecks
+  MultiThreadedDebug
+  
+  
+  Level3
+  EditAndContinue
+
+
+  
WtsApi32.lib;Userenv.lib;Version.lib;%(AdditionalDependencies)
+  true
+  Console
+  false
+  
+  
+  MachineX86
+
+  
   
 
   X64
@@ -135,6 +232,32 @@
   MachineX64
 
   
+  
+
+  X64
+
+
+  Disabled
+  
..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
+  
WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
+  true
+  EnableFastChecks
+  MultiThreadedDebug
+  
+  
+  Level3
+  ProgramDatabase
+
+
+  

[Spice-devel] [RFC PATCH vdagent 01/16] Fix 'Run-Time Check Failure #2' when running a 64bit guest

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

---
 vdagent/display_setting.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vdagent/display_setting.cpp b/vdagent/display_setting.cpp
index 1ec7397..f5eb0d7 100644
--- a/vdagent/display_setting.cpp
+++ b/vdagent/display_setting.cpp
@@ -306,7 +306,7 @@ bool DisplaySetting::reload_wallpaper(HKEY desktop_reg_key)
 wallpaper_path[value_size] = '\0';
 }
 
-if (SystemParametersInfo(SPI_GETDESKWALLPAPER, sizeof(cur_wallpaper), 
cur_wallpaper, 0)) {
+if (SystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, cur_wallpaper, 
0)) {
 if (_tcscmp(cur_wallpaper, TEXT("")) != 0) {
 vd_printf("wallpaper wasn't disabled");
 return true;
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 15/16] Replacing tabs with spaces

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 vdagent/CCD.h | 182 +++---
 vdagent/display_configuration.cpp |   2 +-
 vdagent/display_configuration.h   |   2 +-
 3 files changed, 93 insertions(+), 93 deletions(-)

diff --git a/vdagent/CCD.h b/vdagent/CCD.h
index a457fc1..7b071ee 100644
--- a/vdagent/CCD.h
+++ b/vdagent/CCD.h
@@ -68,103 +68,103 @@ typedef enum {
 
 
 typedef enum {
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER= -1,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = 0,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO   = 1,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO  = 2,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO  = 3,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI  = 4,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = 5,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = 6,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN= 8,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI  = 9,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = 10,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = 11,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = 12,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = 13,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE   = 14,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_MIRACAST = 15,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = 0x8000,
-   DISPLAYCONFIG_OUTPUT_TECHNOLOGY_FORCE_UINT32 = 0x
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER= -1,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = 0,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO   = 1,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO  = 2,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO  = 3,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI  = 4,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = 5,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = 6,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN= 8,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI  = 9,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = 10,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = 11,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = 12,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = 13,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE   = 14,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_MIRACAST = 15,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = 0x8000,
+DISPLAYCONFIG_OUTPUT_TECHNOLOGY_FORCE_UINT32 = 0x
 } DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY;
 
 
 typedef enum {
-   DISPLAYCONFIG_ROTATION_IDENTITY = 1,
-   DISPLAYCONFIG_ROTATION_ROTATE90 = 2,
-   DISPLAYCONFIG_ROTATION_ROTATE180= 3,
-   DISPLAYCONFIG_ROTATION_ROTATE270= 4,
-   DISPLAYCONFIG_ROTATION_FORCE_UINT32 = 0x
+DISPLAYCONFIG_ROTATION_IDENTITY = 1,
+DISPLAYCONFIG_ROTATION_ROTATE90 = 2,
+DISPLAYCONFIG_ROTATION_ROTATE180= 3,
+DISPLAYCONFIG_ROTATION_ROTATE270= 4,
+DISPLAYCONFIG_ROTATION_FORCE_UINT32 = 0x
 } DISPLAYCONFIG_ROTATION;
 
 typedef enum {
-   DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED= 0,
-   DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE= 1,
-   DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2,
-   DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST = 
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED,
-   DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3,
-   DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32   = 0x
+DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED= 0,
+DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE= 1,
+DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2,
+DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST = 
DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED,
+DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3,
+DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32   = 0x
 } DISPLAYCONFIG_SCANLINE_ORDERING;
 
 
 typedef enum {
-   DISPLAYCONFIG_SCALING_IDENTITY   = 1,
-   DISPLAYCONFIG_SCALING_CENTERED   = 2,
-   DISPLAYCONFIG_SCALING_STRETCHED  = 3,
-   DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4,
-   DISPLAYCONFIG_SCALING_CUSTOM = 5,
-   DISPLAYCONFIG_SCALING_PREFERRED  = 128,
-   DISPLAYCONFIG_SCALING_FORCE_UINT32   = 0x
+DISPLAYCONFIG_SCALING_IDENTITY   = 1,
+

[Spice-devel] [RFC PATCH qxl-wddm-dod 27/28] Fix source buffer mapping in PresentDisplayOnly

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

Part of source image mapped by PresentDisplayOnly
should be big enough to cover all rectangles being
transferred.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.cpp | 28 +++-
 qxldod/QxlDod.h   |  1 +
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 7b3d353..0ec00fe 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3642,12 +3642,11 @@ QxlDevice::ExecutePresentDisplayOnly(
 ctx->Mdl  = NULL;
 ctx->DisplaySource= this;
 
-// Alternate between synch and asynch execution, for demonstrating 
-// that a real hardware implementation can do either
-
+// Source bitmap is in user mode, must be locked under __try/__except
+// and mapped to kernel space before use.
 {
-// Map Source into kernel space, as Blt will be executed by system 
worker thread
-UINT sizeToMap = ctx->SrcPitch * ctx->SrcHeight;
+LONG maxHeight = GetMaxSourceMappingHeight(ctx->Moves, ctx->NumMoves, 
ctx->DirtyRect, ctx->NumDirtyRects);
+UINT sizeToMap = ctx->SrcPitch * maxHeight;
 
 PMDL mdl = IoAllocateMdl((PVOID)SrcAddr, sizeToMap,  FALSE, FALSE, 
NULL);
 if(!mdl)
@@ -4527,6 +4526,25 @@ void 
QxlDevice::SaveVDAgentState(QXLEscapeVDAgentRunning* vdagent_running)
 m_VDAgentRunning = (vdagent_running->running == 0) ? FALSE : TRUE;
 }
 
+LONG QxlDevice::GetMaxSourceMappingHeight(D3DKMT_MOVE_RECT* Moves, ULONG 
NumMoves, RECT* DirtyRects, ULONG NumDirtyRects)
+{
+LONG maxHeight = 0;
+if (Moves != NULL) {
+for (UINT i = 0; i < NumMoves; i++) {
+POINT*   pSourcePoint = [i].SourcePoint;
+RECT*pDestRect = [i].DestRect;
+maxHeight = MAX(maxHeight, pDestRect->bottom - pDestRect->top + 
pSourcePoint->y);
+}
+}
+if (DirtyRects != NULL) {
+for (UINT i = 0; i < NumDirtyRects; i++) {
+RECT*pDirtyRect = [i];
+maxHeight = MAX(maxHeight, pDirtyRect->bottom);
+}
+}
+return maxHeight;
+}
+
 NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE* pEscape)
 {
 PAGED_CODE();
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index 41189b3..0757648 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -553,6 +553,7 @@ private:
 NTSTATUS SetCustomDisplay(QXLEscapeSetCustomDisplay* custom_display);
 void SetMonitorConfig(QXLHead* monitor_config);
 void SaveVDAgentState(QXLEscapeVDAgentRunning* vdagent_running);
+LONG static GetMaxSourceMappingHeight(D3DKMT_MOVE_RECT* Moves, ULONG 
NumMoves, RECT* DirtyRects, ULONG NumDirtyRects);
 
 private:
 BOOLEAN m_VDAgentRunning;
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH spice-protocol 1/1] Adding new ioctl for updating Vdagent state

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

New ioctl for updating the driver with vdagent running state.

Signed-off-by: Sameeh Jubran 
---
 spice/qxl_windows.h | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/spice/qxl_windows.h b/spice/qxl_windows.h
index bc2ceff..92715d5 100644
--- a/spice/qxl_windows.h
+++ b/spice/qxl_windows.h
@@ -7,7 +7,8 @@
 
 enum {
 QXL_ESCAPE_SET_CUSTOM_DISPLAY = 0x10001,
-QXL_ESCAPE_MONITOR_CONFIG
+QXL_ESCAPE_MONITOR_CONFIG,
+QXL_ESCAPE_VDAGENT_RUNNING
 };
 
 typedef struct SPICE_ATTR_PACKED QXLEscapeSetCustomDisplay {
@@ -16,6 +17,9 @@ typedef struct SPICE_ATTR_PACKED QXLEscapeSetCustomDisplay {
 uint32_t bpp;
 } QXLEscapeSetCustomDisplay;
 
+typedef struct QXLEscapeVDAgentRunning {
+uint32_t running;
+} QXLEscapeVDAgentRunning;
 #include 
 
 #endif /* _H_QXL_WINDOWS */
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 13/16] VDAgent: Fixing primary display detachment issue

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

After detaching the primary display (when multi monitors are connected)
the detached monitor fails to reattach which leads to other issues with
arbitrary resolution of attached monitors.

The problem is when Vdagent marks the detached monitor as active, it
dosen't apply the changes and thus the monitor fails to attach. This
patch fixes the issue by applying the changes after marking the monitor
as active.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 vdagent/display_configuration.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vdagent/display_configuration.cpp 
b/vdagent/display_configuration.cpp
index 19641e9..f20605a 100644
--- a/vdagent/display_configuration.cpp
+++ b/vdagent/display_configuration.cpp
@@ -865,6 +865,7 @@ bool CCD::set_path_state(LPCTSTR device_name, MONITOR_STATE 
new_state)
 }
 else {
 path->flags = path->flags | DISPLAYCONFIG_PATH_ACTIVE;
+set_display_config();
 }
 return true;
 }
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 02/16] Provide support for Windows 10 CCD API

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

---
 Spice.props   |  38 ++
 vdagent.sln   |  94 ++--
 vdagent/CCD.h | 259 +++
 vdagent/D3Dkmt.h  | 134 ++
 vdagent/desktop_layout.cpp| 152 ++-
 vdagent/desktop_layout.h  |   9 +-
 vdagent/display_configuration.cpp | 889 ++
 vdagent/display_configuration.h   | 192 
 vdagent/vdagent.vcxproj   | 380 
 vdservice/vdservice.vcxproj   | 197 +
 10 files changed, 2185 insertions(+), 159 deletions(-)
 create mode 100644 Spice.props
 create mode 100644 vdagent/CCD.h
 create mode 100644 vdagent/D3Dkmt.h
 create mode 100644 vdagent/display_configuration.cpp
 create mode 100644 vdagent/display_configuration.h
 create mode 100644 vdagent/vdagent.vcxproj
 create mode 100644 vdservice/vdservice.vcxproj

diff --git a/Spice.props b/Spice.props
new file mode 100644
index 000..217bfc7
--- /dev/null
+++ b/Spice.props
@@ -0,0 +1,38 @@
+
+http://schemas.microsoft.com/developer/msbuild/2003;>
+  
+  
+D:\SANDBOX\Master\spice-protocol
+D:\Sandbox\WSpice\
+
cximage.lib;jasper.lib;jbig.lib;jpeg.lib;libdcr.lib;mng.lib;png.lib;tiff.lib;zlib.lib
+
cximage.lib;jasper.lib;jbig.lib;jpeg.lib;libdcr.lib;mng.lib;png.lib;tiff.lib;zlib.lib
+$(SPICE_LIBS)\$(Platform)\Release
+
$(SPICE_LIBS)\$(Platform)\Debug
+  
+  
+  
+  
+
+  $(SPICE_PROTOCOL_DIR)
+  true
+
+
+  $(SPICE_LIBS)
+  true
+
+
+  $(SPICE_LIB_LIST)
+  true
+
+
+  $(SPICE_DEBUG_LIB_LIST)
+  true
+
+
+  $(SPICE_LIBS_DIR)
+
+
+  $(SPICE_DEBUG_LIBS_DIR)
+
+  
+
\ No newline at end of file
diff --git a/vdagent.sln b/vdagent.sln
index 2622f2e..1c29664 100644
--- a/vdagent.sln
+++ b/vdagent.sln
@@ -1,36 +1,58 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdagent", 
"vdagent\vdagent.vcproj", "{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdservice", 
"vdservice\vdservice.vcproj", "{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}"
-EndProject
-Global
-   GlobalSection(SolutionConfigurationPlatforms) = preSolution
-   Debug|Win32 = Debug|Win32
-   Debug|x64 = Debug|x64
-   Release|Win32 = Release|Win32
-   Release|x64 = Release|x64
-   EndGlobalSection
-   GlobalSection(ProjectConfigurationPlatforms) = postSolution
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|Win32.ActiveCfg = 
Debug|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|Win32.Build.0 = 
Debug|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|x64.ActiveCfg = 
Debug|x64
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Debug|x64.Build.0 = 
Debug|x64
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|Win32.ActiveCfg 
= Release|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|Win32.Build.0 = 
Release|Win32
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|x64.ActiveCfg = 
Release|x64
-   {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}.Release|x64.Build.0 = 
Release|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|Win32.ActiveCfg = 
Debug|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|Win32.Build.0 = 
Debug|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|x64.ActiveCfg = 
Debug|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Debug|x64.Build.0 = 
Debug|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|Win32.ActiveCfg 
= Release|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|Win32.Build.0 = 
Release|Win32
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.ActiveCfg = 
Release|x64
-   {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}.Release|x64.Build.0 = 
Release|x64
-   EndGlobalSection
-   GlobalSection(SolutionProperties) = preSolution
-   HideSolutionNode = FALSE
-   EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdagent", 
"vdagent\vdagent.vcxproj", "{CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vdservice", 
"vdservice\vdservice.vcxproj", "{ADFE5E22-31D0-4343-AE9E-8102CC0051F9}"
+EndProject
+Global
+   GlobalSection(SolutionConfigurationPlatforms) = preSolution
+   Debug|Win32 = Debug|Win32
+   Debug|x64 = Debug|x64
+   Release|Win32 = Release|Win32
+   Release|x64 = Release|x64
+   Win10 Debug|Win32 = Win10 Debug|Win32
+ 

[Spice-devel] [RFC PATCH vdagent 10/16] Add simple build script

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 Tools/vs_cmdline.vbs | 23 +++
 Tools/vs_run.bat | 26 ++
 buildAll.bat | 14 ++
 rebuildAll.bat   | 13 +
 4 files changed, 76 insertions(+)
 create mode 100644 Tools/vs_cmdline.vbs
 create mode 100644 Tools/vs_run.bat
 create mode 100644 buildAll.bat
 create mode 100644 rebuildAll.bat

diff --git a/Tools/vs_cmdline.vbs b/Tools/vs_cmdline.vbs
new file mode 100644
index 000..65bd0e5
--- /dev/null
+++ b/Tools/vs_cmdline.vbs
@@ -0,0 +1,23 @@
+Dim strCmdLine, strTemp
+Set WshShell = Wscript.CreateObject("Wscript.Shell")
+
+On Error Resume Next
+strCmdLine = 
WshShell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\InstallDir")
+' In case of error assume WoW64 case
+If Err <> 0 Then
+  On Error Goto 0
+  strCmdLine = 
WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\InstallDir")
+End If
+
+On Error Goto 0
+strCmdLine = chr(34) + strCmdLine + "devenv.com" + chr(34)
+For i = 0 to (Wscript.Arguments.Count - 1)
+  strTemp = Wscript.Arguments(i)
+  If InStr(strTemp, " ") Or InStr(strTemp, "|") Then
+  strCmdLine = strCmdLine + " " + chr(34) + strTemp + chr(34)
+  Else
+  strCmdLine = strCmdLine + " " + strTemp
+  End If
+Next
+
+WScript.Echo strCmdLine + vbCrLf
diff --git a/Tools/vs_run.bat b/Tools/vs_run.bat
new file mode 100644
index 000..b057fe3
--- /dev/null
+++ b/Tools/vs_run.bat
@@ -0,0 +1,26 @@
+@echo off
+
+for /f "tokens=*" %%a in (
+'cscript.exe /nologo "%~dp0\vs_cmdline.vbs" %*'
+) do (
+SET vs_cmd=%%a
+)
+
+IF NOT DEFINED vs_cmd (
+echo Visual Studio not found
+EXIT /b 1
+)
+
+SET vs_cmd_no_quotes="%vs_cmd:"=%"
+IF "vs_cmd_no_quotes" == "" (
+echo Visual Studio not found
+EXIT /b 2
+)
+
+%vs_cmd%
+if %ERRORLEVEL% GEQ 1 (
+echo Build with Visual Studio FAILED
+EXIT /b 3
+)
+
+EXIT /b 0
diff --git a/buildAll.bat b/buildAll.bat
new file mode 100644
index 000..2f33ead
--- /dev/null
+++ b/buildAll.bat
@@ -0,0 +1,14 @@
+@echo off
+
+SETLOCAL EnableExtensions EnableDelayedExpansion
+
+git submodule update --init
+
+cd cximage
+call buildAll.bat
+if !ERRORLEVEL! NEQ 0 exit /B 1
+cd ..
+
+call rebuildAll.bat
+
+ENDLOCAL
diff --git a/rebuildAll.bat b/rebuildAll.bat
new file mode 100644
index 000..37ae925
--- /dev/null
+++ b/rebuildAll.bat
@@ -0,0 +1,13 @@
+@echo off
+
+SETLOCAL EnableExtensions EnableDelayedExpansion
+
+del *.log
+
+call tools\vs_run.bat vdagent.sln /Rebuild "Win10_Debug|Win32" /Out 
build_Win10_Debug.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+call tools\vs_run.bat vdagent.sln /Rebuild "Win10_Release|Win32" /Out 
build_Win10_Release.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+ENDLOCAL
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH spice-protocol 0/1] Win10 support patches

2016-07-18 Thread Dmitry Fleytman
This patch adds definitions of a new QXL
escape code used by Win10 QXL-WDDM-DOD/VDAgent patches

Sameeh Jubran (1):
  Adding new ioctl for updating Vdagent state

 spice/qxl_windows.h | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 03/16] Add cximage submodule

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 .gitmodules | 3 +++
 cximage | 1 +
 2 files changed, 4 insertions(+)
 create mode 16 cximage

diff --git a/.gitmodules b/.gitmodules
index f946a4d..04211d8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
 [submodule "spice-protocol"]
path = spice-protocol
url = git://git.freedesktop.org/git/spice/spice-protocol.git
+[submodule "cximage"]
+   path = cximage
+   url = ../daynix-spice.cximage.git
diff --git a/cximage b/cximage
new file mode 16
index 000..516061f
--- /dev/null
+++ b/cximage
@@ -0,0 +1 @@
+Subproject commit 516061fb908954ced223fea7703f5b5d79daac26
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 07/16] Advance target platform version

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 vdagent/vdagent.vcxproj | 2 +-
 vdservice/vdservice.vcxproj | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vdagent/vdagent.vcxproj b/vdagent/vdagent.vcxproj
index bffc8a6..80de609 100644
--- a/vdagent/vdagent.vcxproj
+++ b/vdagent/vdagent.vcxproj
@@ -38,7 +38,7 @@
 {CAD5A7E6-E9F5-4071-AFDA-25F76FDA5442}
 redagent
 Win32Proj
-10.0.10240.0
+10.0.10586.0
   
   
   
diff --git a/vdservice/vdservice.vcxproj b/vdservice/vdservice.vcxproj
index b324802..7cf2628 100644
--- a/vdservice/vdservice.vcxproj
+++ b/vdservice/vdservice.vcxproj
@@ -22,7 +22,7 @@
 {ADFE5E22-31D0-4343-AE9E-8102CC0051F9}
 redservice
 Win32Proj
-8.1
+10.0.10586.0
   
   
   
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 16/16] Fix return value of update_dev_mode_position

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

update_dev_mode_position() should propagate
error of update_mode_position() in case it fails.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 vdagent/display_configuration.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vdagent/display_configuration.cpp 
b/vdagent/display_configuration.cpp
index 98b3d82..59dc032 100644
--- a/vdagent/display_configuration.cpp
+++ b/vdagent/display_configuration.cpp
@@ -361,8 +361,7 @@ bool WDDMInterface::update_dev_mode_position(LPCTSTR 
device_name, DEVMODE* dev_m
 //Convert the position so that the primary is always at (0,0)
 dev_mode->dmPosition.x = x;
 dev_mode->dmPosition.y = y;
-_ccd.update_mode_position(device_name, dev_mode);
-return true;
+return _ccd.update_mode_position(device_name, dev_mode);
 }
 
 bool WDDMInterface::init_d3d_api()
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 08/16] Register path to cximage

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 vdagent/vdagent.vcxproj | 30 ++
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/vdagent/vdagent.vcxproj b/vdagent/vdagent.vcxproj
index 80de609..8ada675 100644
--- a/vdagent/vdagent.vcxproj
+++ b/vdagent/vdagent.vcxproj
@@ -150,11 +150,17 @@
   
   
 $(SolutionDir)$(Platform)\$(Configuration)\
+
+
+  
+  
+
+
   
   
 
   Disabled
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -180,7 +186,7 @@
   
 
   Disabled
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -192,7 +198,7 @@
 
 
   
Version.lib;$(SPICE_DEBUG_LIB_LIST);wtsapi32.lib;%(AdditionalDependencies)
-  
$(SPICE_DEBUG_LIBS_DIR);%(AdditionalLibraryDirectories)
+  
..\cximage\Build\Unicode_Debug\;%(AdditionalLibraryDirectories)
   true
   Windows
   false
@@ -211,7 +217,7 @@
 
 
   Disabled
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -240,7 +246,7 @@
 
 
   Disabled
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -252,7 +258,7 @@
 
 
   
Version.lib;$(SPICE_DEBUG_LIB_LIST);wtsapi32.lib;%(AdditionalDependencies)
-  
$(SPICE_DEBUG_LIBS_DIR);%(AdditionalLibraryDirectories)
+  
..\cximage\Build\Unicode_Debug\;%(AdditionalLibraryDirectories)
   true
   Windows
   false
@@ -267,7 +273,7 @@
   
   
 
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   MultiThreaded
   
@@ -295,7 +301,7 @@
   X64
 
 
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   MultiThreaded
   
@@ -321,12 +327,12 @@
   
 
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   MultiThreaded
 
 
   
Version.lib;$(SPICE_LIB_LIST);wtsapi32.lib;%(AdditionalDependencies)
-  
$(SPICE_LIBS_DIR);%(AdditionalLibraryDirectories)
+  
..\cximage\Build\Unicode_Release\;%(AdditionalLibraryDirectories)
 
 
   
@@ -336,13 +342,13 @@
   
 
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
-  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;..\cximage\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   MultiThreaded
   true
 
 
   
Version.lib;$(SPICE_LIB_LIST);wtsapi32.lib;%(AdditionalDependencies)
-  
$(SPICE_LIBS_DIR);%(AdditionalLibraryDirectories)
+  
..\cximage\Build\Unicode_Release\;%(AdditionalLibraryDirectories)
 
 
   
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH vdagent 06/16] Fix include path to spice-protocol

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 vdagent/vdagent.vcxproj | 16 
 vdservice/vdservice.vcxproj |  8 
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/vdagent/vdagent.vcxproj b/vdagent/vdagent.vcxproj
index 4f6f54a..bffc8a6 100644
--- a/vdagent/vdagent.vcxproj
+++ b/vdagent/vdagent.vcxproj
@@ -154,7 +154,7 @@
   
 
   Disabled
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -180,7 +180,7 @@
   
 
   Disabled
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -211,7 +211,7 @@
 
 
   Disabled
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -240,7 +240,7 @@
 
 
   Disabled
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -267,7 +267,7 @@
   
   
 
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   MultiThreaded
   
@@ -295,7 +295,7 @@
   X64
 
 
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;%(AdditionalIncludeDirectories)
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   MultiThreaded
   
@@ -321,7 +321,7 @@
   
 
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   MultiThreaded
 
 
@@ -336,7 +336,7 @@
   
 
   
WIN32;NDEBUG;_WINDOWS;_WIN32_WINNT=_WIN32_WINNT_WIN10;%(PreprocessorDefinitions)
-  
..\common;$(SPICE_PROTOCOL_DIR);$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;$(SPICE_LIBS)\include\CxImage;$(WindowsSdkDir)\Include\$(TargetPlatformVersion);%(AdditionalIncludeDirectories)
   MultiThreaded
   true
 
diff --git a/vdservice/vdservice.vcxproj b/vdservice/vdservice.vcxproj
index 7ea66ea..b324802 100644
--- a/vdservice/vdservice.vcxproj
+++ b/vdservice/vdservice.vcxproj
@@ -93,7 +93,7 @@
   
 
   Disabled
-  
..\common;$(SPICE_PROTOCOL_DIR);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -117,7 +117,7 @@
 
 
   Disabled
-  
..\common;$(SPICE_PROTOCOL_DIR);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
   
WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   true
   EnableFastChecks
@@ -137,7 +137,7 @@
   
   
 
-  
..\common;$(SPICE_PROTOCOL_DIR);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
   
WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   MultiThreaded
   
@@ -160,7 +160,7 @@
   X64
 
 
-  
..\common;$(SPICE_PROTOCOL_DIR);%(AdditionalIncludeDirectories)
+  
..\common;..\spice-protocol\;%(AdditionalIncludeDirectories)
   
WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)
   MultiThreaded
   
-- 
1.8.3.1

___

[Spice-devel] [RFC PATCH vdagent 05/16] Add .gitignore file

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 .gitignore | 13 +
 1 file changed, 13 insertions(+)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..5db05d8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+.vs/
+Debug/
+Release/
+Win10 Debug/
+Win10 Release/
+vdagent.VC.opendb
+vdagent.sdf
+vdagent/Win10 Debug/
+vdagent/Win10 Release/
+vdagent/vdagent.vcxproj.user
+vdservice/Debug/
+vdservice/Release/
+build*.log
\ No newline at end of file
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 05/28] Add functions called from non-pageable functions to non-paged segments

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Found by Driver Verifier
---
 qxldod/QxlDod.cpp | 55 ---
 1 file changed, 32 insertions(+), 23 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 1225f04..1b3bdf1 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -44,6 +44,7 @@ BYTE PixelMask[BITS_PER_BYTE]  = {0x80, 0x40, 0x20, 0x10, 
0x08, 0x04, 0x02, 0x01
 
 #pragma code_seg(pop)
 
+#pragma code_seg("PAGE")
 
 
 QxlDod::QxlDod(_In_ DEVICE_OBJECT* pPhysicalDeviceObject) : 
m_pPhysicalDevice(pPhysicalDeviceObject),
@@ -1916,6 +1917,20 @@ NTSTATUS QxlDod::RegisterHWInfo(ULONG Id)
 //
 #pragma code_seg(push)
 #pragma code_seg()
+
+UINT BPPFromPixelFormat(D3DDDIFORMAT Format)
+{
+switch (Format) {
+case D3DDDIFMT_UNKNOWN: return 0;
+case D3DDDIFMT_P8: return 8;
+case D3DDDIFMT_R5G6B5: return 16;
+case D3DDDIFMT_R8G8B8: return 24;
+case D3DDDIFMT_X8R8G8B8: // fall through
+case D3DDDIFMT_A8R8G8B8: return 32;
+default: QXL_LOG_ASSERTION1("Unknown D3DDDIFORMAT 0x%I64x", Format); 
return 0;
+}
+}
+
 D3DDDI_VIDEO_PRESENT_SOURCE_ID 
QxlDod::FindSourceForTarget(D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId, BOOLEAN 
DefaultToZero)
 {
 UNREFERENCED_PARAMETER(TargetId);
@@ -1930,7 +1945,6 @@ D3DDDI_VIDEO_PRESENT_SOURCE_ID 
QxlDod::FindSourceForTarget(D3DDDI_VIDEO_PRESENT_
 return DefaultToZero ? 0 : D3DDDI_ID_UNINITIALIZED;
 }
 
-#pragma code_seg(pop) // End Non-Paged Code
 
 //
 // Frame buffer map/unmap
@@ -2278,6 +2292,7 @@ VOID BltBits (
 DbgPrint(TRACE_LEVEL_ERROR, ("Either dst (0x%I64x) or src (0x%I64x) 
bits encountered exception during access.\n", pDst->pBits, pSrc->pBits));
 }
 }
+#pragma code_seg(pop) // End Non-Paged Code
 
 VgaDevice::VgaDevice(_In_ QxlDod* pQxlDod)
 {
@@ -2862,6 +2877,9 @@ VOID VgaDevice::BlackOutScreen(CURRENT_BDD_MODE* 
pCurrentBddMod)
 pCurrentBddMod->ZeroedOutStart.QuadPart = NewPhysAddrStart.QuadPart;
 pCurrentBddMod->ZeroedOutEnd.QuadPart = NewPhysAddrEnd.QuadPart;
 }
+#pragma code_seg(push)
+#pragma code_seg()
+// BEGIN: Non-Paged Code Segment
 
 BOOLEAN VgaDevice::InterruptRoutine(_In_ PDXGKRNL_INTERFACE pDxgkInterface, 
_In_  ULONG MessageNumber)
 {
@@ -2877,6 +2895,7 @@ VOID VgaDevice::DpcRoutine(PVOID)
 VOID VgaDevice::ResetDevice(VOID)
 {
 }
+#pragma  code_seg(pop) //end non-paged code
 
 NTSTATUS  VgaDevice::SetPointerShape(_In_ CONST DXGKARG_SETPOINTERSHAPE* 
pSetPointerShape)
 {
@@ -3530,14 +3549,6 @@ void QxlDevice::InitMspace(UINT32 mspace_type, UINT8 
*start, size_t capacity)
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s _mspace = %p\n", __FUNCTION__, 
m_MSInfo[mspace_type]._mspace));
 }
 
-void QxlDevice::ResetDevice(void)
-{
-DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
-m_RamHdr->int_mask = ~0;
-WRITE_PORT_UCHAR(m_IoBase + QXL_IO_MEMSLOT_ADD, 0);
-DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
-}
-
 NTSTATUS
 QxlDevice::ExecutePresentDisplayOnly(
 _In_ BYTE* DstAddr,
@@ -4484,6 +4495,9 @@ VOID QxlDevice::PushCursor(VOID)
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s notify = %d\n", __FUNCTION__, 
notify));
 }
 
+#pragma code_seg(push)
+#pragma code_seg()
+// BEGIN: Non-Paged Code Segment
 BOOLEAN QxlDevice::InterruptRoutine(_In_ PDXGKRNL_INTERFACE pDxgkInterface, 
_In_  ULONG MessageNumber)
 {
 UNREFERENCED_PARAMETER(MessageNumber);
@@ -4543,6 +4557,15 @@ VOID QxlDevice::DpcRoutine(PVOID ptr)
 DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
 }
 
+void QxlDevice::ResetDevice(void)
+{
+DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
+m_RamHdr->int_mask = ~0;
+WRITE_PORT_UCHAR(m_IoBase + QXL_IO_MEMSLOT_ADD, 0);
+DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
+}
+#pragma code_seg(pop) //end non-paged code
+
 VOID QxlDevice::UpdateArea(CONST RECT* area, UINT32 surface_id)
 {
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
@@ -4569,20 +4592,6 @@ VOID QxlDevice::DpcCallback(PDPC_CB_CONTEXT ctx)
 
 }
 
-UINT BPPFromPixelFormat(D3DDDIFORMAT Format)
-{
-switch (Format)
-{
-case D3DDDIFMT_UNKNOWN: return 0;
-case D3DDDIFMT_P8: return 8;
-case D3DDDIFMT_R5G6B5: return 16;
-case D3DDDIFMT_R8G8B8: return 24;
-case D3DDDIFMT_X8R8G8B8: // fall through
-case D3DDDIFMT_A8R8G8B8: return 32;
-default: QXL_LOG_ASSERTION1("Unknown D3DDDIFORMAT 0x%I64x", Format); 
return 0;
-}
-}
-
 // Given bits per pixel, return the pixel format at the same bpp
 D3DDDIFORMAT PixelFormatFromBPP(UINT BPP)
 {
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 08/28] Use SrcPitch when calculating size of memory to map PresentDisplayOnly

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Otherwise, can result in a BSOD.
---
 qxldod/QxlDod.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 9d13934..7b60e0c 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3606,7 +3606,7 @@ QxlDevice::ExecutePresentDisplayOnly(
 
 {
 // Map Source into kernel space, as Blt will be executed by system 
worker thread
-UINT sizeToMap = SrcBytesPerPixel * ctx->SrcWidth * ctx->SrcHeight;
+UINT sizeToMap = ctx->SrcPitch * ctx->SrcHeight;
 
 PMDL mdl = IoAllocateMdl((PVOID)SrcAddr, sizeToMap,  FALSE, FALSE, 
NULL);
 if(!mdl)
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 23/28] Replacing <#ifdef USE_FRAMEBUFFER> with runtime logic

2016-07-18 Thread Dmitry Fleytman
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 
Signed-off-by: Dmitry Fleytman 
---
 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 f6542c4..a550306 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -219,9 +219,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 c28f97f..41189b3 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:
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 19/28] Add simple build script

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 Tools/vs_cmdline.vbs| 23 +++
 Tools/vs_run.bat| 26 ++
 buildAll.bat| 15 +++
 buildAll_NoSign.bat | 19 +++
 qxldod/buildAll.bat | 31 ---
 qxldod/callVisualStudio.bat | 28 
 qxldod/checkWin8Tools.bat   |  8 
 qxldod/clean.bat| 12 
 8 files changed, 83 insertions(+), 79 deletions(-)
 create mode 100644 Tools/vs_cmdline.vbs
 create mode 100644 Tools/vs_run.bat
 create mode 100644 buildAll.bat
 create mode 100644 buildAll_NoSign.bat
 delete mode 100755 qxldod/buildAll.bat
 delete mode 100755 qxldod/callVisualStudio.bat
 delete mode 100755 qxldod/checkWin8Tools.bat
 delete mode 100755 qxldod/clean.bat

diff --git a/Tools/vs_cmdline.vbs b/Tools/vs_cmdline.vbs
new file mode 100644
index 000..65bd0e5
--- /dev/null
+++ b/Tools/vs_cmdline.vbs
@@ -0,0 +1,23 @@
+Dim strCmdLine, strTemp
+Set WshShell = Wscript.CreateObject("Wscript.Shell")
+
+On Error Resume Next
+strCmdLine = 
WshShell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\InstallDir")
+' In case of error assume WoW64 case
+If Err <> 0 Then
+  On Error Goto 0
+  strCmdLine = 
WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\InstallDir")
+End If
+
+On Error Goto 0
+strCmdLine = chr(34) + strCmdLine + "devenv.com" + chr(34)
+For i = 0 to (Wscript.Arguments.Count - 1)
+  strTemp = Wscript.Arguments(i)
+  If InStr(strTemp, " ") Or InStr(strTemp, "|") Then
+  strCmdLine = strCmdLine + " " + chr(34) + strTemp + chr(34)
+  Else
+  strCmdLine = strCmdLine + " " + strTemp
+  End If
+Next
+
+WScript.Echo strCmdLine + vbCrLf
diff --git a/Tools/vs_run.bat b/Tools/vs_run.bat
new file mode 100644
index 000..b057fe3
--- /dev/null
+++ b/Tools/vs_run.bat
@@ -0,0 +1,26 @@
+@echo off
+
+for /f "tokens=*" %%a in (
+'cscript.exe /nologo "%~dp0\vs_cmdline.vbs" %*'
+) do (
+SET vs_cmd=%%a
+)
+
+IF NOT DEFINED vs_cmd (
+echo Visual Studio not found
+EXIT /b 1
+)
+
+SET vs_cmd_no_quotes="%vs_cmd:"=%"
+IF "vs_cmd_no_quotes" == "" (
+echo Visual Studio not found
+EXIT /b 2
+)
+
+%vs_cmd%
+if %ERRORLEVEL% GEQ 1 (
+echo Build with Visual Studio FAILED
+EXIT /b 3
+)
+
+EXIT /b 0
diff --git a/buildAll.bat b/buildAll.bat
new file mode 100644
index 000..dbbd46b
--- /dev/null
+++ b/buildAll.bat
@@ -0,0 +1,15 @@
+@echo off
+
+SETLOCAL EnableExtensions EnableDelayedExpansion
+
+del *.log
+
+call buildAll_NoSign.bat
+
+call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug|Win32" /Out 
build_Win10_Debug_Win32.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug|x64" /Out 
build_Win10_Debug_x64.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+ENDLOCAL
diff --git a/buildAll_NoSign.bat b/buildAll_NoSign.bat
new file mode 100644
index 000..20f1db4
--- /dev/null
+++ b/buildAll_NoSign.bat
@@ -0,0 +1,19 @@
+@echo off
+
+SETLOCAL EnableExtensions EnableDelayedExpansion
+
+del *.log
+
+call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug_NoSign|Win32" /Out 
build_Win10_Debug_NoSign_Win32.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+call tools\vs_run.bat qxldod.sln /Rebuild "Win10Release|Win32" /Out 
build_Win10_Release_Win32.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug_NoSign|x64" /Out 
build_Win10_Debug_NoSign_x64.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+call tools\vs_run.bat qxldod.sln /Rebuild "Win10Release|x64" /Out 
build_Win10_Release_x64.log
+if !ERRORLEVEL! NEQ 0 exit /B 1
+
+ENDLOCAL
diff --git a/qxldod/buildAll.bat b/qxldod/buildAll.bat
deleted file mode 100755
index 072a2b4..000
--- a/qxldod/buildAll.bat
+++ /dev/null
@@ -1,31 +0,0 @@
-@echo off
-
-call clean.bat
-
-rem WIN8_64
-setlocal
-if exist Install\win8\amd64 rmdir Install\win8\amd64 /s /q
-call callVisualStudio.bat 12 qxldod.vcxproj /Rebuild "Win8 Release|x64" /Out 
buildfre_win8_amd64.log
-mkdir .\Install\Win8\x64
-del /Q .\Install\Win8\x64\*
-copy /Y objfre_win8_amd64\amd64\qxldod.sys .\Install\Win8\x64
-copy /Y objfre_win8_amd64\amd64\qxldod.inf .\Install\Win8\x64
-copy /Y objfre_win8_amd64\amd64\qxldod.cat .\Install\Win8\x64
-copy /Y objfre_win8_amd64\amd64\qxldod.pdb .\Install\Win8\x64
-endlocal
-if %ERRORLEVEL% NEQ 0 goto :eof
-
-rem WIN8_32
-setlocal
-if exist Install\win8\x86 rmdir Install\win8\x86 /s /q
-call callVisualStudio.bat 12 qxldod.vcxproj /Rebuild "Win8 Release|Win32" /Out 
buildfre_win8_x86.log
-mkdir .\Install\Win8\x86
-del /Q .\Install\Win8\x86\*
-copy /Y objfre_win8_x86\i386\qxldod.sys .\Install\Win8\x86
-copy /Y objfre_win8_x86\i386\qxldod.inf .\Install\Win8\x86
-copy /Y objfre_win8_x86\i386\qxldod.cat .\Install\Win8\x86
-copy /Y objfre_win8_x86\i386\qxldod.pdb .\Install\Win8\x86
-endlocal
-if %ERRORLEVEL% NEQ 0 goto :eof
-
-:eof
diff --git a/qxldod/callVisualStudio.bat b/qxldod/callVisualStudio.bat
deleted file mode 

[Spice-devel] [RFC PATCH qxl-wddm-dod 25/28] Support future Qxl revisions

2016-07-18 Thread Dmitry Fleytman
The driver determines operation mode
(QXL or VGA) by checking device hardware
ids including revision id field.

Without this patch driver operates in VGA
mode for all revisions other than 4.

This patch makes driver operate in QXL
mode revision 4 and newer devices.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index a34c728..6d0a525 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -108,7 +108,7 @@ NTSTATUS QxlDod::CheckHardware()
 Status = STATUS_GRAPHICS_DRIVER_MISMATCH;
 if (Header.VendorID == REDHAT_PCI_VENDOR_ID &&
 Header.DeviceID == 0x0100 &&
-Header.RevisionID == 4)
+Header.RevisionID >= 4)
 {
 Status = STATUS_SUCCESS;
 }
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 26/28] Set SupportNonVGA in QueryAdapterInfo callback

2016-07-18 Thread Dmitry Fleytman
This capability flag should be set in order
to indicate to the OS that callback
DxgkDdiStopDeviceAndReleasePostDisplayOwnership
is supported.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 6d0a525..7b3d353 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -433,6 +433,8 @@ NTSTATUS QxlDod::QueryAdapterInfo(_In_ CONST 
DXGKARG_QUERYADAPTERINFO* pQueryAda
 pDriverCaps->PointerCaps.Monochrome = 1;
 pDriverCaps->PointerCaps.Color = 1;
 
+pDriverCaps->SupportNonVGA = TRUE;
+
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s 1\n", __FUNCTION__));
 return STATUS_SUCCESS;
 }
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 03/28] Set DriverStarted flag at the begining of the StartDriver function

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

With the Driver Verifier on, a DPC generated during the call will assert if
the flag is not set.

Changed error handling so that if something fails, the code will break out
of a do loop and reset the flag to false before returning the error status.
---
 qxldod/QxlDod.cpp | 110 +++---
 1 file changed, 54 insertions(+), 56 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 94f2d18..77f4f86 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -113,72 +113,73 @@ NTSTATUS QxlDod::StartDevice(_In_  DXGK_START_INFO*   
pDxgkStartInfo,
 {
 PHYSICAL_ADDRESS PhysicAddress;
 PAGED_CODE();
+NTSTATUS Status;
 QXL_ASSERT(pDxgkStartInfo != NULL);
 QXL_ASSERT(pDxgkInterface != NULL);
 QXL_ASSERT(pNumberOfViews != NULL);
 QXL_ASSERT(pNumberOfChildren != NULL);
-//CHECK ME!
+//CHECK ME!
 RtlCopyMemory(_DxgkInterface, pDxgkInterface, sizeof(m_DxgkInterface));
 RtlZeroMemory(m_CurrentModes, sizeof(m_CurrentModes));
-//CHECK ME!
+//CHECK ME!
 m_CurrentModes[0].DispInfo.TargetId = D3DDDI_ID_UNINITIALIZED;
-// Get device information from OS.
-NTSTATUS Status = 
m_DxgkInterface.DxgkCbGetDeviceInformation(m_DxgkInterface.DeviceHandle, 
_DeviceInfo);
-if (!NT_SUCCESS(Status))
-{
-QXL_LOG_ASSERTION1("DxgkCbGetDeviceInformation failed with status 
0x%X\n",
-   Status);
-return Status;
-}
+m_Flags.DriverStarted = TRUE;
+do {
 
-Status = CheckHardware();
-if (NT_SUCCESS(Status))
-{
-m_pHWDevice = new(NonPagedPoolNx) QxlDevice(this);
-}
-else
-{
-m_pHWDevice = new(NonPagedPoolNx) VgaDevice(this);
-}
+// Get device information from OS.
+Status = 
m_DxgkInterface.DxgkCbGetDeviceInformation(m_DxgkInterface.DeviceHandle, 
_DeviceInfo);
+if (!NT_SUCCESS(Status)) {
+QXL_LOG_ASSERTION1("DxgkCbGetDeviceInformation failed with status 
0x%X\n",
+Status);
+break;
+}
 
-if (!m_pHWDevice)
-{
-Status = STATUS_NO_MEMORY;
-DbgPrint(TRACE_LEVEL_ERROR, ("HWInit failed to allocate memory\n"));
-return Status;
-}
+Status = CheckHardware();
+if (NT_SUCCESS(Status)) {
+m_pHWDevice = new(NonPagedPoolNx) QxlDevice(this);
+}
+else {
+m_pHWDevice = new(NonPagedPoolNx) VgaDevice(this);
+}
 
-Status = m_pHWDevice->HWInit(m_DeviceInfo.TranslatedResourceList, 
_CurrentModes[0].DispInfo);
-if (!NT_SUCCESS(Status))
-{
-DbgPrint(TRACE_LEVEL_ERROR, ("HWInit failed with status 0x%X\n", 
Status));
-return Status;
-}
+if (!m_pHWDevice) {
+Status = STATUS_NO_MEMORY;
+DbgPrint(TRACE_LEVEL_ERROR, ("HWInit failed to allocate 
memory\n"));
+break;
+}
 
-Status = RegisterHWInfo(m_pHWDevice->GetId());
-if (!NT_SUCCESS(Status))
-{
-QXL_LOG_ASSERTION1("RegisterHWInfo failed with status 0x%X\n",
-   Status);
-return Status;
-}
+Status = m_pHWDevice->HWInit(m_DeviceInfo.TranslatedResourceList, 
_CurrentModes[0].DispInfo);
+if (!NT_SUCCESS(Status)) {
+DbgPrint(TRACE_LEVEL_ERROR, ("HWInit failed with status 0x%X\n", 
Status));
+break;
+}
 
-PhysicAddress.QuadPart = m_CurrentModes[0].DispInfo.PhysicAddress.QuadPart;
-if (m_pHWDevice->GetId() == 0)
-{
- Status = 
m_DxgkInterface.DxgkCbAcquirePostDisplayOwnership(m_DxgkInterface.DeviceHandle, 
&(m_CurrentModes[0].DispInfo));
-}
+Status = RegisterHWInfo(m_pHWDevice->GetId());
+if (!NT_SUCCESS(Status)) {
+QXL_LOG_ASSERTION1("RegisterHWInfo failed with status 0x%X\n",
+Status);
+break;
+}
 
-if (!NT_SUCCESS(Status) )
-{
-DbgPrint(TRACE_LEVEL_ERROR, ("DxgkCbAcquirePostDisplayOwnership failed 
with status 0x%X Width = %d\n",
-   Status, m_CurrentModes[0].DispInfo.Width));
-return STATUS_UNSUCCESSFUL;
+PhysicAddress.QuadPart = 
m_CurrentModes[0].DispInfo.PhysicAddress.QuadPart;
+if (m_pHWDevice->GetId() == 0) {
+Status = 
m_DxgkInterface.DxgkCbAcquirePostDisplayOwnership(m_DxgkInterface.DeviceHandle, 
&(m_CurrentModes[0].DispInfo));
+}
+
+if (!NT_SUCCESS(Status)) {
+DbgPrint(TRACE_LEVEL_ERROR, ("DxgkCbAcquirePostDisplayOwnership 
failed with status 0x%X Width = %d\n",
+Status, m_CurrentModes[0].DispInfo.Width));
+Status = STATUS_UNSUCCESSFUL;
+break;
+}
+} while (0);
+if (!NT_SUCCESS(Status)) {
+m_Flags.DriverStarted = FALSE;
+return Status;
 }
 
-if (m_CurrentModes[0].DispInfo.Width == 0)
-{
-

[Spice-devel] [RFC PATCH qxl-wddm-dod 16/28] Enable HW cursor support and fix handling of monochrome cursors.

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

* Turn on enable pointer
* Allow for 1bpp bitmap followed by 1bpp XOR map.
---
 qxldod/QxlDod.cpp | 19 +++
 qxldod/QxlDod.h   |  2 +-
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index ff987c4..3139092 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -4383,6 +4383,7 @@ NTSTATUS  QxlDevice::SetPointerShape(_In_ CONST 
DXGKARG_SETPOINTERSHAPE* pSetPoi
 UINT8 *now;
 UINT8 *end;
 int line_size;
+int num_images = 1;
 
 cursor_cmd = CursorCmd();
 cursor_cmd->type = QXL_CURSOR_SET;
@@ -4405,16 +4406,17 @@ NTSTATUS  QxlDevice::SetPointerShape(_In_ CONST 
DXGKARG_SETPOINTERSHAPE* pSetPoi
 cursor->header.width = (UINT16)pSetPointerShape->Width;
 cursor->header.height = (UINT16)pSetPointerShape->Height;
 if (cursor->header.type == SPICE_CURSOR_TYPE_MONO) {
-cursor->header.height >>= 1;
 line_size = ALIGN(cursor->header.width, 8) >> 3;
+cursor->data_size = line_size * pSetPointerShape->Height * 2;
+num_images = 2;
 } else {
 line_size = cursor->header.width << 2;
+cursor->data_size = line_size * pSetPointerShape->Height;
 }
 
 cursor->header.hot_spot_x = (UINT16)pSetPointerShape->XHot;
 cursor->header.hot_spot_y = (UINT16)pSetPointerShape->YHot;
 
-cursor->data_size = line_size * pSetPointerShape->Height;
 DbgPrint(TRACE_LEVEL_INFORMATION, ("<--> %s %d::%d::%d::%d::%d\n", 
__FUNCTION__, cursor->header.width, cursor->header.height, 
cursor->header.hot_spot_x, cursor->header.hot_spot_y, cursor->data_size));
 
 chunk = >chunk;
@@ -4426,7 +4428,7 @@ NTSTATUS  QxlDevice::SetPointerShape(_In_ CONST 
DXGKARG_SETPOINTERSHAPE* pSetPoi
 now = chunk->data;
 end = (UINT8 *)res + CURSOR_ALLOC_SIZE;
 
-src_end = src + (pSetPointerShape->Pitch * pSetPointerShape->Height);
+src_end = src + (pSetPointerShape->Pitch * pSetPointerShape->Height * 
num_images);
 for (; src != src_end; src += pSetPointerShape->Pitch) {
 PutBytesAlign(, , , src, line_size,
  PAGE_SIZE, 1);
@@ -4449,14 +4451,15 @@ NTSTATUS QxlDevice::SetPointerPosition(_In_ CONST 
DXGKARG_SETPOINTERPOSITION* pS
  pSetPointerPosition->VidPnSourceId,
  pSetPointerPosition->X,
  pSetPointerPosition->Y));
-if (EnablePointer()) {
+if (!EnablePointer()) {
 QXLCursorCmd *cursor_cmd = CursorCmd();
 if (pSetPointerPosition->X < 0) {
cursor_cmd->type = QXL_CURSOR_HIDE;
-} else {
-   cursor_cmd->type = QXL_CURSOR_MOVE;
-   cursor_cmd->u.position.x = (INT16)pSetPointerPosition->X;
-   cursor_cmd->u.position.y = (INT16)pSetPointerPosition->Y;
+}
+else {
+cursor_cmd->type = QXL_CURSOR_MOVE;
+cursor_cmd->u.position.x = (INT16) pSetPointerPosition->X;
+cursor_cmd->u.position.y = (INT16) pSetPointerPosition->Y;
 }
 PushCursorCmd(cursor_cmd);
 }
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index 8ecae19..9bc0bdb 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -462,7 +462,7 @@ public:
 NTSTATUS SetPowerState(DEVICE_POWER_STATE DevicePowerState, 
DXGK_DISPLAY_INFORMATION* pDispInfo);
 NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* 
pDispInfo);
 NTSTATUS HWClose(void);
-BOOLEAN EnablePointer(void) { return FALSE; }
+BOOLEAN EnablePointer(void) { return TRUE; }
 NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
 _In_ UINT  DstBitPerPixel,
 _In_ BYTE* SrcAddr,
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 04/28] Fix Code Integrity error generated by the Drive Verifier

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Add MdlMappingNoExecute to MmGetSystemAddressForMDLSafe call in
ExecutePresentDisplayOnly.
---
 qxldod/QxlDod.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 77f4f86..1225f04 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -2720,7 +2720,7 @@ VgaDevice::ExecutePresentDisplayOnly(
 // Note: double mapping the buffer this way causes lot of system
 // overhead for large size buffers.
 ctx->SrcAddr = reinterpret_cast
-(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority ));
+(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority | 
MdlMappingNoExecute));
 
 if(!ctx->SrcAddr) {
 Status = STATUS_INSUFFICIENT_RESOURCES;
@@ -3619,7 +3619,7 @@ QxlDevice::ExecutePresentDisplayOnly(
 // Note: double mapping the buffer this way causes lot of system
 // overhead for large size buffers.
 ctx->SrcAddr = reinterpret_cast
-(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority ));
+(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority | 
MdlMappingNoExecute));
 
 if(!ctx->SrcAddr) {
 Status = STATUS_INSUFFICIENT_RESOURCES;
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 10/28] Add arbitrary resolution and monitors_config Escape

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Implement the escapes for the qxl driver and add some debug output for multiple 
monitor support
---
 qxldod/QxlDod.cpp| 162 ++-
 qxldod/QxlDod.h  |  11 ++-
 qxldod/include/qxl_windows.h |   1 +
 3 files changed, 124 insertions(+), 50 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 0ee45a9..a1718a4 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -47,6 +47,14 @@ BYTE PixelMask[BITS_PER_BYTE]  = {0x80, 0x40, 0x20, 0x10, 
0x08, 0x04, 0x02, 0x01
((ULONG)LOWER_5_BITS((Pixel)) << 
SHIFT_LOWER_5_IN_565_BACK))
 
 
+typedef struct _QXL_ESCAPE {
+int ioctl;
+union {
+QXLEscapeSetCustomDisplay custom_display;
+QXLHead monitor_config;
+};
+}QXL_ESCAPE;
+
 #pragma code_seg(pop)
 
 #pragma code_seg("PAGE")
@@ -474,19 +482,7 @@ NTSTATUS QxlDod::Escape(_In_ CONST DXGKARG_ESCAPE* pEscape)
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<---> %s Flags = %d\n", __FUNCTION__, 
pEscape->Flags));
 
 Status = m_pHWDevice->Escape(pEscape);
-if (Status == STATUS_SUCCESS)
-{
-DXGK_CHILD_STATUS ChildStatus;
-ChildStatus.Type = StatusConnection;
-ChildStatus.ChildUid = 0;
-ChildStatus.HotPlug.Connected = FALSE;
-Status = 
m_DxgkInterface.DxgkCbIndicateChildStatus(m_DxgkInterface.DeviceHandle, 
);
-if (Status == STATUS_SUCCESS)
-{
-ChildStatus.HotPlug.Connected = TRUE;
-Status = 
m_DxgkInterface.DxgkCbIndicateChildStatus(m_DxgkInterface.DeviceHandle, 
);
-}
-}
+
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<---> %s Status = %x\n", __FUNCTION__, 
Status));
 return Status;
 }
@@ -613,7 +609,7 @@ NTSTATUS QxlDod::QueryVidPnHWCapability(_Inout_ 
DXGKARG_QUERYVIDPNHWCAPABILITY*
 NTSTATUS QxlDod::IsSupportedVidPn(_Inout_ DXGKARG_ISSUPPORTEDVIDPN* 
pIsSupportedVidPn)
 {
 PAGED_CODE();
-DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
+DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s %d\n", __FUNCTION__, 
m_pHWDevice->Id()));
 
 QXL_ASSERT(pIsSupportedVidPn != NULL);
 
@@ -935,7 +931,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST 
DXGKARG_ENUMVIDPNCOFUNCMODAL
 PAGED_CODE();
 
 QXL_ASSERT(pEnumCofuncModality != NULL);
-DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
+DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s device %d\n", __FUNCTION__, 
m_pHWDevice->Id()));
 
 D3DKMDT_HVIDPNTOPOLOGY   hVidPnTopology = 0;
 D3DKMDT_HVIDPNSOURCEMODESET  hVidPnSourceModeSet = 0;
@@ -1291,7 +1287,7 @@ NTSTATUS QxlDod::EnumVidPnCofuncModality(_In_ CONST 
DXGKARG_ENUMVIDPNCOFUNCMODAL
 NTSTATUS QxlDod::SetVidPnSourceVisibility(_In_ CONST 
DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility)
 {
 PAGED_CODE();
-DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
+DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s %d\n", __FUNCTION__, 
m_pHWDevice->Id()));
 QXL_ASSERT(pSetVidPnSourceVisibility != NULL);
 QXL_ASSERT((pSetVidPnSourceVisibility->VidPnSourceId < MAX_VIEWS) ||
(pSetVidPnSourceVisibility->VidPnSourceId == D3DDDI_ID_ALL));
@@ -3120,17 +3116,20 @@ NTSTATUS QxlDevice::QueryCurrentMode(PVIDEO_MODE 
RequestedMode)
 
 NTSTATUS QxlDevice::SetCurrentMode(ULONG Mode)
 {
-DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s Mode = %x\n", __FUNCTION__, Mode));
+DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s - %d: Mode = %d\n", 
__FUNCTION__, m_Id, Mode));
 for (ULONG idx = 0; idx < GetModeCount(); idx++)
 {
 if (Mode == m_ModeNumbers[idx])
 {
 DestroyPrimarySurface();
 CreatePrimarySurface(_ModeInfo[idx]);
+DbgPrint(TRACE_LEVEL_INFORMATION, ("%s device %d: setting current 
mode %d (%d x %d)\n",
+__FUNCTION__, m_Id, Mode, m_ModeInfo[idx].VisScreenWidth,
+m_ModeInfo[idx].VisScreenHeight));
 return STATUS_SUCCESS;
 }
 }
-DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
+DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s failed\n", __FUNCTION__));
 return STATUS_UNSUCCESSFUL;
 }
 
@@ -3328,6 +3327,7 @@ NTSTATUS QxlDevice::QxlInit(DXGK_DISPLAY_INFORMATION* 
pDispInfo)
 m_RamHdr->int_mask = WIN_QXL_INT_MASK;
 CreateMemSlots();
 InitDeviceMemoryResources();
+InitMonitorConfig();
 return Status;
 }
 
@@ -3393,7 +3393,8 @@ void QxlDevice::DestroyMemSlots(void)
 void QxlDevice::CreatePrimarySurface(PVIDEO_MODE_INFORMATION pModeInfo)
 {
 QXLSurfaceCreate *primary_surface_create;
-DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
+DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s - %d: (%d x %d)\n", 
__FUNCTION__, m_Id, 
+pModeInfo->VisScreenWidth, pModeInfo->VisScreenHeight));
 primary_surface_create = _RamHdr->create_surface;
 primary_surface_create->format = pModeInfo->BitsPerPlane;
   

[Spice-devel] [RFC PATCH qxl-wddm-dod 24/28] Fixing framebuffer usage logic

2016-07-18 Thread Dmitry Fleytman
This patch fixes 2 issues:

  1. Framebuffer should only be used in vga mode,
 therefore when QxlDevice is active
 FrameBufferIsActive flag shouldn't be checked;
  2. FrameBufferIsActive flag should be set true
 on successfull frame buffer allocation only.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.cpp | 101 ++
 1 file changed, 49 insertions(+), 52 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index a550306..a34c728 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -512,40 +512,37 @@ NTSTATUS QxlDod::PresentDisplayOnly(_In_ CONST 
DXGKARG_PRESENT_DISPLAYONLY* pPre
 return STATUS_SUCCESS;
 }
 
-if 
(m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].Flags.FrameBufferIsActive)
-{
-
-// If actual pixels are coming through, will need to completely zero 
out physical address next time in BlackOutScreen
-
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].ZeroedOutStart.QuadPart = 0;
-
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].ZeroedOutEnd.QuadPart = 0;
 
-
-D3DKMDT_VIDPN_PRESENT_PATH_ROTATION RotationNeededByFb = 
pPresentDisplayOnly->Flags.Rotate ?
- 
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].Rotation :
- 
D3DKMDT_VPPR_IDENTITY;
-BYTE* pDst = 
(BYTE*)m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].FrameBuffer.Ptr;
-UINT DstBitPerPixel = 
BPPFromPixelFormat(m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.ColorFormat);
-if (m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].Scaling == 
D3DKMDT_VPPS_CENTERED)
-{
-UINT CenterShift = 
(m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.Height -
-
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].SrcModeHeight)*m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.Pitch;
-CenterShift += 
(m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.Width -
-
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].SrcModeWidth)*DstBitPerPixel/8;
-pDst += (int)CenterShift/2;
-}
-Status = m_pHWDevice->ExecutePresentDisplayOnly(
-pDst,
-DstBitPerPixel,
-(BYTE*)pPresentDisplayOnly->pSource,
-pPresentDisplayOnly->BytesPerPixel,
-pPresentDisplayOnly->Pitch,
-pPresentDisplayOnly->NumMoves,
-pPresentDisplayOnly->pMoves,
-pPresentDisplayOnly->NumDirtyRects,
-pPresentDisplayOnly->pDirtyRect,
-RotationNeededByFb,
-_CurrentModes[0]);
-}
+// If actual pixels are coming through, will need to completely zero out 
physical address next time in BlackOutScreen
+m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].ZeroedOutStart.QuadPart 
= 0;
+m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].ZeroedOutEnd.QuadPart = 
0;
+
+
+D3DKMDT_VIDPN_PRESENT_PATH_ROTATION RotationNeededByFb = 
pPresentDisplayOnly->Flags.Rotate ?
+ 
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].Rotation :
+ 
D3DKMDT_VPPR_IDENTITY;
+BYTE* pDst = 
(BYTE*)m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].FrameBuffer.Ptr;
+UINT DstBitPerPixel = 
BPPFromPixelFormat(m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.ColorFormat);
+if (m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].Scaling == 
D3DKMDT_VPPS_CENTERED)
+{
+UINT CenterShift = 
(m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.Height -
+
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].SrcModeHeight)*m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.Pitch;
+CenterShift += 
(m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].DispInfo.Width -
+
m_CurrentModes[pPresentDisplayOnly->VidPnSourceId].SrcModeWidth)*DstBitPerPixel/8;
+pDst += (int)CenterShift/2;
+}
+Status = m_pHWDevice->ExecutePresentDisplayOnly(
+pDst,
+DstBitPerPixel,
+(BYTE*)pPresentDisplayOnly->pSource,
+pPresentDisplayOnly->BytesPerPixel,
+pPresentDisplayOnly->Pitch,
+pPresentDisplayOnly->NumMoves,
+pPresentDisplayOnly->pMoves,
+pPresentDisplayOnly->NumDirtyRects,
+pPresentDisplayOnly->pDirtyRect,
+

[Spice-devel] [RFC PATCH qxl-wddm-dod 09/28] Remove unused notify present display only interrupt and fix interrupt mask

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

This interrupt is used for asynchronous present calls.
Fixed the interrupt mask to reflect currently used interrupts.
---
 qxldod/QxlDod.cpp | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 7b60e0c..0ee45a9 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -4,6 +4,11 @@
 
 #pragma code_seg(push)
 #pragma code_seg()
+
+#define WIN_QXL_INT_MASK ((QXL_INTERRUPT_DISPLAY) | \
+  (QXL_INTERRUPT_CURSOR) | \
+  (QXL_INTERRUPT_IO_CMD)) 
+
 // BEGIN: Non-Paged Code
 
 // Bit is 1 from Idx to end of byte, with bit count starting at high order
@@ -3320,7 +3325,7 @@ NTSTATUS QxlDevice::QxlInit(DXGK_DISPLAY_INFORMATION* 
pDispInfo)
 
 WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_RESET), 0);
 CreateRings();
-m_RamHdr->int_mask = ~0;
+m_RamHdr->int_mask = WIN_QXL_INT_MASK;
 CreateMemSlots();
 InitDeviceMemoryResources();
 return Status;
@@ -4514,17 +4519,12 @@ BOOLEAN QxlDevice::HWInterruptRoutine(_In_ 
PDXGKRNL_INTERFACE pDxgkInterface, _I
 WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_UPDATE_IRQ), 0);
 m_Pending |= m_RamHdr->int_pending;
 m_RamHdr->int_pending = 0;
-
-DXGKARGCB_NOTIFY_INTERRUPT_DATA  notifyInt;
-notifyInt.InterruptType = DXGK_INTERRUPT_DISPLAYONLY_PRESENT_PROGRESS;
-notifyInt.DisplayOnlyPresentProgress.VidPnSourceId = 0;
-
-
pDxgkInterface->DxgkCbNotifyInterrupt(pDxgkInterface->DeviceHandle,);
 if (!pDxgkInterface->DxgkCbQueueDpc(pDxgkInterface->DeviceHandle)) {
-m_RamHdr->int_mask = ~0;
-WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_UPDATE_IRQ), 0);
+m_RamHdr->int_mask = WIN_QXL_INT_MASK;
+WRITE_PORT_UCHAR((PUCHAR) (m_IoBase + QXL_IO_UPDATE_IRQ), 0);
 DbgPrint(TRACE_LEVEL_FATAL, ("---> %s DxgkCbQueueDpc failed\n", 
__FUNCTION__));
 }
+DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
 return TRUE;
 }
 
@@ -4554,7 +4554,7 @@ VOID QxlDevice::HWDpcRoutine(PDXGKRNL_INTERFACE 
pDxgkInterface)
 DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s m_IoCmdEvent\n", 
__FUNCTION__));
 KeSetEvent (_IoCmdEvent, IO_NO_INCREMENT, FALSE);
 }
-m_RamHdr->int_mask = ~0;
+m_RamHdr->int_mask = WIN_QXL_INT_MASK;
 WRITE_PORT_UCHAR((PUCHAR)(m_IoBase + QXL_IO_UPDATE_IRQ), 0);
 
 DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
@@ -4563,7 +4563,7 @@ VOID QxlDevice::HWDpcRoutine(PDXGKRNL_INTERFACE 
pDxgkInterface)
 void QxlDevice::HWResetDevice(void)
 {
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
-m_RamHdr->int_mask = ~0;
+m_RamHdr->int_mask = WIN_QXL_INT_MASK;
 WRITE_PORT_UCHAR(m_IoBase + QXL_IO_MEMSLOT_ADD, 0);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
 }
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 14/28] Comment out frame buffer mapping.

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 18/28] Unify build output directories

2016-07-18 Thread Dmitry Fleytman
Signed-off-by: Dmitry Fleytman 
---
 qxldod Package/qxldod Package.vcxproj  | 81 ++--
 qxldod Package/qxldod Package.vcxproj.user | 15 ++
 qxldod.sln | 69 +++-
 qxldod/qxldod.vcxproj  | 87 --
 qxldod/qxldod.vcxproj.user | 15 ++
 5 files changed, 221 insertions(+), 46 deletions(-)
 create mode 100644 qxldod Package/qxldod Package.vcxproj.user
 create mode 100644 qxldod/qxldod.vcxproj.user

diff --git a/qxldod Package/qxldod Package.vcxproj b/qxldod Package/qxldod 
Package.vcxproj
index 76fb33b..a0c0cb8 100755
--- a/qxldod Package/qxldod Package.vcxproj 
+++ b/qxldod Package/qxldod Package.vcxproj 
@@ -1,20 +1,28 @@
 
 http://schemas.microsoft.com/developer/msbuild/2003;>
   
-
-  Win10 Debug
+
+  Win10Debug_NoSign
   Win32
 
-
-  Win10 Debug
+
+  Win10Debug_NoSign
   x64
 
-
-  Win10 Release
+
+  Win10Debug
   Win32
 
-
-  Win10 Release
+
+  Win10Debug
+  x64
+
+
+  Win10Release
+  Win32
+
+
+  Win10Release
   x64
 
   
@@ -29,6 +37,8 @@
   
 qxldod_Package
 $(VCTargetsPath11)
+
$(LatestTargetPlatformVersion)
+qxldod_Package
   
   
 Utility
@@ -36,25 +46,35 @@
 true
   
   
-  
+  
 
 
 false
 WindowsKernelModeDriver10.0
   
-  
+  
+
+false
+WindowsKernelModeDriver10.0
+  
+  
 
 
 false
 WindowsKernelModeDriver10.0
   
-  
+  
 
 
 false
 WindowsKernelModeDriver10.0
   
-  
+  
+
+false
+WindowsKernelModeDriver10.0
+  
+  
 
 
 false
@@ -67,7 +87,9 @@
 
   
   
-  
+  
+$(SolutionDir)\build\$(Platform)\$(ConfigurationName)\
+  
   
 DbgengKernelDebugger
 False
@@ -81,22 +103,47 @@
 
 133563
   
-  
+  
+$(SolutionDir)\build\$(Platform)\$(ConfigurationName)\
+  
+  
+$(SolutionDir)\build\$(Platform)\$(ConfigurationName)\
+  
+  
+$(SolutionDir)\build\$(Platform)\$(ConfigurationName)\
+  
+  
+$(SolutionDir)\build\$(Platform)\$(ConfigurationName)\
+  
+  
+$(SolutionDir)\build\$(Platform)\$(ConfigurationName)\
+  
+  
+
+  
8_x64,Server8_x64,Server6_3_x64,6_3_x64
+
+  
+  
+
+  
8_x64,Server8_x64,Server6_3_x64,6_3_x64
+
+  
+  
 
   
8_x64,Server8_x64,Server6_3_x64,6_3_x64
 
   
-  
+  
 
   
8_x64,Server8_x64,Server6_3_x64,6_3_x64
 
   
-  
+  
 
   
8_x64,Server8_x64,Server6_3_x64,6_3_x64
 
   
-  
+  
 
   
8_x64,Server8_x64,Server6_3_x64,6_3_x64
 
diff --git a/qxldod Package/qxldod Package.vcxproj.user b/qxldod Package/qxldod 
Package.vcxproj.user
new file mode 100644
index 000..14b3bb5
--- /dev/null
+++ b/qxldod Package/qxldod Package.vcxproj.user
@@ -0,0 +1,15 @@
+
+http://schemas.microsoft.com/developer/msbuild/2003;>
+  
+Off
+  
+  
+Off
+  
+  
+Off
+  
+  
+Off
+  
+
\ No newline at end of file
diff --git a/qxldod.sln b/qxldod.sln
index 5b79b02..5989215 100755
--- a/qxldod.sln
+++ b/qxldod.sln
@@ -1,10 +1,10 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+VisualStudioVersion = 14.0.25123.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxldod", 
"qxldod\qxldod.vcxproj", "{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxldod Package", "qxldod 
Package\qxldod Package.vcxproj", "{B8C04B51-4207-491D-A7DD-C54861E8B528}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxldod_Package", "qxldod 
Package\qxldod Package.vcxproj", "{B8C04B51-4207-491D-A7DD-C54861E8B528}"
ProjectSection(ProjectDependencies) = postProject
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD} = 
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}
EndProjectSection
@@ -13,31 +13,50 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = 
"Solution Items", "Solution
 EndProject
 Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
-   Win10 Debug|Win32 = Win10 Debug|Win32
-   Win10 Debug|x64 = Win10 Debug|x64
-   Win10 Release|Win32 = Win10 Release|Win32
-   Win10 Release|x64 = Win10 Release|x64
+   Win10Debug_NoSign|Win32 = Win10Debug_NoSign|Win32
+   Win10Debug_NoSign|x64 = Win10Debug_NoSign|x64
+   Win10Debug|Win32 = Win10Debug|Win32
+   Win10Debug|x64 = Win10Debug|x64
+   Win10Release|Win32 = Win10Release|Win32
+   Win10Release|x64 = Win10Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|Win32.ActiveCfg = Win10Debug|Win32
-   

[Spice-devel] [RFC PATCH qxl-wddm-dod 28/28] Fixing Move rectangles implementation

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

As documented in MSDN, "DxgkDdiPresentDisplayOnly" should copy
each "move rectangle" from a given source point in the source buffer
to the destination. The current implementation dosen't take into account
the shift of the given source point at all. This patch fixies the issue.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.cpp | 17 -
 qxldod/QxlDod.h   |  3 ++-
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 0ec00fe..4c3835c 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3748,20 +3748,26 @@ QxlDevice::ExecutePresentDisplayOnly(
 BltBits(,
 ,
 1,
-pDestRect);
+pDestRect,
+pSourcePoint);
 }
 
 // Copy all the dirty rects from source image to video frame buffer.
 for (UINT i = 0; i < ctx->NumDirtyRects; i++)
 {
 RECT*pDirtyRect = >DirtyRect[i];
+POINT   sourcePoint;
+sourcePoint.x = pDirtyRect->left;
+sourcePoint.y = pDirtyRect->top;
+
 DbgPrint(TRACE_LEVEL_INFORMATION, ("--- %d pDirtyRect->bottom = %ld, 
pDirtyRect->left = %ld, pDirtyRect->right = %ld, pDirtyRect->top = %ld\n", 
 i, pDirtyRect->bottom, pDirtyRect->left, pDirtyRect->right, 
pDirtyRect->top));
 
 BltBits(,
 ,
 1,
-pDirtyRect);
+pDirtyRect,
+);
 }
 
 // Unmap unmap and unlock the pages.
@@ -4189,7 +4195,8 @@ VOID QxlDevice::BltBits (
 BLT_INFO* pDst,
 CONST BLT_INFO* pSrc,
 UINT  NumRects,
-_In_reads_(NumRects) CONST RECT *pRects)
+_In_reads_(NumRects) CONST RECT *pRects,
+POINT*   pSourcePoint)
 {
 PAGED_CODE();
 QXLDrawable *drawable;
@@ -4254,8 +4261,8 @@ VOID QxlDevice::BltBits (
 internal->image.bitmap.stride = line_size;
 
 UINT8* src = (UINT8*)pSrc->pBits+
-(pRect->top) * pSrc->Pitch +
-(pRect->left * 4);
+(pSourcePoint->y) * pSrc->Pitch +
+(pSourcePoint->x * 4);
 UINT8* src_end = src - pSrc->Pitch;
 src += pSrc->Pitch * (height - 1);
 UINT8* dest = chunk->data;
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index 0757648..5caa43c 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -487,7 +487,8 @@ protected:
 VOID BltBits (BLT_INFO* pDst,
 CONST BLT_INFO* pSrc,
 UINT  NumRects,
-_In_reads_(NumRects) CONST RECT *pRects);
+_In_reads_(NumRects) CONST RECT *pRects,
+POINT*   pSourcePoint);
 QXLDrawable *Drawable(UINT8 type,
 CONST RECT *area,
 CONST RECT *clip,
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 02/28] Add printer class to dump debug print statements to kernel debugger output

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Allows the usage of Kd_IHVVIDEO_Mask to control print level while debugging
---
 qxldod/driver.cpp | 24 +++-
 qxldod/driver.h   | 22 ++
 2 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/qxldod/driver.cpp b/qxldod/driver.cpp
index 4d1913c..2098421 100755
--- a/qxldod/driver.cpp
+++ b/qxldod/driver.cpp
@@ -667,7 +667,29 @@ void DebugPrintFunc(const char *format, ...)
 va_start(list, format);
 vDbgPrintEx(DPFLTR_DEFAULT_ID, 9 | DPFLTR_MASK, format, list);
 }
+ULONG kd_debug_printer::_xlate [] = { 0, 0, 1, 2, 3 };
+
+kd_debug_printer::kd_debug_printer(ULONG level) : _off(FALSE)
+{
+if (!level || level > 5) {
+_off = TRUE;
+_level = 0x;
+
+}
+else {
+_level = _xlate[level - 1];
+}
+}
+
+void kd_debug_printer::print(const char * fmt, ...)
+{
+va_list list;
+va_start(list, fmt);
+if (_off) {
+return;
+}
+vDbgPrintEx(DPFLTR_IHVVIDEO_ID, _level, fmt, list);
+}
 #endif
 
 #pragma code_seg(pop) // End Non-Paged Code
-
diff --git a/qxldod/driver.h b/qxldod/driver.h
index e64c098..d7f7bf8 100755
--- a/qxldod/driver.h
+++ b/qxldod/driver.h
@@ -208,15 +208,29 @@ DodSystemDisplayWrite(
 _In_  UINT  PositionY);
 
 #if DBG
+class kd_debug_printer 
+{
+public:
+kd_debug_printer(ULONG level);
+void print(const char * fmt, ...);
+private:
+ULONG _level;
+BOOLEAN _off;
+static ULONG _xlate[6];
+ };
 
 extern int nDebugLevel;
 void DebugPrintFuncSerial(const char *format, ...);
 
-void DebugPrintFunc(const char *format, ...);
+void DebugPrintFunc(const char *format, ...);
+
+#define DbgPrint(level, line)   \
+if (level > nDebugLevel) {} \
+else {  \
+   DebugPrintFuncSerial line;   \
+ }  \
+ kd_debug_printer(level).print line
 
-#define DbgPrint(level, line) \
-if (level > nDebugLevel) {} \
-else DebugPrintFuncSerial line
 #else
 #define DbgPrint(level, line) 
 #endif
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 00/28] Win10 support patches

2016-07-18 Thread Dmitry Fleytman
This series contains the latest patches to support Windows 10.

Current patches may be compiled and will work for Windows 10 only.
Visual Studio 2015 with Win10 WDK is required to compile this code.

This series is RFC and not intended for commit. The plan is to
rebase patches on top of current QXL upstream repository,
and restore backward compatibility with pre-Win10 OS versions.

Dmitry Fleytman (6):
  Unify build output directories
  Add simple build script
  Replacing <#ifdef USE_FRAMEBUFFER> with runtime logic
  Fixing framebuffer usage logic
  Support future Qxl revisions
  Set SupportNonVGA in QueryAdapterInfo callback

Sameeh Jubran (5):
  Adding ioctl operation for updating Vdagent state
  Fixing mouse pointer issue when Vdagent is off
  Replacing tabs with spaces
  Fix source buffer mapping in PresentDisplayOnly
  Fixing Move rectangles implementation

Sandy Stutsman (17):
  Upgrade to Windows 10 WDK
  Add printer class to dump debug print statements to kernel debugger
output
  Set DriverStarted flag at the begining of the StartDriver function
  Fix Code Integrity error generated by the Drive Verifier
  Add functions called from non-pageable functions to non-paged segments
  Do not use virtual functions for code that must not be paged
  On power wake call the init functions before setting the vidpn to
black.  Otherwise, BSOD.
  Use SrcPitch when calculating size of memory to map PresentDisplayOnly
  Remove unused notify present display only interrupt and fix interrupt
mask
  Add arbitrary resolution and monitors_config Escape
  Code Analysis clean up.
  Use the second bar (VRAM) for qxl command buffer.
  Set Allow Date, Time and Timestamp property for all builds/platforms
  Comment out frame buffer mapping.
  Fix up project configuration names to be consistent. (+1 squashed
commits)
  Enable HW cursor support and fix handling of monochrome cursors.
  Remove minimum size restrict for custom resolution. (+1 squashed
commits)

 Tools/vs_cmdline.vbs   |   23 +
 Tools/vs_run.bat   |   26 +
 buildAll.bat   |   15 +
 buildAll_NoSign.bat|   19 +
 qxldod Package/qxldod Package.vcxproj  |  173 +-
 qxldod Package/qxldod Package.vcxproj.user |   15 +
 qxldod.sln |  106 +-
 qxldod/BaseObject.cpp  |   11 +
 qxldod/BaseObject.h|1 +
 qxldod/QxlDod.cpp  | 1266 +--
 qxldod/QxlDod.h|   69 +-
 qxldod/buildAll.bat|   31 -
 qxldod/callVisualStudio.bat|   28 -
 qxldod/checkWin8Tools.bat  |8 -
 qxldod/clean.bat   |   12 -
 qxldod/driver.cpp  |   26 +-
 qxldod/driver.h|   22 +-
 qxldod/include/qxl_windows.h   |5 +
 qxldod/mspace.c| 2437 ---
 qxldod/mspace.cpp  | 2439 
 qxldod/qxldod.vcxproj  |  247 ++-
 qxldod/qxldod.vcxproj.filters  |2 +-
 qxldod/qxldod.vcxproj.user |   15 +
 23 files changed, 3628 insertions(+), 3368 deletions(-)
 create mode 100644 Tools/vs_cmdline.vbs
 create mode 100644 Tools/vs_run.bat
 create mode 100644 buildAll.bat
 create mode 100644 buildAll_NoSign.bat
 create mode 100644 qxldod Package/qxldod Package.vcxproj.user
 delete mode 100755 qxldod/buildAll.bat
 delete mode 100755 qxldod/callVisualStudio.bat
 delete mode 100755 qxldod/checkWin8Tools.bat
 delete mode 100755 qxldod/clean.bat
 delete mode 100755 qxldod/mspace.c
 create mode 100644 qxldod/mspace.cpp
 create mode 100644 qxldod/qxldod.vcxproj.user

-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 20/28] Adding ioctl operation for updating Vdagent state

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

This patch adds a new ioctl to the driver which allows Vdagent
to update it's current state. This allowas the driver to know
when Vdgaent is running and when it is off.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.cpp| 17 +
 qxldod/QxlDod.h  |  3 +++
 qxldod/include/qxl_windows.h |  4 
 3 files changed, 24 insertions(+)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 74cd259..42c82e3 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -52,6 +52,7 @@ typedef struct _QXL_ESCAPE {
 union {
 QXLEscapeSetCustomDisplay custom_display;
 QXLHead monitor_config;
+QXLEscapeVDAgentRunning vdagent_running;
 };
 }QXL_ESCAPE;
 
@@ -2927,6 +2928,7 @@ QxlDevice::QxlDevice(_In_ QxlDod* pQxlDod) : 
HwDeviceInterface(pQxlDod)
 m_FreeOutputs = 0;
 m_Pending = 0;
 m_type = QXL_DEVICE;
+m_VDAgentRunning = FALSE;
 }
 
 QxlDevice::~QxlDevice(void)
@@ -4520,6 +4522,11 @@ void QxlDevice::SetMonitorConfig(QXLHead * 
monitor_config)
 m_monitor_config->heads[0].width, m_monitor_config->heads[0].height));
 AsyncIo(QXL_IO_MONITORS_CONFIG_ASYNC, 0);
 }
+void QxlDevice::SaveVDAgentState(QXLEscapeVDAgentRunning* vdagent_running)
+{
+PAGED_CODE();
+m_VDAgentRunning = (vdagent_running->running == 0) ? FALSE : TRUE;
+}
 
 NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE* pEscape)
 {
@@ -4550,6 +4557,16 @@ NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE* 
pEscape)
 status = STATUS_SUCCESS;
 break;
 }
+case QXL_ESCAPE_VDAGENT_RUNNING: {
+data_size += sizeof(QXLEscapeVDAgentRunning);
+if (pEscape->PrivateDriverDataSize != data_size) {
+status = STATUS_INVALID_BUFFER_SIZE;
+break;
+}
+SaveVDAgentState(>vdagent_running);
+status = STATUS_SUCCESS;
+break;
+}
 default:
 DbgPrint(TRACE_LEVEL_ERROR, ("%s: invalid Escape 0x%x\n", 
__FUNCTION__, pQXLEscape->ioctl));
 status = STATUS_INVALID_PARAMETER;
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index 9bc0bdb..6c5d0f8 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -551,8 +551,11 @@ private:
 NTSTATUS UpdateChildStatus(BOOLEAN connect);
 NTSTATUS SetCustomDisplay(QXLEscapeSetCustomDisplay* custom_display);
 void SetMonitorConfig(QXLHead* monitor_config);
+void SaveVDAgentState(QXLEscapeVDAgentRunning* vdagent_running);
 
 private:
+BOOLEAN m_VDAgentRunning;
+
 PUCHAR m_IoBase;
 BOOLEAN m_IoMapped;
 ULONG m_IoSize;
diff --git a/qxldod/include/qxl_windows.h b/qxldod/include/qxl_windows.h
index 1f97fb7..a7e108f 100755
--- a/qxldod/include/qxl_windows.h
+++ b/qxldod/include/qxl_windows.h
@@ -4,6 +4,7 @@
 enum {
 QXL_ESCAPE_SET_CUSTOM_DISPLAY = 0x10001,
 QXL_ESCAPE_MONITOR_CONFIG,
+QXL_ESCAPE_VDAGENT_RUNNING
 };
 
 typedef struct QXLEscapeSetCustomDisplay {
@@ -12,4 +13,7 @@ typedef struct QXLEscapeSetCustomDisplay {
 uint32_t bpp;
 } QXLEscapeSetCustomDisplay;
 
+typedef struct QXLEscapeVDAgentRunning {
+uint32_t running;
+} QXLEscapeVDAgentRunning;
 #endif /* _H_QXL_WINDOWS */
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 15/28] Fix up project configuration names to be consistent. (+1 squashed commits)

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Squashed commits:

[7336760] Fix up project configuration names to be consistent. (+1 squashed 
commits)

Squashed commits:

[b87ec38] Fix up project configuration names to be consistent.
---
 qxldod.sln| 20 -
 qxldod/qxldod.vcxproj | 61 ---
 2 files changed, 43 insertions(+), 38 deletions(-)

diff --git a/qxldod.sln b/qxldod.sln
index 231b4e5..5b79b02 100755
--- a/qxldod.sln
+++ b/qxldod.sln
@@ -19,16 +19,16 @@ Global
Win10 Release|x64 = Win10 Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|Win32.ActiveCfg = Win10 Debug|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|Win32.Build.0 = Win10 Debug|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|Win32.Deploy.0 = Win10 Debug|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|x64.ActiveCfg = Win10 Debug|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 Debug|x64.Build.0 
= Win10 Debug|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|Win32.ActiveCfg = Win10 Release|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|Win32.Build.0 = Win10 Release|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|Win32.Deploy.0 = Win10 Release|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|x64.ActiveCfg = Win10 Release|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|x64.Build.0 = Win10 Release|x64
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|Win32.ActiveCfg = Win10Debug|Win32
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|Win32.Build.0 = Win10Debug|Win32
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Debug|x64.ActiveCfg = Win10Debug|x64
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 Debug|x64.Build.0 
= Win10Debug|x64
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 Debug|x64.Deploy.0 
= Win10Debug|x64
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|Win32.ActiveCfg = Win10Debug|Win32
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|Win32.Build.0 = Win10Debug|Win32
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|x64.ActiveCfg = Win10Debug|x64
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|x64.Build.0 = Win10Debug|x64
+   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win10 
Release|x64.Deploy.0 = Win10Debug|x64
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win10 
Debug|Win32.ActiveCfg = Win10 Debug|Win32
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win10 
Debug|Win32.Build.0 = Win10 Debug|Win32
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win10 
Debug|x64.ActiveCfg = Win10 Debug|x64
diff --git a/qxldod/qxldod.vcxproj b/qxldod/qxldod.vcxproj
index 320748f..56b01c3 100755
--- a/qxldod/qxldod.vcxproj
+++ b/qxldod/qxldod.vcxproj
@@ -1,20 +1,20 @@
 
 http://schemas.microsoft.com/developer/msbuild/2003;>
   
-
-  Win10 Debug
+
+  Win10Debug
   Win32
 
-
-  Win10 Debug
+
+  Win10Debug
   x64
 
-
-  Win10 Release
+
+  Win10Release
   Win32
 
-
-  Win10 Release
+
+  Win10Release
   x64
 
   
@@ -29,13 +29,14 @@
   
 qxldod
 $(VCTargetsPath11)
+
$(LatestTargetPlatformVersion)
   
   
 Driver
 WDM
   
   
-  
+  
 
 
 false
@@ -43,21 +44,21 @@
 1
 Universal
   
-  
+  
 
 false
 WindowsKernelModeDriver10.0
 1
 Universal
   
-  
+  
 
 
 false
 WindowsKernelModeDriver10.0
 1
   
-  
+  
 
 
 false
@@ -74,27 +75,27 @@
   
 DbgengKernelDebugger
   
-  
-objfre_win8_x86\i386\
-objfre_win8_x86\i386\
+  
+$(Platform)\$(ConfigurationName)\
+$(Platform)\$(Configuration)\
 qxldod
   
-  
-objfre_win8_x86\i386\
-objfre_win8_x86\i386\
+  
+$(Platform)\$(ConfigurationName)\
+$(Platform)\$(Configuration)\
 qxldod
   
-  
-objfre_win8_amd64\amd64\
-objfre_win8_amd64\amd64\
+  
+$(Platform)\$(ConfigurationName)\
+$(Platform)\$(Configuration)\
 qxldod
   
-  
-objfre_win8_amd64\amd64\
-objfre_win8_amd64\amd64\
+  
+$(Platform)\$(ConfigurationName)\
+$(Platform)\$(Configuration)\
 qxldod
   
-  
+  
 
   
%(AdditionalDependencies);$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib
 
@@ -104,6 +105,8 @@
 
   
%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH);.\Include
   Level3
+  Disabled
+  
DBG;_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions)
 
 
   Inf2Cat /driver:$(OutDir) 

[Spice-devel] [RFC PATCH qxl-wddm-dod 13/28] Set Allow Date, Time and Timestamp property for all builds/platforms

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Defines standarc C/CPP macros __DATE__, __TIME__, __TIMESTAMP__
---
 qxldod/qxldod.vcxproj | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qxldod/qxldod.vcxproj b/qxldod/qxldod.vcxproj
index ddd3fe0..320748f 100755
--- a/qxldod/qxldod.vcxproj
+++ b/qxldod/qxldod.vcxproj
@@ -55,12 +55,14 @@
 
 false
 WindowsKernelModeDriver10.0
+1
   
   
 
 
 false
 WindowsKernelModeDriver10.0
+1
   
   
   
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 12/28] Use the second bar (VRAM) for qxl command buffer.

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

---
 qxldod/QxlDod.cpp | 52 ++--
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index a328d2d..e6c4ada 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3429,7 +3429,7 @@ _inline QXLPHYSICAL QxlDevice::PA(PVOID virt, UINT8 
slot_id)
 {
 PAGED_CODE();
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--> %s\n", __FUNCTION__));
-MemSlot *pSlot = _MemSlots[slot_id];;
+MemSlot *pSlot = _MemSlots[slot_id];
 return pSlot->high_bits | ((UINT64)virt - pSlot->start_virt_addr);
 }
 
@@ -3437,7 +3437,7 @@ _inline UINT64 QxlDevice::VA(QXLPHYSICAL paddr, UINT8 
slot_id)
 {
 PAGED_CODE();
 UINT64 virt;
-MemSlot *pSlot = _MemSlots[slot_id];;
+MemSlot *pSlot = _MemSlots[slot_id];
 
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
 virt = paddr & m_VaSlotMask;
@@ -3859,7 +3859,7 @@ UINT64 QxlDevice::ReleaseOutput(UINT64 output_id)
 RELEASE_RES(*now);
 }
 next = *(UINT64*)output->data;
-FreeMem(MSPACE_TYPE_DEVRAM, output);
+FreeMem(MSPACE_TYPE_VRAM, output);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<---%s\n", __FUNCTION__));
 return next;
 }
@@ -3939,7 +3939,7 @@ QXLDrawable *QxlDevice::GetDrawable()
 PAGED_CODE();
 QXLOutput *output;
 
-output = (QXLOutput *)AllocMem(MSPACE_TYPE_DEVRAM, sizeof(QXLOutput) + 
sizeof(QXLDrawable), TRUE);
+output = (QXLOutput *)AllocMem(MSPACE_TYPE_VRAM, sizeof(QXLOutput) + 
sizeof(QXLDrawable), TRUE);
 output->num_res = 0;
 RESOURCE_TYPE(output, RESOURCE_TYPE_DRAWABLE);
 ((QXLDrawable *)output->data)->release_info.id = (UINT64)output;
@@ -3954,7 +3954,7 @@ QXLCursorCmd *QxlDevice::CursorCmd()
 QXLOutput *output;
 
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
-output = (QXLOutput *)AllocMem(MSPACE_TYPE_DEVRAM, sizeof(QXLOutput) + 
sizeof(QXLCursorCmd), TRUE);
+output = (QXLOutput *)AllocMem(MSPACE_TYPE_VRAM, sizeof(QXLOutput) + 
sizeof(QXLCursorCmd), TRUE);
 output->num_res = 0;
 RESOURCE_TYPE(output, RESOURCE_TYPE_CURSOR);
 cursor_cmd = (QXLCursorCmd *)output->data;
@@ -3975,7 +3975,7 @@ BOOL QxlDevice::SetClip(const RECT *clip, QXLDrawable 
*drawable)
 }
 
 QXLClipRects *rects;
-rects_res = (Resource *)AllocMem(MSPACE_TYPE_DEVRAM, sizeof(Resource) + 
sizeof(QXLClipRects) +
+rects_res = (Resource *)AllocMem(MSPACE_TYPE_VRAM, sizeof(Resource) + 
sizeof(QXLClipRects) +
 sizeof(QXLRect), TRUE);
 rects_res->refs = 1;
 rects_res->free = FreeClipRectsEx;
@@ -3989,7 +3989,7 @@ BOOL QxlDevice::SetClip(const RECT *clip, QXLDrawable 
*drawable)
 
 DrawableAddRes(drawable, rects_res);
 drawable->clip.type = SPICE_CLIP_TYPE_RECTS;
-drawable->clip.data = PA(rects_res->res, m_MainMemSlot);
+drawable->clip.data = PA(rects_res->res, m_SurfaceMemSlot);
 return TRUE;
 }
 
@@ -4034,11 +4034,11 @@ void QxlDevice::FreeClipRects(Resource *res)
 
 chunk_phys = ((QXLClipRects *)res->res)->chunk.next_chunk;
 while (chunk_phys) {
-QXLDataChunk *chunk = (QXLDataChunk *)VA(chunk_phys, m_MainMemSlot);
+QXLDataChunk *chunk = (QXLDataChunk *)VA(chunk_phys, m_SurfaceMemSlot);
 chunk_phys = chunk->next_chunk;
-FreeMem(MSPACE_TYPE_DEVRAM, chunk);
+FreeMem(MSPACE_TYPE_VRAM, chunk);
 }
-FreeMem(MSPACE_TYPE_DEVRAM, res);
+FreeMem(MSPACE_TYPE_VRAM, res);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
 }
 
@@ -4061,12 +4061,12 @@ void QxlDevice::FreeBitmapImage(Resource *res)
 
 chunk_phys = ((QXLDataChunk *)(>image.bitmap + 1))->next_chunk;
 while (chunk_phys) {
-QXLDataChunk *chunk = (QXLDataChunk *)VA(chunk_phys, m_MainMemSlot);
+QXLDataChunk *chunk = (QXLDataChunk *)VA(chunk_phys, m_SurfaceMemSlot);
 chunk_phys = chunk->next_chunk;
-FreeMem(MSPACE_TYPE_DEVRAM, chunk);
+FreeMem(MSPACE_TYPE_VRAM, chunk);
 }
 
-FreeMem(MSPACE_TYPE_DEVRAM, res);
+FreeMem(MSPACE_TYPE_VRAM, res);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
 }
 
@@ -4086,12 +4086,12 @@ void QxlDevice::FreeCursor(Resource *res)
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
 chunk_phys = ((InternalCursor *)res->res)->cursor.chunk.next_chunk;
 while (chunk_phys) {
-QXLDataChunk *chunk = (QXLDataChunk *)VA(chunk_phys, m_MainMemSlot);
+QXLDataChunk *chunk = (QXLDataChunk *)VA(chunk_phys, m_SurfaceMemSlot);
 chunk_phys = chunk->next_chunk;
-FreeMem(MSPACE_TYPE_DEVRAM, chunk);
+FreeMem(MSPACE_TYPE_VRAM, chunk);
 }
 
-FreeMem(MSPACE_TYPE_DEVRAM, res);
+FreeMem(MSPACE_TYPE_VRAM, res);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
 }
 
@@ -4134,7 +4134,7 @@ void QxlDevice::PushDrawable(QXLDrawable *drawable)
 WaitForCmdRing();
 cmd = 

[Spice-devel] [RFC PATCH qxl-wddm-dod 07/28] On power wake call the init functions before setting the vidpn to black. Otherwise, BSOD.

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

---
 qxldod/QxlDod.cpp | 66 ---
 1 file changed, 34 insertions(+), 32 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index ec960e5..9d13934 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -284,12 +284,16 @@ NTSTATUS QxlDod::SetPowerState(_In_  ULONG HardwareUid,
_In_  DEVICE_POWER_STATE DevicePowerState,
_In_  POWER_ACTION   ActionType)
 {
+NTSTATUS Status(STATUS_SUCCESS);
 PAGED_CODE();
 DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s HardwareUid = 0x%x ActionType 
= %s DevicePowerState = %s AdapterPowerState = %s\n", __FUNCTION__, 
HardwareUid, DbgPowerActionString(ActionType), 
DbgDevicePowerString(DevicePowerState), 
DbgDevicePowerString(m_AdapterPowerState)));
 
 if (HardwareUid == DISPLAY_ADAPTER_HW_ID)
 {
-if (DevicePowerState == PowerDeviceD0)
+// There is nothing to do to specifically power up/down the display 
adapter
+Status = m_pHWDevice->SetPowerState(DevicePowerState, 
&(m_CurrentModes[0].DispInfo));
+
+if (NT_SUCCESS(Status) && DevicePowerState == PowerDeviceD0)
 {
 
 // When returning from D3 the device visibility defined to be off 
for all targets
@@ -305,12 +309,10 @@ NTSTATUS QxlDod::SetPowerState(_In_  ULONG HardwareUid,
 // Store new adapter power state
 m_AdapterPowerState = DevicePowerState;
 
-// There is nothing to do to specifically power up/down the display 
adapter
-return m_pHWDevice->SetPowerState(DevicePowerState, 
&(m_CurrentModes[0].DispInfo));
 }
 // TODO: This is where the specified monitor should be powered up/down
 
-return STATUS_SUCCESS;
+return Status;
 }
 
 NTSTATUS QxlDod::QueryChildRelations(_Out_writes_bytes_(ChildRelationsSize) 
DXGK_CHILD_DESCRIPTOR* pChildRelations,
@@ -2977,10 +2979,10 @@ BOOL QxlDevice::SetVideoModeInfo(UINT Idx, QXLMode* 
pModeInfo)
 void QxlDevice::UpdateVideoModeInfo(UINT Idx, UINT xres, UINT yres, UINT bpp)
 {
 PVIDEO_MODE_INFORMATION pMode = NULL;
-UINT bytes_pp = (bpp + 7) / 8;
+UINT bytes_pp = (bpp + 7) / 8;
 ULONG color_bits;
 PAGED_CODE();
-
+
 pMode = _ModeInfo[Idx];
 pMode->VisScreenWidth = xres;
 pMode->VisScreenHeight = yres;
@@ -4400,39 +4402,39 @@ NTSTATUS QxlDevice::Escape(_In_ CONST DXGKARG_ESCAPE* 
pEscap)
 {
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
 QXLEscapeSetCustomDisplay *custom_display;
-UINT xres;
-UINT yres;
-UINT bpp;
+UINT xres;
+UINT yres;
+UINT bpp;
 
 if (pEscap->PrivateDriverDataSize != sizeof(QXLEscapeSetCustomDisplay)) {
 DbgPrint(TRACE_LEVEL_ERROR, ("<--> %s Incorrect buffer size %d instead 
of %d\n", __FUNCTION__, pEscap->PrivateDriverDataSize, 
sizeof(QXLEscapeSetCustomDisplay)));
 return STATUS_INVALID_BUFFER_SIZE;
 }
 custom_display = (QXLEscapeSetCustomDisplay*)pEscap->pPrivateDriverData;
-xres = custom_display->xres & ~0x3;
-yres = custom_display->yres & ~0x3;
-bpp = custom_display->bpp;
-if (bpp != QXL_BPP)
-{
-bpp = QXL_BPP;
-}
-if (xres < MIN_WIDTH_SIZE || yres < MIN_HEIGHT_SIZE)
-{
+xres = custom_display->xres & ~0x3;
+yres = custom_display->yres & ~0x3;
+bpp = custom_display->bpp;
+if (bpp != QXL_BPP)
+{
+bpp = QXL_BPP;
+}
+if (xres < MIN_WIDTH_SIZE || yres < MIN_HEIGHT_SIZE)
+{
 DbgPrint(TRACE_LEVEL_ERROR, ("%s: xres = %d, yres = %d\n", 
__FUNCTION__, xres, yres));
-return ERROR_INVALID_DATA;
-}
-
-if (m_CustomMode == (m_ModeCount - 1))
-m_CustomMode = (USHORT)(m_ModeCount - 2);
-else
-m_CustomMode = (USHORT)(m_ModeCount - 1);
-
-if ((xres * yres * bpp / 8) > m_RomHdr->surface0_area_size) {
-DbgPrint(TRACE_LEVEL_ERROR, ("%s: Mode (%dx%d#%d) doesn't fit in 
memory (%d)\n",
-__FUNCTION__, xres, yres, bpp, 
m_RomHdr->surface0_area_size));
-return STATUS_INVALID_PARAMETER;
-}
-UpdateVideoModeInfo(m_CustomMode, xres, yres, bpp);
+return ERROR_INVALID_DATA;
+}
+
+if (m_CustomMode == (m_ModeCount - 1))
+m_CustomMode = (USHORT)(m_ModeCount - 2);
+else
+m_CustomMode = (USHORT)(m_ModeCount - 1);
+
+if ((xres * yres * bpp / 8) > m_RomHdr->surface0_area_size) {
+DbgPrint(TRACE_LEVEL_ERROR, ("%s: Mode (%dx%d#%d) doesn't fit in 
memory (%d)\n",
+__FUNCTION__, xres, yres, bpp, 
m_RomHdr->surface0_area_size));
+return STATUS_INVALID_PARAMETER;
+}
+UpdateVideoModeInfo(m_CustomMode, xres, yres, bpp);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
 return STATUS_SUCCESS;
 }
-- 
1.8.3.1

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org

[Spice-devel] [RFC PATCH qxl-wddm-dod 06/28] Do not use virtual functions for code that must not be paged

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

There is no way to guarantee that the static vtable will be in
non-pageable memory.  This patch converts 3 virtual non-pageble functions
to functions private to each device class, the parent class will make
an explicit call (based on a new device type initialized at object
creation) to the correct function.

Fixed one misspelling: HwDeviceInterface
---
 qxldod/QxlDod.cpp | 114 ++
 qxldod/QxlDod.h   |  48 +++
 2 files changed, 120 insertions(+), 42 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 1b3bdf1..ec960e5 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -2294,7 +2294,7 @@ VOID BltBits (
 }
 #pragma code_seg(pop) // End Non-Paged Code
 
-VgaDevice::VgaDevice(_In_ QxlDod* pQxlDod)
+VgaDevice::VgaDevice(_In_ QxlDod* pQxlDod) : HwDeviceInterface(pQxlDod)
 {
 m_pQxlDod = pQxlDod;
 m_ModeInfo = NULL;
@@ -2302,6 +2302,7 @@ VgaDevice::VgaDevice(_In_ QxlDod* pQxlDod)
 m_ModeNumbers = NULL;
 m_CurrentMode = 0;
 m_Id = 0;
+m_type = VGA_DEVICE;
 }
 
 VgaDevice::~VgaDevice(void)
@@ -2881,18 +2882,18 @@ VOID VgaDevice::BlackOutScreen(CURRENT_BDD_MODE* 
pCurrentBddMod)
 #pragma code_seg()
 // BEGIN: Non-Paged Code Segment
 
-BOOLEAN VgaDevice::InterruptRoutine(_In_ PDXGKRNL_INTERFACE pDxgkInterface, 
_In_  ULONG MessageNumber)
+BOOLEAN VgaDevice::HWInterruptRoutine(_In_ PDXGKRNL_INTERFACE pDxgkInterface, 
_In_  ULONG MessageNumber)
 {
 UNREFERENCED_PARAMETER(pDxgkInterface);
 UNREFERENCED_PARAMETER(MessageNumber);
 return FALSE;
 }
 
-VOID VgaDevice::DpcRoutine(PVOID)
+VOID VgaDevice::HWDpcRoutine(PDXGKRNL_INTERFACE pDxgkInterface)
 {
 }
 
-VOID VgaDevice::ResetDevice(VOID)
+VOID VgaDevice::HWResetDevice(VOID)
 {
 }
 #pragma  code_seg(pop) //end non-paged code
@@ -2916,7 +2917,7 @@ NTSTATUS VgaDevice::Escape(_In_ CONST DXGKARG_ESCAPE* 
pEscap)
 return STATUS_NOT_IMPLEMENTED;
 }
 
-QxlDevice::QxlDevice(_In_ QxlDod* pQxlDod)
+QxlDevice::QxlDevice(_In_ QxlDod* pQxlDod) : HwDeviceInterface(pQxlDod)
 {
 m_pQxlDod = pQxlDod;
 m_ModeInfo = NULL;
@@ -2926,6 +2927,7 @@ QxlDevice::QxlDevice(_In_ QxlDod* pQxlDod)
 m_CustomMode = 0;
 m_FreeOutputs = 0;
 m_Pending = 0;
+m_type = QXL_DEVICE;
 }
 
 QxlDevice::~QxlDevice(void)
@@ -3152,7 +3154,7 @@ NTSTATUS QxlDevice::SetPowerState(_In_ DEVICE_POWER_STATE 
DevicePowerState, DXGK
 NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, 
DXGK_DISPLAY_INFORMATION* pDispInfo)
 {
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
-PDXGKRNL_INTERFACE pDxgkInterface = m_pQxlDod->GetDxgkInterrface();
+PDXGKRNL_INTERFACE pDxgkInterface = m_pQxlDod->GetDxgkInterface();
 UINT pci_range = QXL_RAM_RANGE_INDEX;
 for (ULONG i = 0; i < pResList->Count; ++i)
 {
@@ -3329,7 +3331,7 @@ void QxlDevice::QxlClose()
 
 void QxlDevice::UnmapMemory(void)
 {
-PDXGKRNL_INTERFACE pDxgkInterface = m_pQxlDod->GetDxgkInterrface();
+PDXGKRNL_INTERFACE pDxgkInterface = m_pQxlDod->GetDxgkInterface();
 if (m_IoMapped && m_IoBase)
 {
 pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, 
_IoBase);
@@ -4498,7 +4500,8 @@ VOID QxlDevice::PushCursor(VOID)
 #pragma code_seg(push)
 #pragma code_seg()
 // BEGIN: Non-Paged Code Segment
-BOOLEAN QxlDevice::InterruptRoutine(_In_ PDXGKRNL_INTERFACE pDxgkInterface, 
_In_  ULONG MessageNumber)
+
+BOOLEAN QxlDevice::HWInterruptRoutine(_In_ PDXGKRNL_INTERFACE pDxgkInterface, 
_In_  ULONG MessageNumber)
 {
 UNREFERENCED_PARAMETER(MessageNumber);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
@@ -4523,10 +4526,8 @@ BOOLEAN QxlDevice::InterruptRoutine(_In_ 
PDXGKRNL_INTERFACE pDxgkInterface, _In_
 return TRUE;
 }
 
-VOID QxlDevice::DpcRoutine(PVOID ptr)
+VOID QxlDevice::HWDpcRoutine(PDXGKRNL_INTERFACE pDxgkInterface)
 {
-PDXGKRNL_INTERFACE pDxgkInterface = (PDXGKRNL_INTERFACE)ptr;
-
 DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s\n", __FUNCTION__));
 DPC_CB_CONTEXT ctx;
 BOOLEAN dummy;
@@ -4557,13 +4558,89 @@ VOID QxlDevice::DpcRoutine(PVOID ptr)
 DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
 }
 
-void QxlDevice::ResetDevice(void)
+void QxlDevice::HWResetDevice(void)
 {
 DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
 m_RamHdr->int_mask = ~0;
 WRITE_PORT_UCHAR(m_IoBase + QXL_IO_MEMSLOT_ADD, 0);
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s\n", __FUNCTION__));
 }
+
+// Given bits per pixel, return the pixel format at the same bpp
+D3DDDIFORMAT PixelFormatFromBPP(UINT BPP)
+{
+switch (BPP)
+{
+case  8: return D3DDDIFMT_P8;
+case 16: return D3DDDIFMT_R5G6B5;
+case 24: return D3DDDIFMT_R8G8B8;
+case 32: return D3DDDIFMT_X8R8G8B8;
+default: QXL_LOG_ASSERTION1("A bit per pixel of 0x%I64x is not 
supported.", BPP); return D3DDDIFMT_UNKNOWN;
+}
+}
+
+
+BOOLEAN 

[Spice-devel] [RFC PATCH qxl-wddm-dod 21/28] Fixing mouse pointer issue when Vdagent is off

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

The mouse pointer disappears once the Vdagent is not running, this
happens due to a bug in which the function  always
returns true. However the client mouse pointer should be disabled
when vdagent is off and enabled when it is on and thus this function
should return the current state of Vdagent.

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.cpp | 11 +--
 qxldod/QxlDod.h   |  2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 42c82e3..f6542c4 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -427,12 +427,11 @@ NTSTATUS QxlDod::QueryAdapterInfo(_In_ CONST 
DXGKARG_QUERYADAPTERINFO* pQueryAda
 pDriverCaps->WDDMVersion = DXGKDDI_WDDMv1_2;
 pDriverCaps->HighestAcceptableAddress.QuadPart = -1;
 
-if (m_pHWDevice->EnablePointer()) {
-pDriverCaps->MaxPointerWidth  = POINTER_SIZE;
-pDriverCaps->MaxPointerHeight = POINTER_SIZE;
-pDriverCaps->PointerCaps.Monochrome = 1;
-pDriverCaps->PointerCaps.Color = 1;
-}
+pDriverCaps->MaxPointerWidth  = POINTER_SIZE;
+pDriverCaps->MaxPointerHeight = POINTER_SIZE;
+pDriverCaps->PointerCaps.Monochrome = 1;
+pDriverCaps->PointerCaps.Color = 1;
+
 DbgPrint(TRACE_LEVEL_VERBOSE, ("<--- %s 1\n", __FUNCTION__));
 return STATUS_SUCCESS;
 }
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index 6c5d0f8..d3249eb 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -462,7 +462,7 @@ public:
 NTSTATUS SetPowerState(DEVICE_POWER_STATE DevicePowerState, 
DXGK_DISPLAY_INFORMATION* pDispInfo);
 NTSTATUS HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION* 
pDispInfo);
 NTSTATUS HWClose(void);
-BOOLEAN EnablePointer(void) { return TRUE; }
+BOOLEAN EnablePointer(void) { return m_VDAgentRunning; }
 NTSTATUS ExecutePresentDisplayOnly(_In_ BYTE* DstAddr,
 _In_ UINT  DstBitPerPixel,
 _In_ BYTE* SrcAddr,
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 22/28] Replacing tabs with spaces

2016-07-18 Thread Dmitry Fleytman
From: Sameeh Jubran 

Signed-off-by: Sameeh Jubran 
Signed-off-by: Dmitry Fleytman 
---
 qxldod/QxlDod.h   | 2 +-
 qxldod/driver.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index d3249eb..c28f97f 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -107,7 +107,7 @@ typedef struct
 
 #pragma pack(pop)
 
-typedef struct _X86BIOS_REGISTERS  // invented names
+typedef struct _X86BIOS_REGISTERS// invented names
 {
 ULONG Eax;
 ULONG Ecx;
diff --git a/qxldod/driver.cpp b/qxldod/driver.cpp
index 2098421..be8d2a2 100755
--- a/qxldod/driver.cpp
+++ b/qxldod/driver.cpp
@@ -634,7 +634,7 @@ DodSystemDisplayWrite(
 #if defined(DBG)
 
 #define RHEL_DEBUG_PORT ((PUCHAR)0x3F8)
-#define TEMP_BUFFER_SIZE   256
+#define TEMP_BUFFER_SIZE256
 
 void DebugPrintFuncSerial(const char *format, ...)
 {
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 17/28] Remove minimum size restrict for custom resolution. (+1 squashed commits)

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Squashed commits:

[9114b8b] Remove minimum size restrict for custom resolution.
---
 qxldod/QxlDod.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 3139092..74cd259 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -4488,11 +4488,10 @@ NTSTATUS 
QxlDevice::SetCustomDisplay(QXLEscapeSetCustomDisplay* custom_display)
 UINT xres = custom_display->xres;
 UINT yres = custom_display->yres;
 UINT bpp = QXL_BPP;
-DbgPrint(TRACE_LEVEL_ERROR, ("%s - %d (%dx%d#%d)\n", __FUNCTION__, m_Id, 
xres, yres, bpp));
+DbgPrint(TRACE_LEVEL_WARNING, ("%s - %d (%dx%d#%d)\n", __FUNCTION__, m_Id, 
xres, yres, bpp));
 if (xres < MIN_WIDTH_SIZE || yres < MIN_HEIGHT_SIZE) {
-DbgPrint(TRACE_LEVEL_VERBOSE, ("%s: (%dx%d#%d) must be at least 
(%dxd)\n", __FUNCTION__,
+DbgPrint(TRACE_LEVEL_VERBOSE, ("%s: (%dx%d#%d) less than (%dxd)\n", 
__FUNCTION__,
 xres, yres, bpp, MIN_WIDTH_SIZE, MIN_HEIGHT_SIZE));
-return ERROR_INVALID_DATA;
 }
 m_CustomMode =(USHORT) ((m_CustomMode == m_ModeCount-1)?  m_ModeCount - 2 
: m_ModeCount - 1);
 
-- 
1.8.3.1

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


[Spice-devel] [RFC PATCH qxl-wddm-dod 01/28] Upgrade to Windows 10 WDK

2016-07-18 Thread Dmitry Fleytman
From: Sandy Stutsman 

Added delete operator.  Added Win10 configurations and removed older ones.
---
 qxldod Package/qxldod Package.vcxproj | 28 +--
 qxldod.sln| 84 ++-
 qxldod/BaseObject.cpp | 11 +
 qxldod/BaseObject.h   |  1 +
 qxldod/qxldod.vcxproj | 93 +++
 5 files changed, 135 insertions(+), 82 deletions(-)

diff --git a/qxldod Package/qxldod Package.vcxproj b/qxldod Package/qxldod 
Package.vcxproj
index 2935ed7..1a6b5c7 100755
--- a/qxldod Package/qxldod Package.vcxproj 
+++ b/qxldod Package/qxldod Package.vcxproj 
@@ -1,5 +1,5 @@
 
-http://schemas.microsoft.com/developer/msbuild/2003;>
+http://schemas.microsoft.com/developer/msbuild/2003;>
   
 
   Win8.1 Debug
@@ -53,7 +53,7 @@
   
 {B8C04B51-4207-491D-A7DD-C54861E8B528}
 {4605da2c-74a5-4865-98e1-152ef136825f}
-v4.5
+v4.5.2
 11.0
 Win8 Debug
 Win32
@@ -71,62 +71,62 @@
   
 WindowsV6.3
 true
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows8
 true
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 WindowsV6.3
 false
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows8
 false
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows7
 true
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows7
 false
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 WindowsV6.3
 true
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows8
 true
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 WindowsV6.3
 false
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows8
 false
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows7
 true
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
 Windows7
 false
-WindowsKernelModeDriver8.1
+WindowsKernelModeDriver10.0
   
   
   
diff --git a/qxldod.sln b/qxldod.sln
index 14f4cd6..fdc967f 100755
--- a/qxldod.sln
+++ b/qxldod.sln
@@ -1,6 +1,6 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.21005.1
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxldod", 
"qxldod\qxldod.vcxproj", "{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}"
 EndProject
@@ -11,64 +11,32 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxldod 
Package", "qxldod Pa
 EndProject
 Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
-   Win8 Debug|Win32 = Win8 Debug|Win32
-   Win8 Debug|x64 = Win8 Debug|x64
-   Win8 Release|Win32 = Win8 Release|Win32
-   Win8 Release|x64 = Win8 Release|x64
-   Win8.1 Debug|Win32 = Win8.1 Debug|Win32
-   Win8.1 Debug|x64 = Win8.1 Debug|x64
-   Win8.1 Release|Win32 = Win8.1 Release|Win32
-   Win8.1 Release|x64 = Win8.1 Release|x64
+   Win10 Debug|Win32 = Win10 Debug|Win32
+   Win10 Debug|x64 = Win10 Debug|x64
+   Win10 Release|Win32 = Win10 Release|Win32
+   Win10 Release|x64 = Win10 Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 
Debug|Win32.ActiveCfg = Win8 Debug|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|Win32.Build.0 
= Win8 Debug|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 
Debug|Win32.Deploy.0 = Win8 Debug|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|x64.ActiveCfg 
= Win8 Debug|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|x64.Build.0 = 
Win8 Debug|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|x64.Deploy.0 
= Win8 Debug|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 
Release|Win32.ActiveCfg = Win8 Release|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 
Release|Win32.Build.0 = Win8 Release|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 
Release|Win32.Deploy.0 = Win8 Release|Win32
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 
Release|x64.ActiveCfg = Win8 Release|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Release|x64.Build.0 
= Win8 Release|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 
Release|x64.Deploy.0 = Win8 Release|x64
-   {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8.1 
Debug|Win32.ActiveCfg = Win8.1 Debug|Win32
-