xref: /openbmc/linux/drivers/gpu/drm/i915/Makefile (revision 1804569d)
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# Please keep these build lists sorted!
36
37# core driver code
38i915-y := i915_drv.o \
39	  i915_irq.o \
40	  i915_memcpy.o \
41	  i915_mm.o \
42	  i915_params.o \
43	  i915_pci.o \
44	  i915_reset.o \
45	  i915_suspend.o \
46	  i915_sw_fence.o \
47	  i915_syncmap.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_workarounds.o
54
55i915-$(CONFIG_COMPAT)   += i915_ioc32.o
56i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
57i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
58
59# GEM code
60i915-y += \
61	  i915_active.o \
62	  i915_cmd_parser.o \
63	  i915_gem_batch_pool.o \
64	  i915_gem_clflush.o \
65	  i915_gem_context.o \
66	  i915_gem_dmabuf.o \
67	  i915_gem_evict.o \
68	  i915_gem_execbuffer.o \
69	  i915_gem_fence_reg.o \
70	  i915_gem_gtt.o \
71	  i915_gem_internal.o \
72	  i915_gem.o \
73	  i915_gem_object.o \
74	  i915_gem_render_state.o \
75	  i915_gem_shrinker.o \
76	  i915_gem_stolen.o \
77	  i915_gem_tiling.o \
78	  i915_gem_userptr.o \
79	  i915_gemfs.o \
80	  i915_query.o \
81	  i915_request.o \
82	  i915_scheduler.o \
83	  i915_timeline.o \
84	  i915_trace_points.o \
85	  i915_vma.o \
86	  intel_breadcrumbs.o \
87	  intel_engine_cs.o \
88	  intel_hangcheck.o \
89	  intel_lrc.o \
90	  intel_mocs.o \
91	  intel_ringbuffer.o \
92	  intel_uncore.o \
93	  intel_wopcm.o
94
95# general-purpose microcontroller (GuC) support
96i915-y += intel_uc.o \
97	  intel_uc_fw.o \
98	  intel_guc.o \
99	  intel_guc_ads.o \
100	  intel_guc_ct.o \
101	  intel_guc_fw.o \
102	  intel_guc_log.o \
103	  intel_guc_submission.o \
104	  intel_huc.o \
105	  intel_huc_fw.o
106
107# autogenerated null render state
108i915-y += intel_renderstate_gen6.o \
109	  intel_renderstate_gen7.o \
110	  intel_renderstate_gen8.o \
111	  intel_renderstate_gen9.o
112
113# modesetting core code
114i915-y += intel_audio.o \
115	  intel_atomic.o \
116	  intel_atomic_plane.o \
117	  intel_bios.o \
118	  intel_cdclk.o \
119	  intel_color.o \
120	  intel_combo_phy.o \
121	  intel_connector.o \
122	  intel_display.o \
123	  intel_dpio_phy.o \
124	  intel_dpll_mgr.o \
125	  intel_fbc.o \
126	  intel_fifo_underrun.o \
127	  intel_frontbuffer.o \
128	  intel_hdcp.o \
129	  intel_hotplug.o \
130	  intel_overlay.o \
131	  intel_psr.o \
132	  intel_quirks.o \
133	  intel_sideband.o \
134	  intel_sprite.o
135i915-$(CONFIG_ACPI)		+= intel_acpi.o intel_opregion.o
136i915-$(CONFIG_DRM_FBDEV_EMULATION)	+= intel_fbdev.o
137
138# modesetting output/encoder code
139i915-y += dvo_ch7017.o \
140	  dvo_ch7xxx.o \
141	  dvo_ivch.o \
142	  dvo_ns2501.o \
143	  dvo_sil164.o \
144	  dvo_tfp410.o \
145	  icl_dsi.o \
146	  intel_crt.o \
147	  intel_ddi.o \
148	  intel_dp_aux_backlight.o \
149	  intel_dp_link_training.o \
150	  intel_dp_mst.o \
151	  intel_dp.o \
152	  intel_dsi.o \
153	  intel_dsi_dcs_backlight.o \
154	  intel_dsi_vbt.o \
155	  intel_dvo.o \
156	  intel_hdmi.o \
157	  intel_i2c.o \
158	  intel_lspcon.o \
159	  intel_lvds.o \
160	  intel_panel.o \
161	  intel_sdvo.o \
162	  intel_tv.o \
163	  vlv_dsi.o \
164	  vlv_dsi_pll.o \
165	  intel_vdsc.o
166
167# Post-mortem debug and GPU hang state capture
168i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
169i915-$(CONFIG_DRM_I915_SELFTEST) += \
170	selftests/i915_random.o \
171	selftests/i915_selftest.o \
172	selftests/igt_flush_test.o \
173	selftests/igt_live_test.o \
174	selftests/igt_reset.o \
175	selftests/igt_spinner.o
176
177# virtual gpu code
178i915-y += i915_vgpu.o
179
180# perf code
181i915-y += i915_perf.o \
182	  i915_oa_hsw.o \
183	  i915_oa_bdw.o \
184	  i915_oa_chv.o \
185	  i915_oa_sklgt2.o \
186	  i915_oa_sklgt3.o \
187	  i915_oa_sklgt4.o \
188	  i915_oa_bxt.o \
189	  i915_oa_kblgt2.o \
190	  i915_oa_kblgt3.o \
191	  i915_oa_glk.o \
192	  i915_oa_cflgt2.o \
193	  i915_oa_cflgt3.o \
194	  i915_oa_cnl.o \
195	  i915_oa_icl.o
196
197ifeq ($(CONFIG_DRM_I915_GVT),y)
198i915-y += intel_gvt.o
199include $(src)/gvt/Makefile
200endif
201
202# LPE Audio for VLV and CHT
203i915-y += intel_lpe_audio.o
204
205obj-$(CONFIG_DRM_I915) += i915.o
206obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
207