aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2025-02-04 20:55:18 +0100
committerHelge Deller <deller@gmx.de>2025-02-04 22:57:34 +0100
commitd4b3c927909c9e3cb687d2d4b0d7f26b63d1f7e9 (patch)
tree57d2dea936869631ea9c3c36ace57dca76c04bc1
parentc061efca0b6ea6d11a1d29a8d48835146fec10f7 (diff)
downloadqemu-d4b3c927909c9e3cb687d2d4b0d7f26b63d1f7e9.zip
qemu-d4b3c927909c9e3cb687d2d4b0d7f26b63d1f7e9.tar.gz
qemu-d4b3c927909c9e3cb687d2d4b0d7f26b63d1f7e9.tar.bz2
artist: Allow disabling artist on command line
Allow users to disable the artist graphic card on the command line with the option "-global artist.disable=true". This change allows to use other graphic cards when using Linux, e.g. by adding "-device ati-vga". Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--hw/display/artist.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 8b719b1..f24c1d8 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -48,6 +48,7 @@ struct ARTISTState {
struct vram_buffer vram_buffer[16];
+ bool disable;
uint16_t width;
uint16_t height;
uint16_t depth;
@@ -1211,8 +1212,8 @@ static uint64_t artist_reg_read(void *opaque, hwaddr addr, unsigned size)
break;
case 0x380004:
- /* 0x02000000 Buserror */
- val = 0x6dc20006;
+ /* magic number detected by SeaBIOS-hppa */
+ val = s->disable ? 0 : 0x6dc20006;
break;
default:
@@ -1432,7 +1433,7 @@ static int vmstate_artist_post_load(void *opaque, int version_id)
static const VMStateDescription vmstate_artist = {
.name = "artist",
- .version_id = 2,
+ .version_id = 3,
.minimum_version_id = 2,
.post_load = vmstate_artist_post_load,
.fields = (const VMStateField[]) {
@@ -1470,6 +1471,7 @@ static const VMStateDescription vmstate_artist = {
VMSTATE_UINT32(font_write1, ARTISTState),
VMSTATE_UINT32(font_write2, ARTISTState),
VMSTATE_UINT32(font_write_pos_y, ARTISTState),
+ VMSTATE_BOOL(disable, ARTISTState),
VMSTATE_END_OF_LIST()
}
};
@@ -1478,6 +1480,7 @@ static const Property artist_properties[] = {
DEFINE_PROP_UINT16("width", ARTISTState, width, 1280),
DEFINE_PROP_UINT16("height", ARTISTState, height, 1024),
DEFINE_PROP_UINT16("depth", ARTISTState, depth, 8),
+ DEFINE_PROP_BOOL("disable", ARTISTState, disable, false),
};
static void artist_reset(DeviceState *qdev)