qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org, kraxel@redhat.com, lcapitulino@redhat.com,
	aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH 0/4] fix qxl screendump using monitor_suspend
Date: Sun, 11 Mar 2012 18:39:33 +0200	[thread overview]
Message-ID: <1331483977-18910-1-git-send-email-alevy@redhat.com> (raw)

This patchset starts and ends with trace event additions that make it easier to see the change.

It applies on top of http://lists.gnu.org/archive/html/qemu-devel/2012-03/msg01784.html
due to trace-events.

The problem addressed by this patchset is that after recent fixes (81fb6f)
screendump with a qxl device in native mode saves a stale screen dump.

The solution is to use monitor_suspend and monitor_release in qxl's implementation.

This is done by:
 1. introducing an extra parameter to vga_hw_screen_dump & hw_vga_dump
  console: pass Monitor to vga_hw_screen_dump/hw_vga_dump
 2. using it in qxl via a bh.
  qxl-render: call ppm_save on bh

Additional patches add trace events to qxl and qxl_render, making it easy to see the difference:

events setup: (using stderr backend)

(qemu) trace-event ppm_save on
(qemu) trace-event qxl* on
(qemu) trace-event qxl_interface_get_command_enter off
(qemu) trace-event qxl_interface_release_resource off
(qemu) trace-event qxl_interface_get_command_ret off

before: ppm_save done before update:

    (qemu) screendump /tmp/a.ppm
    ppm_save /tmp/a.ppm surface=0x7fc0267b3ad0
    qxl_interface_update_area_complete surface=0 [152,160,464,480] #=1
    qxl_interface_update_area_complete_schedule_bh #dirty=1
    qxl_render_update_area_done 0x7fc02b603db0
    (qemu) qxl_blit stride=-2560 [152, 160, 464, 480]

after:

    (qemu) screendump /tmp/a.ppm
    qxl_interface_update_area_complete surface=0 [152,160,464,480] #=1
    qxl_interface_update_area_complete_schedule_bh #dirty=1
    qxl_render_update_area_done 0x7f407af72210
    qxl_render_ppm_save_bh 0x7f407f845b60 (primary 0x7f401bc00000)
    qxl_blit stride=-2560 [152, 160, 464, 480]
    ppm_save /tmp/a.ppm surface=0x7f4077204ad0
    (qemu)

Note: This doesn't address a possible libvirt problem that was mentioned in
length before, but since it has not been reproduced it will be fixed when it
is. Meanwhile other users like autotest will be fixed by this patch (by fix I
mean screendump will produce the correct output).

Alon Levy (4):
  qxl: switch qxl.c to trace-events
  qxl/qxl_render.c: add trace events
  console: pass Monitor to vga_hw_screen_dump/hw_vga_dump
  qxl-render: call ppm_save on bh

 console.c          |    4 +-
 console.h          |    5 +-
 hw/blizzard.c      |    2 +-
 hw/g364fb.c        |    3 +-
 hw/omap_dss.c      |    4 +-
 hw/omap_lcdc.c     |    3 +-
 hw/qxl-render.c    |   95 +++++++++++++++++++++++++++------
 hw/qxl.c           |  150 ++++++++++++++++++++++++---------------------------
 hw/qxl.h           |    2 +-
 hw/sm501.c         |    4 +-
 hw/tcx.c           |   12 +++--
 hw/vga.c           |    6 ++-
 hw/vmware_vga.c    |    5 +-
 monitor.c          |    2 +-
 trace-events       |   55 +++++++++++++++++++
 ui/spice-display.h |    3 +
 16 files changed, 240 insertions(+), 115 deletions(-)

-- 
1.7.9.1

             reply	other threads:[~2012-03-11 18:07 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-11 16:39 Alon Levy [this message]
2012-03-11 16:39 ` [Qemu-devel] [PATCH 1/4] qxl: switch qxl.c to trace-events Alon Levy
2012-03-11 16:39 ` [Qemu-devel] [PATCH 2/4] qxl/qxl_render.c: add trace events Alon Levy
2012-03-11 16:39 ` [Qemu-devel] [PATCH 3/4] console: pass Monitor to vga_hw_screen_dump/hw_vga_dump Alon Levy
2012-03-11 16:39 ` [Qemu-devel] [PATCH 4/4] qxl-render: call ppm_save on bh Alon Levy
2012-03-11 19:26 ` [Qemu-devel] [PATCH v2 0/5] fix qxl screendump using monitor_suspend Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 1/5] qxl: switch qxl.c to trace-events Alon Levy
2012-03-12 10:20     ` Gerd Hoffmann
2012-03-12 11:43       ` Alon Levy
2012-03-12 15:50         ` Alon Levy
2012-03-13  6:42           ` Gerd Hoffmann
2012-03-13  9:35             ` Alon Levy
2012-03-13  9:47               ` Gerd Hoffmann
2012-03-13 10:18                 ` Alon Levy
2012-03-13 10:26                 ` Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 2/5] qxl/qxl_render.c: add trace events Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 3/5] qxl-render: call ppm_save on bh Alon Levy
2012-03-13 13:22     ` Luiz Capitulino
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 4/5] console: pass Monitor to vga_hw_screen_dump/hw_vga_dump Alon Levy
2012-03-13 13:35     ` Luiz Capitulino
2012-03-13 14:46       ` Alon Levy
2012-03-13 15:59         ` Luiz Capitulino
2012-03-13 17:35           ` Alon Levy
2012-03-13 18:07             ` Luiz Capitulino
2012-03-14  8:25             ` Gerd Hoffmann
2012-03-14  8:32               ` Alon Levy
2012-03-14  8:14         ` Gerd Hoffmann
2012-03-14  8:37           ` Daniel P. Berrange
2012-03-14 12:32             ` Luiz Capitulino
2012-03-14 13:14               ` Alon Levy
2012-03-14 13:17                 ` Daniel P. Berrange
2012-03-14 13:18                 ` Luiz Capitulino
2012-03-14 13:43                   ` Alon Levy
2012-03-11 19:26   ` [Qemu-devel] [PATCH v2 5/5] qxl: screendump: use provided Monitor Alon Levy
2012-03-11 19:33 ` [Qemu-devel] [PATCH 0/4] fix qxl screendump using monitor_suspend Alon Levy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331483977-18910-1-git-send-email-alevy@redhat.com \
    --to=alevy@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).