1 # SPDX-License-Identifier: GPL-2.0
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.
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.
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, unused-but-set-variable)
21 subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
22 subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
23 subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
24 subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
25 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
27 # Fine grained warnings disable
28 CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
29 CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
32 $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
35 include $(src)/Makefile.header-test
37 subdir-ccflags-y += -I$(src)
39 # Please keep these build lists sorted!
42 i915-y += i915_drv.o \
63 i915_user_extensions.o
65 i915-$(CONFIG_COMPAT) += i915_ioc32.o
66 i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o display/intel_pipe_crc.o
67 i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
69 # "Graphics Technology" (aka we talk to the gpu)
72 gt/intel_breadcrumbs.o \
74 gt/intel_engine_cs.o \
75 gt/intel_engine_pm.o \
77 gt/intel_hangcheck.o \
80 gt/intel_ringbuffer.o \
83 gt/intel_workarounds.o
84 gt-$(CONFIG_DRM_I915_SELFTEST) += \
88 # GEM (Graphics Execution Management) code
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 \
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 \
118 i915_gem_batch_pool.o \
120 i915_gem_fence_reg.o \
123 i915_gem_render_state.o \
129 i915_trace_points.o \
133 # general-purpose microcontroller (GuC) support
134 i915-y += intel_uc.o \
141 intel_guc_submission.o \
145 # autogenerated null render state
146 i915-y += intel_renderstate_gen6.o \
147 intel_renderstate_gen7.o \
148 intel_renderstate_gen8.o \
149 intel_renderstate_gen9.o
151 # modesetting core code
154 display/intel_atomic.o \
155 display/intel_atomic_plane.o \
156 display/intel_audio.o \
157 display/intel_bios.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
177 i915-$(CONFIG_ACPI) += \
178 display/intel_acpi.o \
179 display/intel_opregion.o
180 i915-$(CONFIG_DRM_FBDEV_EMULATION) += \
181 display/intel_fbdev.o
183 # modesetting output/encoder code
185 display/dvo_ch7017.o \
186 display/dvo_ch7xxx.o \
188 display/dvo_ns2501.o \
189 display/dvo_sil164.o \
190 display/dvo_tfp410.o \
192 display/intel_crt.o \
193 display/intel_ddi.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 \
209 display/intel_vdsc.o \
211 display/vlv_dsi_pll.o
213 # Post-mortem debug and GPU hang state capture
214 i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
215 i915-$(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
225 i915-y += i915_vgpu.o
228 i915-y += i915_perf.o \
244 ifeq ($(CONFIG_DRM_I915_GVT),y)
245 i915-y += intel_gvt.o
246 include $(src)/gvt/Makefile
249 obj-$(CONFIG_DRM_I915) += i915.o
250 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o