diff options
author | Mark Cave-Ayland | 2021-10-08 00:12:49 +0200 |
---|---|---|
committer | Laurent Vivier | 2021-10-08 13:31:03 +0200 |
commit | df8abbbadf743bef6be5543b26f51231285b8923 (patch) | |
tree | 465d528aa19546cdbca56ebd877c83d58605b881 /hw/display/trace-events | |
parent | macfb: add qdev property to specify display type (diff) | |
download | qemu-df8abbbadf743bef6be5543b26f51231285b8923.tar.gz qemu-df8abbbadf743bef6be5543b26f51231285b8923.tar.xz qemu-df8abbbadf743bef6be5543b26f51231285b8923.zip |
macfb: add common monitor modes supported by the MacOS toolbox ROM
The monitor modes table is found by experimenting with the Monitors Control
Panel in MacOS and analysing the reads/writes. From this it can be found that
the mode is controlled by writes to the DAFB_MODE_CTRL1 and DAFB_MODE_CTRL2
registers.
Implement the first block of DAFB registers as a register array including the
existing sense register, the newly discovered control registers above, and also
the DAFB_MODE_VADDR1 and DAFB_MODE_VADDR2 registers which are used by NetBSD to
determine the current video mode.
These experiments also show that the offset of the start of video RAM and the
stride can change depending upon the monitor mode, so update macfb_draw_graphic()
and both the BI_MAC_VADDR and BI_MAC_VROW bootinfo for the q800 machine
accordingly.
Finally update macfb_common_realize() so that only the resolution and depth
supported by the display type can be specified on the command line, and add an
error hint showing the list of supported resolutions and depths if the user tries
to specify an invalid display mode.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211007221253.29024-10-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/display/trace-events')
-rw-r--r-- | hw/display/trace-events | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/display/trace-events b/hw/display/trace-events index 30cb460e4d..3a7a2c957f 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -173,3 +173,4 @@ macfb_ctrl_read(uint64_t addr, uint64_t value, unsigned int size) "addr 0x%"PRIx macfb_ctrl_write(uint64_t addr, uint64_t value, unsigned int size) "addr 0x%"PRIx64 " value 0x%"PRIx64 " size %u" macfb_sense_read(uint32_t value) "video sense: 0x%"PRIx32 macfb_sense_write(uint32_t value) "video sense: 0x%"PRIx32 +macfb_update_mode(uint32_t width, uint32_t height, uint8_t depth) "setting mode to width %"PRId32 " height %"PRId32 " size %d" |