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, implicit-fallthrough)
20 subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
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
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)
33 $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
36 include $(src)/Makefile.header-test
38 subdir-ccflags-y += -I$(src)
40 # Please keep these build lists sorted!
43 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 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
152 i915-y += intel_audio.o \
154 intel_atomic_plane.o \
165 intel_fifo_underrun.o \
166 intel_frontbuffer.o \
174 i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
175 i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o
177 # modesetting output/encoder code
178 i915-y += dvo_ch7017.o \
187 intel_dp_aux_backlight.o \
188 intel_dp_link_training.o \
192 intel_dsi_dcs_backlight.o \
206 # Post-mortem debug and GPU hang state capture
207 i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
208 i915-$(CONFIG_DRM_I915_SELFTEST) += \
209 gem/selftests/igt_gem_utils.o \
210 selftests/i915_random.o \
211 selftests/i915_selftest.o \
212 selftests/igt_flush_test.o \
213 selftests/igt_live_test.o \
214 selftests/igt_reset.o \
215 selftests/igt_spinner.o
218 i915-y += i915_vgpu.o
221 i915-y += i915_perf.o \
237 ifeq ($(CONFIG_DRM_I915_GVT),y)
238 i915-y += intel_gvt.o
239 include $(src)/gvt/Makefile
242 # LPE Audio for VLV and CHT
243 i915-y += intel_lpe_audio.o
245 obj-$(CONFIG_DRM_I915) += i915.o
246 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o