[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/12] macfb: use memory_region_init_ram() in macfb_common_re
From: |
Laurent Vivier |
Subject: |
Re: [PATCH 04/12] macfb: use memory_region_init_ram() in macfb_common_realize() for the framebuffer |
Date: |
Mon, 4 Oct 2021 10:53:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Le 02/10/2021 à 12:59, Mark Cave-Ayland a écrit :
> Currently macfb_common_realize() defines the framebuffer RAM memory region as
> being non-migrateable but then immediately registers it for migration. Replace
> memory_region_init_ram_nomigrate() with memory_region_init_ram() which is
> clearer
> and does exactly the same thing.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/display/macfb.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/display/macfb.c b/hw/display/macfb.c
> index f4e789d0d7..e86fbbbb64 100644
> --- a/hw/display/macfb.c
> +++ b/hw/display/macfb.c
> @@ -368,11 +368,10 @@ static void macfb_common_realize(DeviceState *dev,
> MacfbState *s, Error **errp)
> memory_region_init_io(&s->mem_ctrl, OBJECT(dev), &macfb_ctrl_ops, s,
> "macfb-ctrl", 0x1000);
>
> - memory_region_init_ram_nomigrate(&s->mem_vram, OBJECT(dev), "macfb-vram",
> - MACFB_VRAM_SIZE, errp);
> + memory_region_init_ram(&s->mem_vram, OBJECT(dev), "macfb-vram",
> + MACFB_VRAM_SIZE, errp);
> s->vram = memory_region_get_ram_ptr(&s->mem_vram);
> s->vram_bit_mask = MACFB_VRAM_SIZE - 1;
> - vmstate_register_ram(&s->mem_vram, dev);
> memory_region_set_coalescing(&s->mem_vram);
> }
>
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
- Re: [PATCH 01/12] macfb: handle errors that occur during realize, (continued)
- [PATCH 02/12] macfb: fix invalid object reference in macfb_common_realize(), Mark Cave-Ayland, 2021/10/02
- [PATCH 04/12] macfb: use memory_region_init_ram() in macfb_common_realize() for the framebuffer, Mark Cave-Ayland, 2021/10/02
- [PATCH 03/12] macfb: fix overflow of color_palette array, Mark Cave-Ayland, 2021/10/02
- [PATCH 07/12] macfb: add qdev property to specify display type, Mark Cave-Ayland, 2021/10/02
- [PATCH 08/12] macfb: add common monitor modes supported by the MacOS toolbox ROM, Mark Cave-Ayland, 2021/10/02