Skip to content

Commit 1cb62e3

Browse files
zbalatonkraxel
authored andcommitted
sm501: Ignore no-op blits
Some guests seem to try source copy blits with same source and dest which are no-op so avoid calling pixman for these. Signed-off-by: BALATON Zoltan <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-id: a2a8214dd37344dfb65f1c343ace4cff2e94f3bb.1592686588.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <[email protected]>
1 parent 4decaad commit 1cb62e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hw/display/sm501.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,11 @@ static void sm501_2d_operation(SM501State *s)
788788
(rop2_source_is_pattern ?
789789
" with pattern source" : ""));
790790
}
791+
/* Ignore no-op blits, some guests seem to do this */
792+
if (src_base == dst_base && src_pitch == dst_pitch &&
793+
src_x == dst_x && src_y == dst_y) {
794+
break;
795+
}
791796
/* Check for overlaps, this could be made more exact */
792797
uint32_t sb, se, db, de;
793798
sb = src_base + src_x + src_y * (width + src_pitch);

0 commit comments

Comments
 (0)