qxl: fix surface migration
commit1331eab216c9dc4e50a48a34d14926b31a7fd611
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 22 Jun 2016 12:07:24 +0000 (22 14:07 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 6 Jul 2016 08:31:11 +0000 (6 10:31 +0200)
tree53053847b57470993293d24db0e058d23f6e17f9
parent3cb5158f15604a9f50287f2f06777d5835ff4c15
qxl: fix surface migration

Create a helper function qxl_dirty_one_surface() to mark a single qxl
surface as dirty.  Use the new qxl_get_check_slot_offset function and
lookup the memory region from the slot instead of assuming the surface
is stored in vram.

Use the new helper function in qxl_dirty_surfaces, for both primary and
off-screen surfaces.  For off-screen surfaces this is no functional
change.  For primary surfaces this will dirty only the memory actually
used instead of the whole surface0 region.  It will also work correctly
in case the guest places the primary surface in vram instead of the
surface0 region (linux kms driver does that).

https://bugzilla.redhat.com/show_bug.cgi?id=1235732

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1466597244-5938-3-git-send-email-kraxel@redhat.com
hw/display/qxl.c
hw/display/trace-events