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