xref: /openbmc/qemu/hw/display/meson.build (revision d399fddc)
1hw_display_modules = {}
2
3system_ss.add(when: 'CONFIG_DDC', if_true: files('i2c-ddc.c'))
4system_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-region.c'))
5
6system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'), if_false: files('ramfb-stubs.c'))
7system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
8
9system_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
10system_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c'))
11system_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c'))
12system_ss.add(when: 'CONFIG_JAZZ_LED', if_true: files('jazz_led.c'))
13system_ss.add(when: 'CONFIG_PL110', if_true: files('pl110.c'))
14system_ss.add(when: 'CONFIG_SII9022', if_true: files('sii9022.c'))
15system_ss.add(when: 'CONFIG_SSD0303', if_true: files('ssd0303.c'))
16system_ss.add(when: 'CONFIG_SSD0323', if_true: files('ssd0323.c'))
17system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xenfb.c'))
18
19system_ss.add(when: 'CONFIG_VGA_PCI', if_true: files('vga-pci.c'))
20system_ss.add(when: 'CONFIG_VGA_ISA', if_true: files('vga-isa.c'))
21system_ss.add(when: 'CONFIG_VGA_MMIO', if_true: files('vga-mmio.c'))
22system_ss.add(when: 'CONFIG_VMWARE_VGA', if_true: files('vmware_vga.c'))
23system_ss.add(when: 'CONFIG_BOCHS_DISPLAY', if_true: files('bochs-display.c'))
24
25system_ss.add(when: 'CONFIG_BLIZZARD', if_true: files('blizzard.c'))
26system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_fimd.c'))
27system_ss.add(when: 'CONFIG_FRAMEBUFFER', if_true: files('framebuffer.c'))
28system_ss.add(when: 'CONFIG_ZAURUS', if_true: files('tc6393xb.c'))
29
30system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dss.c'))
31system_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_lcd.c'))
32system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_fb.c'))
33system_ss.add(when: 'CONFIG_SM501', if_true: files('sm501.c'))
34system_ss.add(when: 'CONFIG_TCX', if_true: files('tcx.c'))
35system_ss.add(when: 'CONFIG_CG3', if_true: files('cg3.c'))
36system_ss.add(when: 'CONFIG_MACFB', if_true: files('macfb.c'))
37system_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-fb.c'))
38
39system_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
40system_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-dmabuf.c'))
41system_ss.add(when: 'CONFIG_DM163', if_true: files('dm163.c'))
42
43if (config_all_devices.has_key('CONFIG_VGA_CIRRUS') or
44    config_all_devices.has_key('CONFIG_VGA_PCI') or
45    config_all_devices.has_key('CONFIG_VMWARE_VGA') or
46    config_all_devices.has_key('CONFIG_ATI_VGA')
47   )
48  system_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
49                                      if_false: files('acpi-vga-stub.c'))
50endif
51
52if config_all_devices.has_key('CONFIG_QXL')
53  qxl_ss = ss.source_set()
54  qxl_ss.add(when: 'CONFIG_QXL', if_true: [files('qxl.c', 'qxl-logger.c', 'qxl-render.c'),
55                                           pixman, spice])
56  qxl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
57                                  if_false: files('acpi-vga-stub.c'))
58  hw_display_modules += {'qxl': qxl_ss}
59endif
60
61system_ss.add(when: 'CONFIG_DPCD', if_true: files('dpcd.c'))
62system_ss.add(when: 'CONFIG_XLNX_DISPLAYPORT', if_true: files('xlnx_dp.c'))
63
64system_ss.add(when: 'CONFIG_ARTIST', if_true: files('artist.c'))
65
66system_ss.add(when: 'CONFIG_ATI_VGA', if_true: [files('ati.c', 'ati_2d.c', 'ati_dbg.c'), pixman])
67
68
69if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
70  virtio_gpu_ss = ss.source_set()
71  virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
72                    if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), pixman])
73  if host_os == 'linux'
74    virtio_gpu_ss.add(files('virtio-gpu-udmabuf.c'))
75  else
76    virtio_gpu_ss.add(files('virtio-gpu-udmabuf-stubs.c'))
77  endif
78  virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
79  hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
80
81  if virgl.found() and opengl.found()
82    virtio_gpu_gl_ss = ss.source_set()
83    virtio_gpu_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', virgl, opengl],
84                         if_true: [files('virtio-gpu-gl.c', 'virtio-gpu-virgl.c'), pixman, virgl])
85    hw_display_modules += {'virtio-gpu-gl': virtio_gpu_gl_ss}
86  endif
87
88  if rutabaga.found()
89    virtio_gpu_rutabaga_ss = ss.source_set()
90    virtio_gpu_rutabaga_ss.add(when: ['CONFIG_VIRTIO_GPU', rutabaga],
91                               if_true: [files('virtio-gpu-rutabaga.c'), pixman])
92    hw_display_modules += {'virtio-gpu-rutabaga': virtio_gpu_rutabaga_ss}
93  endif
94endif
95
96if config_all_devices.has_key('CONFIG_VIRTIO_PCI')
97  virtio_gpu_pci_ss = ss.source_set()
98  virtio_gpu_pci_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'],
99                        if_true: [files('virtio-gpu-pci.c'), pixman])
100  virtio_gpu_pci_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'],
101                        if_true: files('vhost-user-gpu-pci.c'))
102  hw_display_modules += {'virtio-gpu-pci': virtio_gpu_pci_ss}
103
104  if virgl.found() and opengl.found()
105    virtio_gpu_pci_gl_ss = ss.source_set()
106    virtio_gpu_pci_gl_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI', virgl, opengl],
107                             if_true: [files('virtio-gpu-pci-gl.c'), pixman])
108    hw_display_modules += {'virtio-gpu-pci-gl': virtio_gpu_pci_gl_ss}
109  endif
110  if rutabaga.found()
111    virtio_gpu_pci_rutabaga_ss = ss.source_set()
112    virtio_gpu_pci_rutabaga_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI', rutabaga],
113                                   if_true: [files('virtio-gpu-pci-rutabaga.c'), pixman])
114    hw_display_modules += {'virtio-gpu-pci-rutabaga': virtio_gpu_pci_rutabaga_ss}
115  endif
116endif
117
118if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
119  virtio_vga_ss = ss.source_set()
120  virtio_vga_ss.add(when: 'CONFIG_VIRTIO_VGA',
121                    if_true: [files('virtio-vga.c'), pixman])
122  virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA',
123                    if_true: files('vhost-user-vga.c'))
124  virtio_vga_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
125                                         if_false: files('acpi-vga-stub.c'))
126  hw_display_modules += {'virtio-vga': virtio_vga_ss}
127
128  virtio_vga_gl_ss = ss.source_set()
129  virtio_vga_gl_ss.add(when: ['CONFIG_VIRTIO_VGA', virgl, opengl],
130                       if_true: [files('virtio-vga-gl.c'), pixman])
131  virtio_vga_gl_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
132                                            if_false: files('acpi-vga-stub.c'))
133  hw_display_modules += {'virtio-vga-gl': virtio_vga_gl_ss}
134
135  if rutabaga.found()
136    virtio_vga_rutabaga_ss = ss.source_set()
137    virtio_vga_rutabaga_ss.add(when: ['CONFIG_VIRTIO_VGA', rutabaga],
138                               if_true: [files('virtio-vga-rutabaga.c'), pixman])
139    virtio_vga_rutabaga_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
140                                                    if_false: files('acpi-vga-stub.c'))
141    hw_display_modules += {'virtio-vga-rutabaga': virtio_vga_rutabaga_ss}
142  endif
143endif
144
145system_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
146
147modules += { 'hw-display': hw_display_modules }
148