xref: /openbmc/qemu/hw/display/meson.build (revision c5a61e5a)
1hw_display_modules = {}
2
3softmmu_ss.add(when: 'CONFIG_DDC', if_true: files('i2c-ddc.c'))
4softmmu_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-region.c'))
5
6softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
7softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
8
9softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
10softmmu_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
11softmmu_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c'))
12softmmu_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c'))
13softmmu_ss.add(when: 'CONFIG_JAZZ_LED', if_true: files('jazz_led.c'))
14softmmu_ss.add(when: 'CONFIG_PL110', if_true: files('pl110.c'))
15softmmu_ss.add(when: 'CONFIG_SII9022', if_true: files('sii9022.c'))
16softmmu_ss.add(when: 'CONFIG_SSD0303', if_true: files('ssd0303.c'))
17softmmu_ss.add(when: 'CONFIG_SSD0323', if_true: files('ssd0323.c'))
18softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xenfb.c'))
19
20softmmu_ss.add(when: 'CONFIG_VGA_PCI', if_true: files('vga-pci.c'))
21softmmu_ss.add(when: 'CONFIG_VGA_ISA', if_true: files('vga-isa.c'))
22softmmu_ss.add(when: 'CONFIG_VGA_ISA_MM', if_true: files('vga-isa-mm.c'))
23softmmu_ss.add(when: 'CONFIG_VMWARE_VGA', if_true: files('vmware_vga.c'))
24softmmu_ss.add(when: 'CONFIG_BOCHS_DISPLAY', if_true: files('bochs-display.c'))
25
26softmmu_ss.add(when: 'CONFIG_BLIZZARD', if_true: files('blizzard.c'))
27softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_fimd.c'))
28softmmu_ss.add(when: 'CONFIG_FRAMEBUFFER', if_true: files('framebuffer.c'))
29softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('tc6393xb.c'))
30
31softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dss.c'))
32softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_lcd.c'))
33softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_fb.c'))
34softmmu_ss.add(when: 'CONFIG_SM501', if_true: files('sm501.c'))
35softmmu_ss.add(when: 'CONFIG_TCX', if_true: files('tcx.c'))
36softmmu_ss.add(when: 'CONFIG_CG3', if_true: files('cg3.c'))
37softmmu_ss.add(when: 'CONFIG_MACFB', if_true: files('macfb.c'))
38softmmu_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-fb.c'))
39
40specific_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
41
42if config_all_devices.has_key('CONFIG_QXL')
43  qxl_ss = ss.source_set()
44  qxl_ss.add(when: 'CONFIG_QXL', if_true: files('qxl.c', 'qxl-logger.c', 'qxl-render.c'))
45  hw_display_modules += {'qxl': qxl_ss}
46endif
47
48softmmu_ss.add(when: 'CONFIG_QXL', if_true: files('qxl.c', 'qxl-logger.c', 'qxl-render.c'))
49
50softmmu_ss.add(when: 'CONFIG_DPCD', if_true: files('dpcd.c'))
51softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dp.c'))
52
53softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-vgafb.c'))
54softmmu_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c'))
55
56softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d.c', 'ati_dbg.c'))
57
58if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
59  virtio_gpu_ss = ss.source_set()
60  virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
61                    if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), pixman, virgl])
62  virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
63  virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-gpu-pci.c'))
64  virtio_gpu_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-gpu-pci.c'))
65  virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c'))
66  virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c'))
67
68  # FIXME: this was attempted in the Makefile build system; it was then reverted
69  # as it would try to load all devices when the module is loaded, even if
70  # config_devices for this target only has some of them.  Since virtio-gpu-pci
71  # and virtio-vga both instantiate a virtio-gpu-device, fixing it probably does
72  # not even require a dependency system, just splitting the module in three
73  # for CONFIG_VIRTIO_GPU/CONFIG_VHOST_USER_GPU, CONFIG_VIRTIO_PCI and
74  # CONFIG_VIRTIO_VGA/CONFIG_VHOST_USER_VGA.
75  # Sourcesets are a dime a dozen, so keep it and just disable module builds.
76
77  #hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
78  softmmu_ss.add_all(virtio_gpu_ss)
79endif
80
81specific_ss.add(when: [x11, opengl, 'CONFIG_MILKYMIST_TMU2'], if_true: files('milkymist-tmu2.c'))
82specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
83
84modules += { 'hw-display': hw_display_modules }
85