Re: [Spice-devel] Streaming video detection

2011-07-06 Thread Andrea Celestino
Please, I would like to know if what I wrote in my previous message it's correct. Thanks. Regards. 2011/7/5 Andrea Celestino celestino.and...@gmail.com I have read the document spice_for_newbies.pdf, that describes how spice works. When I play a video on the guest, the video is decoded then

Re: [Spice-devel] Streaming video detection

2011-07-06 Thread Christophe Fergeau
On Tue, Jul 05, 2011 at 12:30:29PM +0200, Andrea Celestino wrote: I have read the document spice_for_newbies.pdf, that describes how spice works. When I play a video on the guest, the video is decoded then the user application requests the OS graphic engine (X in linux), to perform a

Re: [Spice-devel] [PATCH 0/9] add optional libjpeg-turbo use to spice-server mjpeg encoder

2011-07-06 Thread Andrea Celestino
In order to measure compression time, you mean the time between jpeg_start_compress() and jpeg_finish_compress, or the time of encode_frame() function? 2011/7/5 Christophe Fergeau cferg...@redhat.com I finally ran some performance test on these changes on a small theora clip, average

Re: [Spice-devel] Problems compiling SPICE Windows client SDK 7.1

2011-07-06 Thread Arnon Gilboa
John A. Sullivan III wrote: snip We've made considerable progress. We do not have VS2008 as we are not a Windows shop and I assume in my Windows ignorance that that's a paid licensed product so we'd have track which of us could work on it and which couldn't so we've tried to make due with just

Re: [Spice-devel] [PATCH 0/9] add optional libjpeg-turbo use to spice-server mjpeg encoder

2011-07-06 Thread Alon Levy
On Tue, Jun 28, 2011 at 01:18:01PM +0200, Christophe Fergeau wrote: Hi, Hi, belated ACK series. Just I remember there was one issue about a non required malloc or a required one that you should free, and you said you already intened to fix that, I don't remember where. Alon Currently,

[Spice-devel] [PATCH] mjpeg_encoder: allocate row on demand

2011-07-06 Thread Christophe Fergeau
It's not used when we use jpeg-turbo colorspaces, so it's better to allocate it when we know we'll need it rather than always allocating it even if it won't be used. --- server/mjpeg_encoder.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [Spice-devel] [PATCH 0/9] add optional libjpeg-turbo use to spice-server mjpeg encoder

2011-07-06 Thread Christophe Fergeau
On Wed, Jul 06, 2011 at 12:22:48PM +0200, Alon Levy wrote: belated ACK series. Just I remember there was one issue about a non required malloc or a required one that you should free, and you said you already intened to fix that, I don't remember where. Ah yeah, sorry, I never sent this

Re: [Spice-devel] [PATCH] mjpeg_encoder: allocate row on demand

2011-07-06 Thread Alon Levy
On Wed, Jul 06, 2011 at 12:32:53PM +0200, Christophe Fergeau wrote: It's not used when we use jpeg-turbo colorspaces, so it's better to allocate it when we know we'll need it rather than always allocating it even if it won't be used. Just one thing - you're turning an abort to a return FALSE.

[Spice-devel] [PATCH] async and s3 support

2011-07-06 Thread Alon Levy
This is a redoing of async io support using spice api changes, and on top of it the s3 support patches using the original suggestion of an added api call (but named flush_surfaces instead of update_mem). Recap: After the previous discussions with Gerd and Yonit we agreed a way to call

[Spice-devel] [PATCH] server: add QXLWorker.flush_surfaces_async for S3/S4 support

2011-07-06 Thread Alon Levy
This does three things: flush both command rings stop (rendering everything) start Pulled out start and stop to their own functions to do this easily. The added api is specifically async, i.e. it calls async_complete when done. --- server/red_dispatcher.c | 10 server/red_worker.c

Re: [Spice-devel] Problems compiling SPICE Windows client SDK 7.1

2011-07-06 Thread John A. Sullivan III
On Wed, 2011-07-06 at 13:23 +0300, Arnon Gilboa wrote: John A. Sullivan III wrote: snip We've made considerable progress. We do not have VS2008 as we are not a Windows shop and I assume in my Windows ignorance that that's a paid licensed product so we'd have track which of us could work

Re: [Spice-devel] [PATCH] server: fix segfault if no migrate_info provided

