* [PATCH] display: include dependencies explicitly
@ 2022-11-09 22:21 Michael S. Tsirkin
2022-11-09 22:27 ` Philippe Mathieu-Daudé
2022-11-09 23:11 ` Laurent Vivier
0 siblings, 2 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2022-11-09 22:21 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
acpi-vga-stub.c pulls in vga_int.h
However that currently pulls in ui/console.h which
breaks e.g. on systems without pixman.
It's better to remove ui/console.h from vga_int.h
and directly include it where it's used.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/display/vga_int.h | 1 -
include/qemu/typedefs.h | 2 ++
hw/display/ati_2d.c | 1 +
hw/display/cirrus_vga.c | 1 +
hw/display/cirrus_vga_isa.c | 1 +
hw/display/vga-isa.c | 1 +
hw/display/vga-mmio.c | 1 +
hw/display/vga-pci.c | 1 +
hw/display/vga.c | 1 +
hw/display/vmware_vga.c | 1 +
10 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
index 330406ad9c..7cf0d11201 100644
--- a/hw/display/vga_int.h
+++ b/hw/display/vga_int.h
@@ -27,7 +27,6 @@
#include "exec/ioport.h"
#include "exec/memory.h"
-#include "ui/console.h"
#include "hw/display/bochs-vbe.h"
#include "hw/acpi/acpi_aml_interface.h"
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 6d4e6d9708..688408e048 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -132,6 +132,8 @@ typedef struct Visitor Visitor;
typedef struct VMChangeStateEntry VMChangeStateEntry;
typedef struct VMStateDescription VMStateDescription;
typedef struct DumpState DumpState;
+typedef struct GraphicHwOps GraphicHwOps;
+typedef struct QEMUCursor QEMUCursor;
/*
* Pointer types
diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
index 692bec91de..7d786653e8 100644
--- a/hw/display/ati_2d.c
+++ b/hw/display/ati_2d.c
@@ -12,6 +12,7 @@
#include "ati_regs.h"
#include "qemu/log.h"
#include "ui/pixel_ops.h"
+#include "ui/console.h"
/*
* NOTE:
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 2577005d03..4cc3567c69 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -45,6 +45,7 @@
#include "ui/pixel_ops.h"
#include "cirrus_vga_internal.h"
#include "qom/object.h"
+#include "ui/console.h"
/*
* TODO:
diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c
index 96144bd690..84be51670e 100644
--- a/hw/display/cirrus_vga_isa.c
+++ b/hw/display/cirrus_vga_isa.c
@@ -31,6 +31,7 @@
#include "hw/isa/isa.h"
#include "cirrus_vga_internal.h"
#include "qom/object.h"
+#include "ui/console.h"
#define TYPE_ISA_CIRRUS_VGA "isa-cirrus-vga"
OBJECT_DECLARE_SIMPLE_TYPE(ISACirrusVGAState, ISA_CIRRUS_VGA)
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
index 46abbc5653..2a5437d803 100644
--- a/hw/display/vga-isa.c
+++ b/hw/display/vga-isa.c
@@ -32,6 +32,7 @@
#include "qemu/timer.h"
#include "hw/loader.h"
#include "hw/qdev-properties.h"
+#include "ui/console.h"
#include "qom/object.h"
#define TYPE_ISA_VGA "isa-vga"
diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c
index 75dfcedea5..cd2c46776d 100644
--- a/hw/display/vga-mmio.c
+++ b/hw/display/vga-mmio.c
@@ -27,6 +27,7 @@
#include "hw/sysbus.h"
#include "hw/display/vga.h"
#include "hw/qdev-properties.h"
+#include "ui/console.h"
#include "vga_int.h"
/*
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index 9a91de7ed1..df23dbf3a0 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -30,6 +30,7 @@
#include "migration/vmstate.h"
#include "vga_int.h"
#include "ui/pixel_ops.h"
+#include "ui/console.h"
#include "qemu/module.h"
#include "qemu/timer.h"
#include "hw/loader.h"
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 50ecb1ad02..0cb26a791b 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -31,6 +31,7 @@
#include "vga_int.h"
#include "vga_regs.h"
#include "ui/pixel_ops.h"
+#include "ui/console.h"
#include "qemu/timer.h"
#include "hw/xen/xen.h"
#include "migration/vmstate.h"
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index cedbbde522..53949d2539 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -33,6 +33,7 @@
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "qom/object.h"
+#include "ui/console.h"
#undef VERBOSE
#define HW_RECT_ACCEL
--
MST
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] display: include dependencies explicitly
2022-11-09 22:21 [PATCH] display: include dependencies explicitly Michael S. Tsirkin
@ 2022-11-09 22:27 ` Philippe Mathieu-Daudé
2022-11-09 23:11 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-11-09 22:27 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel
Cc: Gerd Hoffmann, Miroslav Rezanina, Frederic Bezies, Laurent Vivier
On 9/11/22 23:21, Michael S. Tsirkin wrote:
> acpi-vga-stub.c pulls in vga_int.h
> However that currently pulls in ui/console.h which
> breaks e.g. on systems without pixman.
> It's better to remove ui/console.h from vga_int.h
> and directly include it where it's used.
>
Reported-by: Miroslav Rezanina <mrezanin@redhat.com>
Reported-by: Frederic Bezies <fredbezies@gmail.com>
Reported-by: Laurent Vivier <lvivier@redhat.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1308
Fixes: cfead31326 ("AcpiDevAmlIf interface to build VGA device descs")
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/display/vga_int.h | 1 -
> include/qemu/typedefs.h | 2 ++
> hw/display/ati_2d.c | 1 +
> hw/display/cirrus_vga.c | 1 +
> hw/display/cirrus_vga_isa.c | 1 +
> hw/display/vga-isa.c | 1 +
> hw/display/vga-mmio.c | 1 +
> hw/display/vga-pci.c | 1 +
> hw/display/vga.c | 1 +
> hw/display/vmware_vga.c | 1 +
> 10 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
> index 330406ad9c..7cf0d11201 100644
> --- a/hw/display/vga_int.h
> +++ b/hw/display/vga_int.h
> @@ -27,7 +27,6 @@
>
> #include "exec/ioport.h"
> #include "exec/memory.h"
> -#include "ui/console.h"
>
> #include "hw/display/bochs-vbe.h"
> #include "hw/acpi/acpi_aml_interface.h"
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index 6d4e6d9708..688408e048 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -132,6 +132,8 @@ typedef struct Visitor Visitor;
> typedef struct VMChangeStateEntry VMChangeStateEntry;
> typedef struct VMStateDescription VMStateDescription;
> typedef struct DumpState DumpState;
> +typedef struct GraphicHwOps GraphicHwOps;
> +typedef struct QEMUCursor QEMUCursor;
Besides the "Please keep this list in case-insensitive alphabetical
order." in this file header,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> /*
> * Pointer types
> diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
> index 692bec91de..7d786653e8 100644
> --- a/hw/display/ati_2d.c
> +++ b/hw/display/ati_2d.c
> @@ -12,6 +12,7 @@
> #include "ati_regs.h"
> #include "qemu/log.h"
> #include "ui/pixel_ops.h"
> +#include "ui/console.h"
>
> /*
> * NOTE:
> diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
> index 2577005d03..4cc3567c69 100644
> --- a/hw/display/cirrus_vga.c
> +++ b/hw/display/cirrus_vga.c
> @@ -45,6 +45,7 @@
> #include "ui/pixel_ops.h"
> #include "cirrus_vga_internal.h"
> #include "qom/object.h"
> +#include "ui/console.h"
>
> /*
> * TODO:
> diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c
> index 96144bd690..84be51670e 100644
> --- a/hw/display/cirrus_vga_isa.c
> +++ b/hw/display/cirrus_vga_isa.c
> @@ -31,6 +31,7 @@
> #include "hw/isa/isa.h"
> #include "cirrus_vga_internal.h"
> #include "qom/object.h"
> +#include "ui/console.h"
>
> #define TYPE_ISA_CIRRUS_VGA "isa-cirrus-vga"
> OBJECT_DECLARE_SIMPLE_TYPE(ISACirrusVGAState, ISA_CIRRUS_VGA)
> diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
> index 46abbc5653..2a5437d803 100644
> --- a/hw/display/vga-isa.c
> +++ b/hw/display/vga-isa.c
> @@ -32,6 +32,7 @@
> #include "qemu/timer.h"
> #include "hw/loader.h"
> #include "hw/qdev-properties.h"
> +#include "ui/console.h"
> #include "qom/object.h"
>
> #define TYPE_ISA_VGA "isa-vga"
> diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c
> index 75dfcedea5..cd2c46776d 100644
> --- a/hw/display/vga-mmio.c
> +++ b/hw/display/vga-mmio.c
> @@ -27,6 +27,7 @@
> #include "hw/sysbus.h"
> #include "hw/display/vga.h"
> #include "hw/qdev-properties.h"
> +#include "ui/console.h"
> #include "vga_int.h"
>
> /*
> diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
> index 9a91de7ed1..df23dbf3a0 100644
> --- a/hw/display/vga-pci.c
> +++ b/hw/display/vga-pci.c
> @@ -30,6 +30,7 @@
> #include "migration/vmstate.h"
> #include "vga_int.h"
> #include "ui/pixel_ops.h"
> +#include "ui/console.h"
> #include "qemu/module.h"
> #include "qemu/timer.h"
> #include "hw/loader.h"
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 50ecb1ad02..0cb26a791b 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -31,6 +31,7 @@
> #include "vga_int.h"
> #include "vga_regs.h"
> #include "ui/pixel_ops.h"
> +#include "ui/console.h"
> #include "qemu/timer.h"
> #include "hw/xen/xen.h"
> #include "migration/vmstate.h"
> diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
> index cedbbde522..53949d2539 100644
> --- a/hw/display/vmware_vga.c
> +++ b/hw/display/vmware_vga.c
> @@ -33,6 +33,7 @@
> #include "hw/qdev-properties.h"
> #include "migration/vmstate.h"
> #include "qom/object.h"
> +#include "ui/console.h"
>
> #undef VERBOSE
> #define HW_RECT_ACCEL
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] display: include dependencies explicitly
2022-11-09 22:21 [PATCH] display: include dependencies explicitly Michael S. Tsirkin
2022-11-09 22:27 ` Philippe Mathieu-Daudé
@ 2022-11-09 23:11 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2022-11-09 23:11 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel; +Cc: Gerd Hoffmann
On 11/9/22 23:21, Michael S. Tsirkin wrote:
> acpi-vga-stub.c pulls in vga_int.h
> However that currently pulls in ui/console.h which
> breaks e.g. on systems without pixman.
> It's better to remove ui/console.h from vga_int.h
> and directly include it where it's used.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
> ---
> hw/display/vga_int.h | 1 -
> include/qemu/typedefs.h | 2 ++
> hw/display/ati_2d.c | 1 +
> hw/display/cirrus_vga.c | 1 +
> hw/display/cirrus_vga_isa.c | 1 +
> hw/display/vga-isa.c | 1 +
> hw/display/vga-mmio.c | 1 +
> hw/display/vga-pci.c | 1 +
> hw/display/vga.c | 1 +
> hw/display/vmware_vga.c | 1 +
> 10 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
> index 330406ad9c..7cf0d11201 100644
> --- a/hw/display/vga_int.h
> +++ b/hw/display/vga_int.h
> @@ -27,7 +27,6 @@
>
> #include "exec/ioport.h"
> #include "exec/memory.h"
> -#include "ui/console.h"
>
> #include "hw/display/bochs-vbe.h"
> #include "hw/acpi/acpi_aml_interface.h"
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index 6d4e6d9708..688408e048 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -132,6 +132,8 @@ typedef struct Visitor Visitor;
> typedef struct VMChangeStateEntry VMChangeStateEntry;
> typedef struct VMStateDescription VMStateDescription;
> typedef struct DumpState DumpState;
> +typedef struct GraphicHwOps GraphicHwOps;
> +typedef struct QEMUCursor QEMUCursor;
>
> /*
> * Pointer types
> diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
> index 692bec91de..7d786653e8 100644
> --- a/hw/display/ati_2d.c
> +++ b/hw/display/ati_2d.c
> @@ -12,6 +12,7 @@
> #include "ati_regs.h"
> #include "qemu/log.h"
> #include "ui/pixel_ops.h"
> +#include "ui/console.h"
>
> /*
> * NOTE:
> diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
> index 2577005d03..4cc3567c69 100644
> --- a/hw/display/cirrus_vga.c
> +++ b/hw/display/cirrus_vga.c
> @@ -45,6 +45,7 @@
> #include "ui/pixel_ops.h"
> #include "cirrus_vga_internal.h"
> #include "qom/object.h"
> +#include "ui/console.h"
>
> /*
> * TODO:
> diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c
> index 96144bd690..84be51670e 100644
> --- a/hw/display/cirrus_vga_isa.c
> +++ b/hw/display/cirrus_vga_isa.c
> @@ -31,6 +31,7 @@
> #include "hw/isa/isa.h"
> #include "cirrus_vga_internal.h"
> #include "qom/object.h"
> +#include "ui/console.h"
>
> #define TYPE_ISA_CIRRUS_VGA "isa-cirrus-vga"
> OBJECT_DECLARE_SIMPLE_TYPE(ISACirrusVGAState, ISA_CIRRUS_VGA)
> diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
> index 46abbc5653..2a5437d803 100644
> --- a/hw/display/vga-isa.c
> +++ b/hw/display/vga-isa.c
> @@ -32,6 +32,7 @@
> #include "qemu/timer.h"
> #include "hw/loader.h"
> #include "hw/qdev-properties.h"
> +#include "ui/console.h"
> #include "qom/object.h"
>
> #define TYPE_ISA_VGA "isa-vga"
> diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c
> index 75dfcedea5..cd2c46776d 100644
> --- a/hw/display/vga-mmio.c
> +++ b/hw/display/vga-mmio.c
> @@ -27,6 +27,7 @@
> #include "hw/sysbus.h"
> #include "hw/display/vga.h"
> #include "hw/qdev-properties.h"
> +#include "ui/console.h"
> #include "vga_int.h"
>
> /*
> diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
> index 9a91de7ed1..df23dbf3a0 100644
> --- a/hw/display/vga-pci.c
> +++ b/hw/display/vga-pci.c
> @@ -30,6 +30,7 @@
> #include "migration/vmstate.h"
> #include "vga_int.h"
> #include "ui/pixel_ops.h"
> +#include "ui/console.h"
> #include "qemu/module.h"
> #include "qemu/timer.h"
> #include "hw/loader.h"
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 50ecb1ad02..0cb26a791b 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -31,6 +31,7 @@
> #include "vga_int.h"
> #include "vga_regs.h"
> #include "ui/pixel_ops.h"
> +#include "ui/console.h"
> #include "qemu/timer.h"
> #include "hw/xen/xen.h"
> #include "migration/vmstate.h"
> diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
> index cedbbde522..53949d2539 100644
> --- a/hw/display/vmware_vga.c
> +++ b/hw/display/vmware_vga.c
> @@ -33,6 +33,7 @@
> #include "hw/qdev-properties.h"
> #include "migration/vmstate.h"
> #include "qom/object.h"
> +#include "ui/console.h"
>
> #undef VERBOSE
> #define HW_RECT_ACCEL
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-09 23:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-09 22:21 [PATCH] display: include dependencies explicitly Michael S. Tsirkin
2022-11-09 22:27 ` Philippe Mathieu-Daudé
2022-11-09 23:11 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).