Fix hardware accelerated video to video copy on Cirrus VGA (Brian Kress)
commitc194ef4a92953adfbafc86efdb92975d1791f2c0
authoraliguori <aliguori>
Mon, 16 Feb 2009 14:59:35 +0000 (16 14:59 +0000)
committerAvi Kivity <avi@redhat.com>
Mon, 16 Feb 2009 15:28:59 +0000 (16 15:28 +0000)
tree31f57001e38e274348a8b14997e012d2e548e3d7
parent6591a886e69da9e8e3937260541587251c588bf8
Fix hardware accelerated video to video copy on Cirrus VGA (Brian Kress)

cirrus_do_copy() in hw/cirrus_vga.c seems to make some incorrect assumptions
about video memory layout.  It tries to convert addresses to coordinates
assuming that one row of data is (width * depth) bytes long.  The correct way
seems to be to use the pitch fields in the CirrusVGAState structure instead.

Without this patch, I get lots of screen corruption when I try to drag a window
under X as it's passing the wrong coordinates to the display surface for the
copy.  With this patch I can drag a window with no screen corruption.

Signed-off-by: Brian Kress <kressb@moose.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/cirrus_vga.c