2011-07-06 Thread Alon Levy
On Tue, Jul 05, 2011 at 04:12:47PM +0300, Yonit Halperin wrote: On 07/05/2011 03:22 PM, Alon Levy wrote: On Mon, Jun 20, 2011 at 10:57:58AM +0200, Alon Levy wrote: ping? qemu calls spice_server_migrate_switch even if it didn't do a spice_server_migrate_info first. Fix the resulting error

Re: [Spice-devel] [PATCH] mjpeg_encoder: allocate row on demand

2011-07-06 Thread Christophe Fergeau
On Wed, Jul 06, 2011 at 01:04:24PM +0200, Alon Levy wrote: On Wed, Jul 06, 2011 at 12:32:53PM +0200, Christophe Fergeau wrote: It's not used when we use jpeg-turbo colorspaces, so it's better to allocate it when we know we'll need it rather than always allocating it even if it won't be

Re: [Spice-devel] Streaming video detection

2011-07-06 Thread Andrea Celestino
I am studying red_send_stream_data() function. I have the stable version of spice 0.8.1. A the end of this function there are some line that I don't understand totally: red_channel_init_send_data(channel, SPICE_MSG_DISPLAY_STREAM_DATA, NULL); SpiceMsgDisplayStreamData stream_data;

[Spice-devel] [PATCH win-qxl v2/v3] async and s3 queue combined

