]> git.ipfire.org Git - thirdparty/qemu.git/commit
cirrus: handle negative pitch in cirrus_invalidate_region()
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 25 Jan 2017 13:48:57 +0000 (14:48 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 21 Mar 2017 20:00:58 +0000 (15:00 -0500)
commit5d26f91c89757a8b84f5da9c6dfa37cda19283c5
treee40e5123d11d5f6a5773575eed83014362834969
parent1a184c3af31705312f4b464dadb5df2c8a98a899
cirrus: handle negative pitch in cirrus_invalidate_region()

cirrus_invalidate_region() calls memory_region_set_dirty()
on a per-line basis, always ranging from off_begin to
off_begin+bytesperline. With a negative pitch off_begin
marks the top most used address and thus we need to do an
initial shift backwards by a line for negative pitches of
backward blits, otherwise the first iteration covers the
line going from the start offset forwards instead of
backwards.
Additionally since the start address is inclusive, if we
shift by a full `bytesperline` we move to the first address
*not* included in the blit, so we only shift by one less
than bytesperline.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Message-id: 1485352137-29367-1-git-send-email-w.bumiller@proxmox.com

[ kraxel: codestyle fixes ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit f153b563f8cf121aebf5a2fff5f0110faf58ccb3)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/display/cirrus_vga.c