qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé via" <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Andreas Gustafsson" <gson@gson.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset
Date: Thu,  3 Feb 2022 01:05:50 +0100	[thread overview]
Message-ID: <20220203000550.36711-1-f4bug@amsat.org> (raw)

When resetting we don't want to *reset* the dirty bitmap,
we want to *set* it to mark the entire VRAM dirty due to
the memset() call.

Replace memory_region_reset_dirty() by tcx_set_dirty()
which conveniently set the correct ranges dirty.

Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Supersedes: <20220122000707.82918-1-f4bug@amsat.org>
---
 hw/display/tcx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index d4d09d0df8..90e2975e35 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -371,8 +371,7 @@ static void tcx_reset(DeviceState *d)
     s->r[258] = s->g[258] = s->b[258] = 255;
     update_palette_entries(s, 0, 260);
     memset(s->vram, 0, MAXX*MAXY);
-    memory_region_reset_dirty(&s->vram_mem, 0, MAXX * MAXY * (1 + 4 + 4),
-                              DIRTY_MEMORY_VGA);
+    tcx_set_dirty(s, 0, MAXX * MAXY);
     s->dac_index = 0;
     s->dac_state = 0;
     s->cursx = 0xf000; /* Put cursor off screen */
-- 
2.34.1



             reply	other threads:[~2022-02-03  0:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  0:05 Philippe Mathieu-Daudé via [this message]
2022-02-05 14:06 ` [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset Mark Cave-Ayland
2022-02-05 14:19   ` BALATON Zoltan
2022-02-05 15:39     ` Peter Maydell
2022-02-06  9:30       ` Mark Cave-Ayland
2022-02-06 10:43         ` Peter Maydell
2022-09-25 10:03           ` Philippe Mathieu-Daudé via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220203000550.36711-1-f4bug@amsat.org \
    --to=qemu-devel@nongnu.org \
    --cc=f4bug@amsat.org \
    --cc=gson@gson.org \
    --cc=kraxel@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).