[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 09/16] sm501: Set updated region dirty after 2D operati
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 09/16] sm501: Set updated region dirty after 2D operation |
Date: |
Mon, 9 Jul 2018 17:43:43 +1000 |
From: BALATON Zoltan <address@hidden>
Set the changed memory region dirty after performed a 2D operation to
ensure that the screen is updated properly.
Signed-off-by: BALATON Zoltan <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/display/sm501.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 10ee008eb2..3661a89f60 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -715,12 +715,16 @@ static void sm501_2d_operation(SM501State *s)
/* 1 if rop2 source is the pattern, otherwise the source is the bitmap */
int rop2_source_is_pattern = (s->twoD_control >> 14) & 0x1;
int rop = s->twoD_control & 0xFF;
+ uint32_t src_base = s->twoD_source_base & 0x03FFFFFF;
+ uint32_t dst_base = s->twoD_destination_base & 0x03FFFFFF;
/* get frame buffer info */
- uint8_t *src = s->local_mem + (s->twoD_source_base & 0x03FFFFFF);
- uint8_t *dst = s->local_mem + (s->twoD_destination_base & 0x03FFFFFF);
+ uint8_t *src = s->local_mem + src_base;
+ uint8_t *dst = s->local_mem + dst_base;
int src_width = s->twoD_pitch & 0x1FFF;
int dst_width = (s->twoD_pitch >> 16) & 0x1FFF;
+ int crt = (s->dc_crt_control & SM501_DC_CRT_CONTROL_SEL) ? 1 : 0;
+ int fb_len = get_width(s, crt) * get_height(s, crt) * get_bpp(s, crt);
if (addressing != 0x0) {
printf("%s: only XY addressing is supported.\n", __func__);
@@ -821,6 +825,15 @@ static void sm501_2d_operation(SM501State *s)
abort();
break;
}
+
+ if (dst_base >= get_fb_addr(s, crt) &&
+ dst_base <= get_fb_addr(s, crt) + fb_len) {
+ int dst_len = MIN(fb_len, ((dst_y + operation_height - 1) * dst_width +
+ dst_x + operation_width) * (1 << format_flags));
+ if (dst_len) {
+ memory_region_set_dirty(&s->local_mem_region, dst_base, dst_len);
+ }
+ }
}
static uint64_t sm501_system_config_read(void *opaque, hwaddr addr,
--
2.17.1
- [Qemu-ppc] [PULL 00/16] ppc-for-3.0 queue 20180709, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 04/16] sm501: Perform a full update after palette change, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 02/16] spapr/vio: quiet down the "irq" property accessors, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 05/16] sm501: Use values from the pitch register for 2D operations, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 12/16] ppc: fix default VGA display for PReP machines, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 03/16] sm501: Implement i2c part for reading monitor EDID, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 06/16] sm501: Implement negated destination raster operation mode, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 13/16] sam460ex: Update u-boot-sam460ex firmware, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 01/16] ppc: fix default VGA display for Mac machines, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 09/16] sm501: Set updated region dirty after 2D operation,
David Gibson <=
- [Qemu-ppc] [PULL 07/16] sm501: Log unimplemented raster operation modes, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 11/16] target/ppc: fix build on ppc64 host, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 10/16] ppc440_uc: Fix a copy/paste error, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 14/16] sam460ex: Check for errors from libfdt functions, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 16/16] sam460ex: Make sam460ex_load_device_tree() handle all errors internally, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 08/16] sm501: Fix support for non-zero frame buffer start address, David Gibson, 2018/07/09
- [Qemu-ppc] [PULL 15/16] sam460ex: Don't check for errors from qemu_fdt_*(), David Gibson, 2018/07/09
- Re: [Qemu-ppc] [PULL 00/16] ppc-for-3.0 queue 20180709, Peter Maydell, 2018/07/09