All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
@ 2017-03-17  7:21 Gerd Hoffmann
  2017-03-17  8:31 ` 李强
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2017-03-17  7:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

The switch from pointers to addresses (commit
026aeffcb4752054830ba203020ed6eb05bcaba8 and
ffaf857778286ca54e3804432a2369a279e73aa7) added
a off-by-one bug to 16bit backward blits.  Fix.

Reported-by: 李强 <liqiang6-s@360.cn>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/cirrus_vga_rop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/cirrus_vga_rop.h b/hw/display/cirrus_vga_rop.h
index c61a677..0841b9e 100644
--- a/hw/display/cirrus_vga_rop.h
+++ b/hw/display/cirrus_vga_rop.h
@@ -219,7 +219,7 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
     srcpitch += bltwidth;
     for (y = 0; y < bltheight; y++) {
         for (x = 0; x < bltwidth; x+=2) {
-            ROP_OP_TR_16(s, dstaddr, cirrus_src16(s, srcaddr), transp);
+            ROP_OP_TR_16(s, dstaddr - 1, cirrus_src16(s, srcaddr - 1), transp);
             dstaddr -= 2;
             srcaddr -= 2;
         }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
  2017-03-17  7:21 [Qemu-devel] [PATCH] cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16 Gerd Hoffmann
@ 2017-03-17  8:31 ` 李强
  0 siblings, 0 replies; 2+ messages in thread
From: 李强 @ 2017-03-17  8:31 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel



> -----Original Message-----
> From: Qemu-devel
> [mailto:qemu-devel-bounces+liqiang6-s=360.cn@nongnu.org] On Behalf Of
> Gerd Hoffmann
> Sent: Friday, March 17, 2017 3:22 PM
> To: qemu-devel@nongnu.org
> Cc: Gerd Hoffmann
> Subject: [Qemu-devel] [PATCH] cirrus: fix off-by-one in
> cirrus_bitblt_rop_bkwd_transp_*_16
> 
> The switch from pointers to addresses (commit
> 026aeffcb4752054830ba203020ed6eb05bcaba8 and
> ffaf857778286ca54e3804432a2369a279e73aa7) added a off-by-one bug to
> 16bit backward blits.  Fix.
> 
> Reported-by: 李强 <liqiang6-s@360.cn>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Li Qiang <liqiang6-s@360.cn>

> ---
>  hw/display/cirrus_vga_rop.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/display/cirrus_vga_rop.h b/hw/display/cirrus_vga_rop.h index
> c61a677..0841b9e 100644
> --- a/hw/display/cirrus_vga_rop.h
> +++ b/hw/display/cirrus_vga_rop.h
> @@ -219,7 +219,7 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_,
> ROP_NAME),_16)(CirrusVGAState *s,
>      srcpitch += bltwidth;
>      for (y = 0; y < bltheight; y++) {
>          for (x = 0; x < bltwidth; x+=2) {
> -            ROP_OP_TR_16(s, dstaddr, cirrus_src16(s, srcaddr), transp);
> +            ROP_OP_TR_16(s, dstaddr - 1, cirrus_src16(s, srcaddr - 1),
> + transp);
>              dstaddr -= 2;
>              srcaddr -= 2;
>          }
> --
> 1.8.3.1
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-17  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17  7:21 [Qemu-devel] [PATCH] cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16 Gerd Hoffmann
2017-03-17  8:31 ` 李强

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.