aboutsummaryrefslogtreecommitdiff
path: root/hw/display/ati.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-09-05 16:51:53 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-07 14:04:25 +0400
commit699f15fd0c062c5f337584c585223bf7c3a9cd8e (patch)
tree8d9a4c370d42532f61142a5ab144fc3b5323ae33 /hw/display/ati.c
parent376a0531d4f5ebe3e895986e0b2e1c15a9e4721c (diff)
hw/display/ati: allow compiling without PIXMAN
Change the "x-pixman" property default value and use the fallback path when PIXMAN support is disabled. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: BALATON Zoltan <balaton@eik.bme.hu>
Diffstat (limited to 'hw/display/ati.c')
-rw-r--r--hw/display/ati.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/display/ati.c b/hw/display/ati.c
index 9a87a5504a..569b8f6165 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -32,6 +32,12 @@
#define ATI_DEBUG_HW_CURSOR 0
+#ifdef CONFIG_PIXMAN
+#define DEFAULT_X_PIXMAN 3
+#else
+#define DEFAULT_X_PIXMAN 0
+#endif
+
static const struct {
const char *name;
uint16_t dev_id;
@@ -946,6 +952,12 @@ static void ati_vga_realize(PCIDevice *dev, Error **errp)
ATIVGAState *s = ATI_VGA(dev);
VGACommonState *vga = &s->vga;
+#ifndef CONFIG_PIXMAN
+ if (s->use_pixman != 0) {
+ warn_report("x-pixman != 0, not effective without PIXMAN");
+ }
+#endif
+
if (s->model) {
int i;
for (i = 0; i < ARRAY_SIZE(ati_model_aliases); i++) {
@@ -1033,7 +1045,8 @@ static Property ati_vga_properties[] = {
DEFINE_PROP_UINT16("x-device-id", ATIVGAState, dev_id,
PCI_DEVICE_ID_ATI_RAGE128_PF),
DEFINE_PROP_BOOL("guest_hwcursor", ATIVGAState, cursor_guest_mode, false),
- DEFINE_PROP_UINT8("x-pixman", ATIVGAState, use_pixman, 3),
+ /* this is a debug option, prefer PROP_UINT over PROP_BIT for simplicity */
+ DEFINE_PROP_UINT8("x-pixman", ATIVGAState, use_pixman, DEFAULT_X_PIXMAN),
DEFINE_PROP_END_OF_LIST()
};