Message ID | 20221109222312.29347-1-philmd@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PATCH-for-7.2] hw/display: Declare build_vga_aml() out of "vga_int.h" | expand |
On 9/11/22 23:23, Philippe Mathieu-Daudé wrote: > Commit cfead31326 declared build_vga_aml() in "vga_int.h". > This header happens to include various other things, such > (indirectly) pixman headers. > > The freshly introduced acpi-vga.c includes "vga_int.h" to > get build_vga_aml() declaration, but ends including the > 'various other things' triggering this build failure (QEMU > configured as '--enable-modules --disable-spice'): > > In file included from /home/fred/qemu-git/src/qemu/include/ui/console.h:4, > from ../hw/display/vga_int.h:30, > from ../hw/display/acpi-vga.c:4: > include/ui/qemu-pixman.h:12:10: fatal error: pixman.h: No such file or directory > 12 | #include <pixman.h> > | ^~~~~~~~~~ > > Resolve by declaring build_vga_aml() in a ACPI/VGA specific > header named "acpi-vga.h". Adjust MAINTAINERS to avoid > checkpatch warnings. > > 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: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > MAINTAINERS | 1 + > hw/display/acpi-vga-stub.c | 2 +- > hw/display/acpi-vga.c | 2 +- > hw/display/acpi-vga.h | 10 ++++++++++ > hw/display/vga-pci.c | 1 + > hw/display/vga_int.h | 2 -- > 6 files changed, 14 insertions(+), 4 deletions(-) > create mode 100644 hw/display/acpi-vga.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index caba73ec41..af4d3bd8fd 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1844,6 +1844,7 @@ S: Supported > F: include/hw/acpi/* > F: include/hw/firmware/smbios.h > F: hw/acpi/* > +F: hw/display/acpi* > F: hw/smbios/* > F: hw/i386/acpi-build.[hc] > F: hw/arm/virt-acpi-build.c Please discard in favor of https://lore.kernel.org/qemu-devel/20221109222112.74519-1-mst@redhat.com/ Note, the MAINTAINERS part is worth salvaging.
diff --git a/MAINTAINERS b/MAINTAINERS index caba73ec41..af4d3bd8fd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1844,6 +1844,7 @@ S: Supported F: include/hw/acpi/* F: include/hw/firmware/smbios.h F: hw/acpi/* +F: hw/display/acpi* F: hw/smbios/* F: hw/i386/acpi-build.[hc] F: hw/arm/virt-acpi-build.c diff --git a/hw/display/acpi-vga-stub.c b/hw/display/acpi-vga-stub.c index a9b0ecf76d..b0f8df0710 100644 --- a/hw/display/acpi-vga-stub.c +++ b/hw/display/acpi-vga-stub.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "hw/acpi/acpi_aml_interface.h" -#include "vga_int.h" +#include "acpi-vga.h" void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope) { diff --git a/hw/display/acpi-vga.c b/hw/display/acpi-vga.c index f0e9ef1fcf..19372c6e1c 100644 --- a/hw/display/acpi-vga.c +++ b/hw/display/acpi-vga.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include "hw/acpi/acpi_aml_interface.h" #include "hw/pci/pci.h" -#include "vga_int.h" +#include "acpi-vga.h" void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope) { diff --git a/hw/display/acpi-vga.h b/hw/display/acpi-vga.h new file mode 100644 index 0000000000..966d0c49d5 --- /dev/null +++ b/hw/display/acpi-vga.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef HW_DISPLAY_VGA_ACPI +#define HW_DISPLAY_VGA_ACPI + +#include "hw/acpi/acpi_aml_interface.h" + +void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope); + +#endif diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 9a91de7ed1..d6f52d2e67 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -36,6 +36,7 @@ #include "hw/display/edid.h" #include "qom/object.h" #include "hw/acpi/acpi_aml_interface.h" +#include "acpi-vga.h" enum vga_pci_flags { PCI_VGA_FLAG_ENABLE_MMIO = 1, diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 330406ad9c..305e700014 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -30,7 +30,6 @@ #include "ui/console.h" #include "hw/display/bochs-vbe.h" -#include "hw/acpi/acpi_aml_interface.h" #define ST01_V_RETRACE 0x08 #define ST01_DISP_ENABLE 0x01 @@ -196,5 +195,4 @@ void pci_std_vga_mmio_region_init(VGACommonState *s, MemoryRegion *subs, bool qext, bool edid); -void build_vga_aml(AcpiDevAmlIf *adev, Aml *scope); #endif
Commit cfead31326 declared build_vga_aml() in "vga_int.h". This header happens to include various other things, such (indirectly) pixman headers. The freshly introduced acpi-vga.c includes "vga_int.h" to get build_vga_aml() declaration, but ends including the 'various other things' triggering this build failure (QEMU configured as '--enable-modules --disable-spice'): In file included from /home/fred/qemu-git/src/qemu/include/ui/console.h:4, from ../hw/display/vga_int.h:30, from ../hw/display/acpi-vga.c:4: include/ui/qemu-pixman.h:12:10: fatal error: pixman.h: No such file or directory 12 | #include <pixman.h> | ^~~~~~~~~~ Resolve by declaring build_vga_aml() in a ACPI/VGA specific header named "acpi-vga.h". Adjust MAINTAINERS to avoid checkpatch warnings. 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: Philippe Mathieu-Daudé <philmd@linaro.org> --- MAINTAINERS | 1 + hw/display/acpi-vga-stub.c | 2 +- hw/display/acpi-vga.c | 2 +- hw/display/acpi-vga.h | 10 ++++++++++ hw/display/vga-pci.c | 1 + hw/display/vga_int.h | 2 -- 6 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 hw/display/acpi-vga.h