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