2011-07-06 Thread Alon Levy
This is the whole thing, not splitting it this time. So I apologize for patches already sent and acked on the list (but I think there are none). updated: async uses an enum for the async ops. flush_surfaces is also async. You need an updated qemu and spice to test. (see patches on the

[Spice-devel] [PATCH] miniport: we support rev 3 too now

2011-07-06 Thread Alon Levy
--- miniport/qxl.inf |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/miniport/qxl.inf b/miniport/qxl.inf index bb7f582..6527075 100644 --- a/miniport/qxl.inf +++ b/miniport/qxl.inf @@ -20,18 +20,22 @@ qxl.Display = 11; system32 ; WinXP x86 and up [q.NTx86]

[Spice-devel] [PATCH] export pci revision from miniport to display

2011-07-06 Thread Alon Levy
--- display/driver.c |1 + display/qxldd.h |2 ++ include/qxl_driver.h |2 ++ miniport/qxl.c |4 4 files changed, 9 insertions(+), 0 deletions(-) diff --git a/display/driver.c b/display/driver.c index f82c744..2c88cc5 100644 --- a/display/driver.c +++

[Spice-devel] [PATCH] asynchronous io port support (introduced in revision 3 of qxl device)

2011-07-06 Thread Alon Levy
Fixes same issue in RHBZ#700134, but for a windows guest. Requires a revision 3 pci device, that will be introduced with qemu patches. If the revision is 2 the old behavior is maintained, namely using the non asynchronous io ports. qxl revision 3 (QXL_REVISION_V10) gains support for async io

[Spice-devel] [PATCH] miniport+display: export FLUSH_{SURFACES, RELEASE} ports for use by AssertModeEnable

2011-07-06 Thread Alon Levy
Revision 3 (V10) of the qxl device supports these added io ports which make sleep, resolution change and logout simpler to implement with less vmexits from pov of the driver. --- display/driver.c |2 ++ display/qxldd.h |2 ++ include/qxl_driver.h |2 ++ miniport/qxl.c

[Spice-devel] [PATCH] qxl_driver.h: bump QXL_DRIVER_INFO_VERSION (added pci_revision, flush_* ports)

2011-07-06 Thread Alon Levy
--- include/qxl_driver.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/qxl_driver.h b/include/qxl_driver.h index a341c43..885c3c6 100644 --- a/include/qxl_driver.h +++ b/include/qxl_driver.h @@ -36,7 +36,7 @@ enum { #define IOCTL_QXL_GET_INFO \

[Spice-devel] [PATCH] don't create a surface if vram mspace is unmapped

2011-07-06 Thread Alon Levy
--- display/driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/display/driver.c b/display/driver.c index fd9902d..872c40a 100644 --- a/display/driver.c +++ b/display/driver.c @@ -1229,7 +1229,7 @@ HBITMAP APIENTRY DrvCreateDeviceBitmap(DHPDEV dhpdev, SIZEL size,

[Spice-devel] [PATCH] miniport/*: use QXL_IO_LOG with internal snprintf

2011-07-06 Thread Alon Levy
snprintf is Copyright Patrick Powell 1995 (with more changes, see miniport/minimal_snprintf.c starting comment). Implements a DebugPrint similar to the one in display, using QXL_IO_LOG with the buffer on the pci devram bar at ram-log_buf, and log_level taken from there as well (set by qemu via

[Spice-devel] [PATCH] miniport/qxl: store vram_start on video memory map for later debug usage

2011-07-06 Thread Alon Levy
--- miniport/qxl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/miniport/qxl.c b/miniport/qxl.c index dce965e..583e610 100644 --- a/miniport/qxl.c +++ b/miniport/qxl.c @@ -79,6 +79,7 @@ typedef struct QXLExtension { PHYSICAL_ADDRESS vram_physical; ULONG

[Spice-devel] [PATCH] miniport/qxl: implement SetPowerState:VideoPowerOn

2011-07-06 Thread Alon Levy
--- miniport/qxl.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/miniport/qxl.c b/miniport/qxl.c index 583e610..b5f0cfd 100644 --- a/miniport/qxl.c +++ b/miniport/qxl.c @@ -718,13 +718,20 @@ void HWReset(QXLExtension *dev_ext); #pragma alloc_text(PAGE,

[Spice-devel] [PATCH] miniport: pass dev as first parameter of DEBUG_PRINT instead of 0

2011-07-06 Thread Alon Levy
--- miniport/qxl.c | 182 1 files changed, 92 insertions(+), 90 deletions(-) diff --git a/miniport/qxl.c b/miniport/qxl.c index 5341ab4..575bbf0 100644 --- a/miniport/qxl.c +++ b/miniport/qxl.c @@ -142,7 +142,7 @@ ULONG DriverEntry(PVOID

[Spice-devel] [PATCH] miniport/qxl: disable DBG zap of video ram on map

2011-07-06 Thread Alon Levy
--- miniport/qxl.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/miniport/qxl.c b/miniport/qxl.c index 575bbf0..ba82d9f 100644 --- a/miniport/qxl.c +++ b/miniport/qxl.c @@ -1003,11 +1003,13 @@ BOOLEAN StartIO(PVOID dev_extension, PVIDEO_REQUEST_PACKET packet)

[Spice-devel] [PATCH] miniport/qxl: SetVideoModeInfo: pass QXLExtension for debug prints

2011-07-06 Thread Alon Levy
--- miniport/qxl.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/miniport/qxl.c b/miniport/qxl.c index ba82d9f..d9b5bb5 100644 --- a/miniport/qxl.c +++ b/miniport/qxl.c @@ -420,11 +420,11 @@ VP_STATUS Prob(QXLExtension *dev, VIDEO_PORT_CONFIG_INFO *conf_info, }

[Spice-devel] [PATCH] miniport/qxl: raise loglevel for mode prints

2011-07-06 Thread Alon Levy
--- miniport/qxl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/miniport/qxl.c b/miniport/qxl.c index d9b5bb5..43749a9 100644 --- a/miniport/qxl.c +++ b/miniport/qxl.c @@ -428,7 +428,7 @@ VP_STATUS SetVideoModeInfo(QXLExtension *dev, PVIDEO_MODE_INFORMATION

[Spice-devel] [PATCH] display/mspace: fix mspace_max_footprint and mspace_footprint

2011-07-06 Thread Alon Levy
--- display/mspace.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/display/mspace.c b/display/mspace.c index ec29fc6..d0ba123 100644 --- a/display/mspace.c +++ b/display/mspace.c @@ -2402,8 +2402,9 @@ size_t mspace_footprint(mspace msp) { mstate ms =

[Spice-devel] [PATCH] display/{driver, surface}: use pdev in some DEBUG_PRINTs

2011-07-06 Thread Alon Levy
--- display/driver.c | 35 ++- display/surface.c |4 ++-- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/display/driver.c b/display/driver.c index 872c40a..132d57c 100644 --- a/display/driver.c +++ b/display/driver.c @@ -533,7 +533,7 @@

[Spice-devel] [PATCH] display/driver: add DebugCountAliveSurfaces

2011-07-06 Thread Alon Levy
Disabled if no DBG, and uses loglevel == 1 --- display/driver.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/display/driver.c b/display/driver.c index 132d57c..1e9b833 100644 --- a/display/driver.c +++ b/display/driver.c @@ -529,11

[Spice-devel] [PATCH] display/*: add debug helpers DUMP_VRAM_MSPACE and DUMP_DEVRAM_MSPACE

2011-07-06 Thread Alon Levy
changes the passed user pointer to mspace from NULL to a proper pdev, so it will be able to print using QXL_IO_LOG. --- display/qxldd.h | 25 + display/res.c | 14 -- display/res.h |1 + 3 files changed, 34 insertions(+), 6 deletions(-) diff --git

[Spice-devel] [PATCH] display: add a few debug prints (level=3)

2011-07-06 Thread Alon Levy
--- display/driver.c |1 + display/res.c|3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/display/driver.c b/display/driver.c index 4ff0d43..3d15295 100644 --- a/display/driver.c +++ b/display/driver.c @@ -1269,6 +1269,7 @@ HBITMAP APIENTRY

[Spice-devel] [PATCH] display/*: s/FreeSurface/FreeSurfaceInfo/

2011-07-06 Thread Alon Levy
--- display/driver.c |2 +- display/res.c |2 +- display/surface.h |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/display/driver.c b/display/driver.c index 3d15295..3d46dca 100644 --- a/display/driver.c +++ b/display/driver.c @@ -1281,7 +1281,7 @@ HBITMAP

[Spice-devel] [PATCH] display/res: substitute CursorCacheRemove false break with return

2011-07-06 Thread Alon Levy
From: Yonit Halperin yhalp...@redhat.com --- display/res.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/display/res.c b/display/res.c index 3c24f6c..08ab537 100644 --- a/display/res.c +++ b/display/res.c @@ -2888,7 +2888,7 @@ static void CursorCacheRemove(PDev *pdev,

[Spice-devel] [PATCH] display/res: make (Cursor|Palette)CacheRemove always release the object

2011-07-06 Thread Alon Levy
From: Yonit Halperin yhalp...@redhat.com even if it is not found in the cache (which is an error) --- display/res.c | 45 ++--- 1 files changed, 30 insertions(+), 15 deletions(-) diff --git a/display/res.c b/display/res.c index 08ab537..d93a6af 100644

[Spice-devel] [PATCH] display/res: add helpers for clearing device memory

2011-07-06 Thread Alon Levy
Refactors InitResources code called upon DrvEnableSurface so it can later be called from AssertModeEnable. Introduces three helpers: EmptyReleaseRing - no vmexit, goes over release ring and empties it all (as opposed to OOM behavior that empties 50 resources). InitDeviceMemoryResources - resets

[Spice-devel] [PATCH] display/res: __AllocMem: verbose debugging (log_level 12)

2011-07-06 Thread Alon Levy
Cc: Yonit Halperin yhalp...@redhat.com --- display/res.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/display/res.c b/display/res.c index 0a9db0b..146a918 100644 --- a/display/res.c +++ b/display/res.c @@ -389,8 +389,15 @@ static void *__AllocMem(PDev* pdev,

[Spice-devel] [PATCH] display/res: add a debug print level 9

2011-07-06 Thread Alon Levy
--- display/res.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/display/res.c b/display/res.c index 146a918..9bbdb06 100644 --- a/display/res.c +++ b/display/res.c @@ -264,6 +264,8 @@ static void WaitForCmdRing(PDev* pdev) if (!wait) { break;

[Spice-devel] [PATCH] display/surface: add QXL_SURFACE_HOOKS define

2011-07-06 Thread Alon Levy
Cc: Yonit Halperin yhalp...@redhat.com --- display/surface.c |9 + display/surface.h | 15 +++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/display/surface.c b/display/surface.c index 436e76e..d24e751 100644 --- a/display/surface.c +++

[Spice-devel] [PATCH] display/surface: GetSurfaceId: return -1 if \!surf-dhsurf

2011-07-06 Thread Alon Levy
Cc: Yonit Halperin yhalp...@redhat.com --- display/surface.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/display/surface.h b/display/surface.h index 00fd93c..e677610 100644 --- a/display/surface.h +++ b/display/surface.h @@ -41,6 +41,9 @@ static _inline UINT32

[Spice-devel] [PATCH] display/surface: FreeSurfaceInfo: ignore double frees

2011-07-06 Thread Alon Levy
Cc: Yonit Halperin yhalp...@redhat.com --- display/surface.h |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/display/surface.h b/display/surface.h index e677610..0b7edb3 100644 --- a/display/surface.h +++ b/display/surface.h @@ -55,10 +55,16 @@ static _inline void

[Spice-devel] [PATCH] display/surface: add DEVICE_BITMAP_ALLOCATION_TYPE_RAM, cleanup surface alloc/free code paths

2011-07-06 Thread Alon Levy
This adds a third surface allocation type, allocation from guest memory using the windows ddk allocator. Not all code paths are used later - the creation is not done since copy-surfaces-to-ram allocates memory itself, and at the end we never allocate any surfaces when the device is disabled, we

[Spice-devel] [PATCH] display/surface: add surfaces from/to ram

2011-07-06 Thread Alon Levy
Adds fields to SurfaceInfo to cache data previously only available via SurfaceArea::draw_area. Adds two functions to save and restore surfaces from ram: MoveAllSurfacesToVideoRam allocates and copies surfaces from vram to ram, and calls EngModifySurface with an empty hook list to make those

[Spice-devel] [PATCH] display/*: add PDev-enabled

2011-07-06 Thread Alon Levy
GDI will continue using any callback we registered even after a DrvAssertMode(FALSE). We are expected to move any surface we own to GDI handled and ignore any new requests to create a surface. This is called punting and we use PDev-enabled to indicate if this is required. A later patch will set

[Spice-devel] [PATCH] display/driver: reimplement DrvAssertMode for Suspend+Hibernate (S3+S4) support

2011-07-06 Thread Alon Levy
our old code did a very minimal flow good for resolution change: DrvAssertMode False (disable) destroy primary surface delete vram memslot DrvAssertMode True (enable) create primary surface (destroyed on disable) create vram memslot Aside: Importantly the flow for resolution change

[Spice-devel] [PATCH] display: add FlushRelease and FlushSurfaces for alternative V06 (2) revision implementation

2011-07-06 Thread Alon Levy
--- display/driver.c | 44 ++-- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/display/driver.c b/display/driver.c index 02ee8d0..37135aa 100644 --- a/display/driver.c +++ b/display/driver.c @@ -956,13 +956,53 @@ VOID

Re: [Spice-devel] [PATCH] server: add async io support

2011-07-06 Thread Gerd Hoffmann
Hi, diff --git a/server/spice.h b/server/spice.h index f64ff41..f0d5685 100644 --- a/server/spice.h +++ b/server/spice.h @@ -122,6 +122,17 @@ struct QXLWorker { void (*reset_cursor)(QXLWorker *worker); void (*destroy_surface_wait)(QXLWorker *worker, uint32_t surface_id);

[Spice-devel] [PATCH] (mp+dd) whitespace cleanup

2011-07-06 Thread Alon Levy
--- display/driver.c |1 - display/res.c|3 ++- miniport/qxl.c |6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/display/driver.c b/display/driver.c index 4a80202..4ff0d43 100644 --- a/display/driver.c +++ b/display/driver.c @@ -696,7 +696,6 @@ static

[Spice-devel] RFC: Render support in the protocol

2011-07-06 Thread Soeren Sandmann
RENDER is a very commonly used X extension that currently is not supported very well in SPICE. This leads to the QXL X driver having to read back pixels from the device, render in software, then transmit an image. This is currently the biggest performance issue with SPICE for X. The specification

Re: [Spice-devel] RFC: Render support in the protocol

2011-07-06 Thread John A. Sullivan III
On Wed, 2011-07-06 at 15:38 +0200, Soeren Sandmann wrote: RENDER is a very commonly used X extension that currently is not supported very well in SPICE. This leads to the QXL X driver having to read back pixels from the device, render in software, then transmit an image. This is currently the

Re: [Spice-devel] [PATCH] server: add async io support

2011-07-06 Thread Alon Levy
On Wed, Jul 06, 2011 at 02:42:03PM +0200, Gerd Hoffmann wrote: Hi, diff --git a/server/spice.h b/server/spice.h index f64ff41..f0d5685 100644 --- a/server/spice.h +++ b/server/spice.h @@ -122,6 +122,17 @@ struct QXLWorker { void (*reset_cursor)(QXLWorker *worker); void

[Spice-devel] [PATCH v2] async and s3 support

2011-07-06 Thread Alon Levy
v2 changes: added cookie (uint64_t), seperate patch added surface_update (as long as we are changing the api) - more of an RfC since I'm not sure what Gerd wants.. v1 comment: This is a redoing of async io support using spice api changes, and on top of it the s3 support patches using the

[Spice-devel] [PATCH v2] server/spice.h: add surface_updated callback (unused yet)

2011-07-06 Thread Alon Levy
--- server/spice.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/server/spice.h b/server/spice.h index fec2476..20ceeef 100644 --- a/server/spice.h +++ b/server/spice.h @@ -206,6 +206,8 @@ struct QXLInterface { void (*notify_update)(QXLInstance *qin, uint32_t