All of lore.kernel.org
 help / color / mirror / Atom feed
From: deller@kernel.org
To: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Helge Deller <deller@gmx.de>
Subject: [PULL 3/6] artist: Allow disabling artist on command line
Date: Fri,  7 Feb 2025 22:05:37 +0100	[thread overview]
Message-ID: <20250207210540.24594-4-deller@kernel.org> (raw)
In-Reply-To: <20250207210540.24594-1-deller@kernel.org>

From: Helge Deller <deller@gmx.de>

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>
---
 hw/display/artist.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/display/artist.c b/hw/display/artist.c
index 8b719b11ed..f24c1d83dd 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)
-- 
2.47.0



  parent reply	other threads:[~2025-02-07 21:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 21:05 [PULL 0/6] Hppa system for v10 diva artist patches deller
2025-02-07 21:05 ` [PULL 1/6] hw/char: Add emulation of Diva GSP PCI management boards deller
2025-02-07 21:05 ` [PULL 2/6] hw/hppa: Wire up Diva GSP card deller
2026-03-06 17:22   ` Peter Maydell
2026-03-06 18:12     ` Helge Deller
2026-03-06 18:19       ` Peter Maydell
2026-03-06 18:33         ` Helge Deller
2026-03-06 18:56           ` Peter Maydell
2026-03-06 20:40             ` Helge Deller
2026-03-06 21:15               ` BALATON Zoltan
2026-03-06 21:17                 ` Helge Deller
2026-03-07 10:46               ` Peter Maydell
2026-03-07 11:41                 ` Helge Deller
2026-03-07 11:57                   ` Peter Maydell
2025-02-07 21:05 ` deller [this message]
2025-02-07 21:05 ` [PULL 4/6] hw/hppa: Avoid creation of artist if disabled on command line deller
2025-02-07 21:05 ` [PULL 5/6] hw/pci-host/astro: Add LMMIO range support deller
2025-02-07 21:05 ` [PULL 6/6] target/hppa: Update SeaBIOS-hppa deller
2025-02-08 16:08 ` [PULL 0/6] Hppa system for v10 diva artist patches Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250207210540.24594-4-deller@kernel.org \
    --to=deller@kernel.org \
    --cc=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.