xref: /openbmc/linux/drivers/gpu/drm/i915/Makefile (revision b830f94f)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the drm device driver.  This driver provides support for the
4# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
5
6# Add a set of useful warning flags and enable -Werror for CI to prevent
7# trivial mistakes from creeping in. We have to do this piecemeal as we reject
8# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we
9# need to filter out dubious warnings.  Still it is our interest
10# to keep running locally with W=1 C=1 until we are completely clean.
11#
12# Note the danger in using -Wall -Wextra is that when CI updates gcc we
13# will most likely get a sudden build breakage... Hopefully we will fix
14# new warnings before CI updates!
15subdir-ccflags-y := -Wall -Wextra
16subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
17subdir-ccflags-y += $(call cc-disable-warning, type-limits)
18subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
19subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
20subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
21# clang warnings
22subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
23subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
24subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
25subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
26subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
27
28# Fine grained warnings disable
29CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
30CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
31
32subdir-ccflags-y += \
33	$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
34
35# Extra header tests
36include $(src)/Makefile.header-test
37
38subdir-ccflags-y += -I$(src)
39
40# Please keep these build lists sorted!
41
42# core driver code
43i915-y += i915_drv.o \
44	  i915_irq.o \
45	  i915_params.o \
46	  i915_pci.o \
47	  i915_scatterlist.o \
48	  i915_suspend.o \
49	  i915_sysfs.o \
50	  intel_csr.o \
51	  intel_device_info.o \
52	  intel_pm.o \
53	  intel_runtime_pm.o \
54	  intel_sideband.o \
55	  intel_uncore.o \
56	  intel_wakeref.o
57
58# core library code
59i915-y += \
60	i915_memcpy.o \
61	i915_mm.o \
62	i915_sw_fence.o \
63	i915_syncmap.o \
64	i915_user_extensions.o
65
66i915-$(CONFIG_COMPAT)   += i915_ioc32.o
67i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o display/intel_pipe_crc.o
68i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
69
70# "Graphics Technology" (aka we talk to the gpu)
71obj-y += gt/
72gt-y += \
73	gt/intel_breadcrumbs.o \
74	gt/intel_context.o \
75	gt/intel_engine_cs.o \
76	gt/intel_engine_pm.o \
77	gt/intel_gt_pm.o \
78	gt/intel_hangcheck.o \
79	gt/intel_lrc.o \
80	gt/intel_reset.o \
81	gt/intel_ringbuffer.o \
82	gt/intel_mocs.o \
83	gt/intel_sseu.o \
84	gt/intel_workarounds.o
85gt-$(CONFIG_DRM_I915_SELFTEST) += \
86	gt/mock_engine.o
87i915-y += $(gt-y)
88
89# GEM (Graphics Execution Management) code
90obj-y += gem/
91gem-y += \
92	gem/i915_gem_busy.o \
93	gem/i915_gem_clflush.o \
94	gem/i915_gem_client_blt.o \
95	gem/i915_gem_context.o \
96	gem/i915_gem_dmabuf.o \
97	gem/i915_gem_domain.o \
98	gem/i915_gem_execbuffer.o \
99	gem/i915_gem_fence.o \
100	gem/i915_gem_internal.o \
101	gem/i915_gem_object.o \
102	gem/i915_gem_object_blt.o \
103	gem/i915_gem_mman.o \
104	gem/i915_gem_pages.o \
105	gem/i915_gem_phys.o \
106	gem/i915_gem_pm.o \
107	gem/i915_gem_shmem.o \
108	gem/i915_gem_shrinker.o \
109	gem/i915_gem_stolen.o \
110	gem/i915_gem_throttle.o \
111	gem/i915_gem_tiling.o \
112	gem/i915_gem_userptr.o \
113	gem/i915_gem_wait.o \
114	gem/i915_gemfs.o
115i915-y += \
116	  $(gem-y) \
117	  i915_active.o \
118	  i915_cmd_parser.o \
119	  i915_gem_batch_pool.o \
120	  i915_gem_evict.o \
121	  i915_gem_fence_reg.o \
122	  i915_gem_gtt.o \
123	  i915_gem.o \
124	  i915_gem_render_state.o \
125	  i915_globals.o \
126	  i915_query.o \
127	  i915_request.o \
128	  i915_scheduler.o \
129	  i915_timeline.o \
130	  i915_trace_points.o \
131	  i915_vma.o \
132	  intel_wopcm.o
133
134# general-purpose microcontroller (GuC) support
135i915-y += intel_uc.o \
136	  intel_uc_fw.o \
137	  intel_guc.o \
138	  intel_guc_ads.o \
139	  intel_guc_ct.o \
140	  intel_guc_fw.o \
141	  intel_guc_log.o \
142	  intel_guc_submission.o \
143	  intel_huc.o \
144	  intel_huc_fw.o
145
146# autogenerated null render state
147i915-y += intel_renderstate_gen6.o \
148	  intel_renderstate_gen7.o \
149	  intel_renderstate_gen8.o \
150	  intel_renderstate_gen9.o
151
152# modesetting core code
153obj-y += display/
154i915-y += \
155	display/intel_atomic.o \
156	display/intel_atomic_plane.o \
157	display/intel_audio.o \
158	display/intel_bios.o \
159	display/intel_bw.o \
160	display/intel_cdclk.o \
161	display/intel_color.o \
162	display/intel_combo_phy.o \
163	display/intel_connector.o \
164	display/intel_display.o \
165	display/intel_display_power.o \
166	display/intel_dpio_phy.o \
167	display/intel_dpll_mgr.o \
168	display/intel_fbc.o \
169	display/intel_fifo_underrun.o \
170	display/intel_frontbuffer.o \
171	display/intel_hdcp.o \
172	display/intel_hotplug.o \
173	display/intel_lpe_audio.o \
174	display/intel_overlay.o \
175	display/intel_psr.o \
176	display/intel_quirks.o \
177	display/intel_sprite.o
178i915-$(CONFIG_ACPI) += \
179	display/intel_acpi.o \
180	display/intel_opregion.o
181i915-$(CONFIG_DRM_FBDEV_EMULATION) += \
182	display/intel_fbdev.o
183
184# modesetting output/encoder code
185i915-y += \
186	display/dvo_ch7017.o \
187	display/dvo_ch7xxx.o \
188	display/dvo_ivch.o \
189	display/dvo_ns2501.o \
190	display/dvo_sil164.o \
191	display/dvo_tfp410.o \
192	display/icl_dsi.o \
193	display/intel_crt.o \
194	display/intel_ddi.o \
195	display/intel_dp.o \
196	display/intel_dp_aux_backlight.o \
197	display/intel_dp_link_training.o \
198	display/intel_dp_mst.o \
199	display/intel_dsi.o \
200	display/intel_dsi_dcs_backlight.o \
201	display/intel_dsi_vbt.o \
202	display/intel_dvo.o \
203	display/intel_gmbus.o \
204	display/intel_hdmi.o \
205	display/intel_lspcon.o \
206	display/intel_lvds.o \
207	display/intel_panel.o \
208	display/intel_sdvo.o \
209	display/intel_tv.o \
210	display/intel_vdsc.o \
211	display/vlv_dsi.o \
212	display/vlv_dsi_pll.o
213
214# Post-mortem debug and GPU hang state capture
215i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
216i915-$(CONFIG_DRM_I915_SELFTEST) += \
217	gem/selftests/igt_gem_utils.o \
218	selftests/i915_random.o \
219	selftests/i915_selftest.o \
220	selftests/igt_flush_test.o \
221	selftests/igt_live_test.o \
222	selftests/igt_reset.o \
223	selftests/igt_spinner.o
224
225# virtual gpu code
226i915-y += i915_vgpu.o
227
228# perf code
229i915-y += i915_perf.o \
230	  i915_oa_hsw.o \
231	  i915_oa_bdw.o \
232	  i915_oa_chv.o \
233	  i915_oa_sklgt2.o \
234	  i915_oa_sklgt3.o \
235	  i915_oa_sklgt4.o \
236	  i915_oa_bxt.o \
237	  i915_oa_kblgt2.o \
238	  i915_oa_kblgt3.o \
239	  i915_oa_glk.o \
240	  i915_oa_cflgt2.o \
241	  i915_oa_cflgt3.o \
242	  i915_oa_cnl.o \
243	  i915_oa_icl.o
244
245ifeq ($(CONFIG_DRM_I915_GVT),y)
246i915-y += intel_gvt.o
247include $(src)/gvt/Makefile
248endif
249
250obj-$(CONFIG_DRM_I915) += i915.o
251obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
252