Skip to content
Commit 5d26f91c authored by Wolfgang Bumiller's avatar Wolfgang Bumiller Committed by Michael Roth
Browse files

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: default avatarWolfgang Bumiller <w.bumiller@proxmox.com>
Message-id: 1485352137-29367-1-git-send-email-w.bumiller@proxmox.com

[ kraxel: codestyle fixes ]

Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit f153b563)
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 1a184c3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment