artist: set memory region owners for buffers to the artist device
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 24 Jun 2022 16:08:39 +0000 (17:08 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 26 Jun 2022 17:40:28 +0000 (18:40 +0100)
This fixes the output of "info qom-tree" so that the buffers appear as children
of the artist device, rather than underneath the "unattached" container.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220624160839.886649-1-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Helge Deller <deller@gmx.de>
hw/display/artist.c

index eadaef0d466f7dc806a379407fce689d0150df2e..fde050c882b0cfc5f2e748fa3d8b923ab5488895 100644 (file)
@@ -1358,7 +1358,7 @@ static void artist_create_buffer(ARTISTState *s, const char *name,
 {
     struct vram_buffer *buf = s->vram_buffer + idx;
 
-    memory_region_init_ram(&buf->mr, NULL, name, width * height,
+    memory_region_init_ram(&buf->mr, OBJECT(s), name, width * height,
                            &error_fatal);
     memory_region_add_subregion_overlap(&s->mem_as_root, *offset, &buf->mr, 0);