[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/12] macfb: add qdev property to specify display type
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 07/12] macfb: add qdev property to specify display type |
Date: |
Sat, 2 Oct 2021 16:04:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
On 10/2/21 13:00, Mark Cave-Ayland wrote:
> Since the available resolutions and colour depths are determined by the
> attached
> display type, add a qdev property to allow the display type to be specified.
>
> The main resolutions of interest are high resolution 1152x870 with 8-bit
> colour
> and SVGA resolution up to 800x600 with 32-bit colour so update the q800
> machine
> to allow high resolution mode if specified and otherwise fall back to SVGA.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/display/macfb.c | 6 +++++-
> hw/m68k/q800.c | 5 +++++
> include/hw/display/macfb.h | 1 +
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/hw/display/macfb.c b/hw/display/macfb.c
> index 5c95aa4a11..023d1f0cd1 100644
> --- a/hw/display/macfb.c
> +++ b/hw/display/macfb.c
> @@ -316,7 +316,7 @@ static uint32_t macfb_sense_read(MacfbState *s)
> MacFbSense *macfb_sense;
> uint8_t sense;
>
What about:
assert(s->type < ARRAY_SIZE(macfb_sense_table));
> - macfb_sense = &macfb_sense_table[MACFB_DISPLAY_VGA];
> + macfb_sense = &macfb_sense_table[s->type];
Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
- Re: [PATCH 02/12] macfb: fix invalid object reference in macfb_common_realize(), (continued)
- [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
- [PATCH 06/12] macfb: implement mode sense to allow display type to be detected, Mark Cave-Ayland, 2021/10/02
- [PATCH 05/12] macfb: add trace events for reading and writing the control registers, Mark Cave-Ayland, 2021/10/02