yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-cirrus-fix-off-by-one-in-cirrus_bitblt_rop_bkwd_tran.patch

619821
From 081ddf9d66155dbec8ec064d7671ba0799642fd6 Mon Sep 17 00:00:00 2001
976a86
From: Gerd Hoffmann <kraxel@redhat.com>
619821
Date: Mon, 27 Mar 2017 10:01:22 +0200
976a86
Subject: [PATCH 7/7] cirrus: fix off-by-one in
976a86
 cirrus_bitblt_rop_bkwd_transp_*_16
976a86
MIME-Version: 1.0
976a86
Content-Type: text/plain; charset=UTF-8
976a86
Content-Transfer-Encoding: 8bit
976a86
976a86
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
619821
Message-id: <1490608882-10242-8-git-send-email-kraxel@redhat.com>
619821
Patchwork-id: 74555
619821
O-Subject: [RHEL-7.4 qemu-kvm PATCH v2 7/7] cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
619821
Bugzilla: 1430060
976a86
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
976a86
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
619821
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
976a86
976a86
The switch from pointers to addresses (commit
976a86
026aeffcb4752054830ba203020ed6eb05bcaba8 and
976a86
ffaf857778286ca54e3804432a2369a279e73aa7) added
976a86
a off-by-one bug to 16bit backward blits.  Fix.
976a86
976a86
Reported-by: 李强 <liqiang6-s@360.cn>
976a86
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
976a86
Reviewed-by: Li Qiang <liqiang6-s@360.cn>
976a86
Message-id: 1489735296-19047-1-git-send-email-kraxel@redhat.com
976a86
(cherry picked from commit f019722cbbb45aea153294fc8921fcc96a4d3fa2)
976a86
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
976a86
---
976a86
 hw/display/cirrus_vga_rop.h | 2 +-
976a86
 1 file changed, 1 insertion(+), 1 deletion(-)
976a86
976a86
diff --git a/hw/display/cirrus_vga_rop.h b/hw/display/cirrus_vga_rop.h
976a86
index 16dffb8..c1fc070 100644
976a86
--- a/hw/display/cirrus_vga_rop.h
976a86
+++ b/hw/display/cirrus_vga_rop.h
976a86
@@ -220,7 +220,7 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
976a86
     srcpitch += bltwidth;
976a86
     for (y = 0; y < bltheight; y++) {
976a86
         for (x = 0; x < bltwidth; x+=2) {
976a86
-            ROP_OP_TR_16(s, dstaddr, cirrus_src16(s, srcaddr), transp);
976a86
+            ROP_OP_TR_16(s, dstaddr - 1, cirrus_src16(s, srcaddr - 1), transp);
976a86
             dstaddr -= 2;
976a86
             srcaddr -= 2;
976a86
         }
976a86
-- 
976a86
1.8.3.1
976a86