mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
macfb: add qdev property to specify display type
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 24-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> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20211007221253.29024-9-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
e6108b9636
commit
4317c51861
3 changed files with 12 additions and 1 deletions
|
@ -316,7 +316,8 @@ static uint32_t macfb_sense_read(MacfbState *s)
|
|||
MacFbSense *macfb_sense;
|
||||
uint8_t sense;
|
||||
|
||||
macfb_sense = &macfb_sense_table[MACFB_DISPLAY_VGA];
|
||||
assert(s->type < ARRAY_SIZE(macfb_sense_table));
|
||||
macfb_sense = &macfb_sense_table[s->type];
|
||||
if (macfb_sense->sense == 0x7) {
|
||||
/* Extended sense */
|
||||
sense = 0;
|
||||
|
@ -544,6 +545,8 @@ static Property macfb_sysbus_properties[] = {
|
|||
DEFINE_PROP_UINT32("width", MacfbSysBusState, macfb.width, 640),
|
||||
DEFINE_PROP_UINT32("height", MacfbSysBusState, macfb.height, 480),
|
||||
DEFINE_PROP_UINT8("depth", MacfbSysBusState, macfb.depth, 8),
|
||||
DEFINE_PROP_UINT8("display", MacfbSysBusState, macfb.type,
|
||||
MACFB_DISPLAY_VGA),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
@ -551,6 +554,8 @@ static Property macfb_nubus_properties[] = {
|
|||
DEFINE_PROP_UINT32("width", MacfbNubusState, macfb.width, 640),
|
||||
DEFINE_PROP_UINT32("height", MacfbNubusState, macfb.height, 480),
|
||||
DEFINE_PROP_UINT8("depth", MacfbNubusState, macfb.depth, 8),
|
||||
DEFINE_PROP_UINT8("display", MacfbNubusState, macfb.type,
|
||||
MACFB_DISPLAY_VGA),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue