--- server/red_worker.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c index 79fffd1..3599b05 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -4336,7 +4336,7 @@ static int red_process_cursor(RedWorker *worker, uint32_t max_pipe_size, int *ri *ring_is_empty = FALSE; while (!cursor_connected(worker) || - worker->cursor_channel->common.base.rcc->pipe_size <= max_pipe_size) { + red_channel_min_pipe_size(&worker->cursor_channel->common.base) <= max_pipe_size) { if (!worker->qxl->st->qif->get_cursor_command(worker->qxl, &ext_cmd)) { *ring_is_empty = TRUE; if (worker->repoll_cursor_ring < CMD_RING_POLL_RETRIES) { @@ -4374,10 +4374,10 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int * QXLCommandExt ext_cmd; int n = 0; uint64_t start = red_now(); - + *ring_is_empty = FALSE; - while (!display_connected(worker) - || worker->display_channel->common.base.rcc->pipe_size <= max_pipe_size) { + while (!display_connected(worker) || + red_channel_min_pipe_size(&worker->display_channel->common.base) <= max_pipe_size) { if (!worker->qxl->st->qif->get_command(worker->qxl, &ext_cmd)) { *ring_is_empty = TRUE;; if (worker->repoll_cmd_ring < CMD_RING_POLL_RETRIES) { @@ -8694,6 +8694,8 @@ static void red_wait_outgoing_items(RedChannel *channel); static inline void flush_display_commands(RedWorker *worker) { + RedChannel *display_red_channel = &worker->display_channel->common.base; + for (;;) { uint64_t end_time; int ring_is_empty; @@ -8715,7 +8717,7 @@ static inline void flush_display_commands(RedWorker *worker) for (;;) { red_channel_push(&worker->display_channel->common.base); if (!display_connected(worker) || - worker->display_channel->common.base.rcc->pipe_size <= MAX_PIPE_SIZE) { + red_channel_min_pipe_size(display_red_channel) <= MAX_PIPE_SIZE) { break; } RedChannel *channel = (RedChannel *)worker->display_channel; @@ -8736,6 +8738,8 @@ static inline void flush_display_commands(RedWorker *worker) static inline void flush_cursor_commands(RedWorker *worker) { + RedChannel *cursor_red_channel = &worker->cursor_channel->common.base; + for (;;) { uint64_t end_time; int ring_is_empty = FALSE; @@ -8757,7 +8761,7 @@ static inline void flush_cursor_commands(RedWorker *worker) for (;;) { red_channel_push(&worker->cursor_channel->common.base); if (!cursor_connected(worker) - || worker->cursor_channel->common.base.rcc->pipe_size <= MAX_PIPE_SIZE) { + || red_channel_min_pipe_size(cursor_red_channel) <= MAX_PIPE_SIZE) { break; } RedChannel *channel = (RedChannel *)worker->cursor_channel; @@ -10089,9 +10093,9 @@ static void handle_dev_input(EventListener *listener, uint32_t events) red_channel_push(&worker->display_channel->common.base); } if (worker->qxl->st->qif->flush_resources(worker->qxl) == 0) { - red_printf("oom current %u pipe %u", worker->surfaces.current_size, + red_printf("oom current %u pipes %u", worker->surfaces.current_size, worker->display_channel ? - display_red_channel->rcc->pipe_size : 0); + red_channel_sum_pipes_size(display_red_channel) : 0); red_free_some(worker); worker->qxl->st->qif->flush_resources(worker->qxl); } -- 1.7.4.4 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel