summaryrefslogtreecommitdiffstats
path: root/client/glz_decoder_window.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-10-09 22:13:58 +0200
committerHans de Goede <hdegoede@redhat.com>2010-10-09 22:27:53 +0200
commit3a4051d7ce70914e5cb88496a6a2510ede793325 (patch)
tree39e9b81ef88d9bdadfc35fb854867a693e72c588 /client/glz_decoder_window.h
parent1e34c14c64f1149fa5c30302d62442d7ce7c79b2 (diff)
downloadspice-3a4051d7ce70914e5cb88496a6a2510ede793325.tar.gz
spice-3a4051d7ce70914e5cb88496a6a2510ede793325.tar.xz
spice-3a4051d7ce70914e5cb88496a6a2510ede793325.zip
spicec: Do not try to do accounting of pci memory
Without this patch spicec reproducely hangs in GlzDecoderWindow::pre_decode_update_window(). When GlzDecoderWindow::will_overflow() returns true, GlzDecoderWindow::pre_decode_update_window(), waits for a call to GlzDecoderWindow::post_decode() to free up some memory This happens even though there still is pci memory available (otherwise the driver would not have been able to send an image to decode in the first place). The GlzDecoderWindow::post_decode() call never happens as the server is waiting for a reply to the decode of the hanging image, causing the client to hang for ever. This patch fixes this by simply removing the "attempted" pci memory accounting. As there is no need for that, as the driver already must keep track of pci memory usage. I've verified that both the old and new Xorg drivers take care of not overusing the pci memory themselves I would expect the same to be true for the windows driver. Note the calculating of the glz_window_size in red_client.cpp cannot be removed as the calculated value is send as part of the SpiceMsgcDisplayInit on connect.
Diffstat (limited to 'client/glz_decoder_window.h')
-rw-r--r--client/glz_decoder_window.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/client/glz_decoder_window.h b/client/glz_decoder_window.h
index a2848bb7..e061c736 100644
--- a/client/glz_decoder_window.h
+++ b/client/glz_decoder_window.h
@@ -33,7 +33,7 @@ typedef int DecodedImageWinId;
class GlzDecoderWindow {
public:
- GlzDecoderWindow(int pixels_capacity, GlzDecoderDebug &debug_calls);
+ GlzDecoderWindow(GlzDecoderDebug &debug_calls);
virtual ~GlzDecoderWindow();
DecodedImageWinId pre_decode(uint64_t image_id, uint64_t relative_head_id);
@@ -50,8 +50,6 @@ public:
/* NOTE - clear mustn't be called if the window is currently used by a decoder*/
void clear();
- void set_pixels_capacity(int pixels_capacity);
-
private:
void wait_for_image(int index);
void add_image(GlzDecodedImage *image);
@@ -75,14 +73,12 @@ private:
void release_images();
private:
- int _pixels_capacity;
GlzDecodedImage **_images; // cyclic window
int _head_idx; // index in images array (not image id)
uint64_t _tail_image_id;
int _images_capacity;
int _n_images; // _n_images counts all the images in
// the window, including the missing ones
- uint64_t _n_pixels;
std::list<uint64_t> _missing_list;