[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 04/16] sm501: Perform a full update after palette chang
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 04/16] sm501: Perform a full update after palette change |
Date: |
Mon, 9 Jul 2018 17:43:38 +1000 |
From: Sebastian Bauer <address@hidden>
Changing the palette of a color index has as an immediate effect on
all pixels with the corresponding index on real hardware. Performing a
full update after a palette change is a simple way to emulate this
effect.
Signed-off-by: Sebastian Bauer <address@hidden>
Signed-off-by: BALATON Zoltan <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/display/sm501.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 05c964bea1..b095134d6f 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -487,6 +487,7 @@ typedef struct SM501State {
MemoryRegion twoD_engine_region;
uint32_t last_width;
uint32_t last_height;
+ bool do_full_update; /* perform a full update next time */
I2CBus *i2c_bus;
/* mmio registers */
@@ -1042,6 +1043,7 @@ static void sm501_palette_write(void *opaque, hwaddr addr,
assert(range_covers_byte(0, 0x400 * 3, addr));
*(uint32_t *)&s->dc_palette[addr] = value;
+ s->do_full_update = true;
}
static uint64_t sm501_disp_ctrl_read(void *opaque, hwaddr addr,
@@ -1630,6 +1632,12 @@ static void sm501_update_display(void *opaque)
full_update = 1;
}
+ /* someone else requested a full update */
+ if (s->do_full_update) {
+ s->do_full_update = false;
+ full_update = 1;
+ }
+
/* draw each line according to conditions */
snap = memory_region_snapshot_and_clear_dirty(&s->local_mem_region,
offset, width * height * src_bpp, DIRTY_MEMORY_VGA);
--
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 <=
- [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, 2018/07/09
- [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