Makefile 5.2 KB
Newer Older
1
# SPDX-License-Identifier: GPL-2.0
2 3 4 5
#
# Makefile for the drm device driver.  This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.

6 7 8 9 10 11 12 13 14
# Add a set of useful warning flags and enable -Werror for CI to prevent
# trivial mistakes from creeping in. We have to do this piecemeal as we reject
# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we
# need to filter out dubious warnings.  Still it is our interest
# to keep running locally with W=1 C=1 until we are completely clean.
#
# Note the danger in using -Wall -Wextra is that when CI updates gcc we
# will most likely get a sudden build breakage... Hopefully we will fix
# new warnings before CI updates!
K
Kees Cook 已提交
15
subdir-ccflags-y := -Wall -Wextra
16 17 18 19
subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
subdir-ccflags-y += $(call cc-disable-warning, type-limits)
subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
20
subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
21 22 23 24
# clang warnings
subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
25 26 27
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror

# Fine grained warnings disable
28 29
CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
30

31 32
subdir-ccflags-y += \
	$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
33

D
Daniel Vetter 已提交
34 35 36 37
# Please keep these build lists sorted!

# core driver code
i915-y := i915_drv.o \
D
Daniel Vetter 已提交
38
	  i915_irq.o \
39
	  i915_memcpy.o \
40
	  i915_mm.o \
D
Daniel Vetter 已提交
41
	  i915_params.o \
42
	  i915_pci.o \
43
	  i915_reset.o \
P
Pedro Tammela 已提交
44
	  i915_suspend.o \
45
	  i915_sw_fence.o \
46
	  i915_syncmap.o \
D
Daniel Vetter 已提交
47
	  i915_sysfs.o \
D
Daniel Vetter 已提交
48
	  intel_csr.o \
49
	  intel_device_info.o \
50
	  intel_pm.o \
51 52
	  intel_runtime_pm.o \
	  intel_workarounds.o
53

D
Daniel Vetter 已提交
54
i915-$(CONFIG_COMPAT)   += i915_ioc32.o
55
i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
56
i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
D
Daniel Vetter 已提交
57 58 59

# GEM code
i915-y += i915_cmd_parser.o \
60
	  i915_gem_batch_pool.o \
61
	  i915_gem_clflush.o \
62
	  i915_gem_context.o \
D
Daniel Vetter 已提交
63
	  i915_gem_dmabuf.o \
64
	  i915_gem_evict.o \
65
	  i915_gem_execbuffer.o \
J
Joonas Lahtinen 已提交
66
	  i915_gem_fence_reg.o \
67
	  i915_gem_gtt.o \
68
	  i915_gem_internal.o \
D
Daniel Vetter 已提交
69
	  i915_gem.o \
70
	  i915_gem_object.o \
D
Daniel Vetter 已提交
71
	  i915_gem_render_state.o \
72
	  i915_gem_shrinker.o \
73
	  i915_gem_stolen.o \
J
Jesse Barnes 已提交
74
	  i915_gem_tiling.o \
75
	  i915_gem_userptr.o \
M
Matthew Auld 已提交
76
	  i915_gemfs.o \
L
Lionel Landwerlin 已提交
77
	  i915_query.o \
78
	  i915_request.o \
79
	  i915_scheduler.o \
80
	  i915_timeline.o \
C
Chris Wilson 已提交
81
	  i915_trace_points.o \
J
Joonas Lahtinen 已提交
82
	  i915_vma.o \
83
	  intel_breadcrumbs.o \
84
	  intel_engine_cs.o \
85
	  intel_hangcheck.o \
86
	  intel_lrc.o \
87
	  intel_mocs.o \
D
Daniel Vetter 已提交
88
	  intel_ringbuffer.o \
89 90
	  intel_uncore.o \
	  intel_wopcm.o
D
Daniel Vetter 已提交
91

92
# general-purpose microcontroller (GuC) support
93
i915-y += intel_uc.o \
94
	  intel_uc_fw.o \
95
	  intel_guc.o \
96
	  intel_guc_ads.o \
97
	  intel_guc_ct.o \
98
	  intel_guc_fw.o \
99 100
	  intel_guc_log.o \
	  intel_guc_submission.o \
101 102
	  intel_huc.o \
	  intel_huc_fw.o
103

104 105 106
# autogenerated null render state
i915-y += intel_renderstate_gen6.o \
	  intel_renderstate_gen7.o \
107 108
	  intel_renderstate_gen8.o \
	  intel_renderstate_gen9.o
109

D
Daniel Vetter 已提交
110
# modesetting core code
111
i915-y += intel_audio.o \
D
Daniel Vetter 已提交
112 113
	  intel_atomic.o \
	  intel_atomic_plane.o \
114
	  intel_bios.o \
115
	  intel_cdclk.o \
116
	  intel_color.o \
117
	  intel_combo_phy.o \
118
	  intel_connector.o \
J
Jesse Barnes 已提交
119
	  intel_display.o \
120
	  intel_dpio_phy.o \
121
	  intel_dpll_mgr.o \
122
	  intel_fbc.o \
123
	  intel_fifo_underrun.o \
124
	  intel_frontbuffer.o \
125
	  intel_hdcp.o \
D
Daniel Vetter 已提交
126
	  intel_hotplug.o \
D
Daniel Vetter 已提交
127
	  intel_overlay.o \
R
Rodrigo Vivi 已提交
128
	  intel_psr.o \
129
	  intel_quirks.o \
130
	  intel_sideband.o \
D
Daniel Vetter 已提交
131
	  intel_sprite.o
132
i915-$(CONFIG_ACPI)		+= intel_acpi.o intel_opregion.o
133
i915-$(CONFIG_DRM_FBDEV_EMULATION)	+= intel_fbdev.o
D
Daniel Vetter 已提交
134 135 136

# modesetting output/encoder code
i915-y += dvo_ch7017.o \
J
Jesse Barnes 已提交
137 138
	  dvo_ch7xxx.o \
	  dvo_ivch.o \
139
	  dvo_ns2501.o \
D
Daniel Vetter 已提交
140 141
	  dvo_sil164.o \
	  dvo_tfp410.o \
142
	  icl_dsi.o \
D
Daniel Vetter 已提交
143 144
	  intel_crt.o \
	  intel_ddi.o \
145
	  intel_dp_aux_backlight.o \
146
	  intel_dp_link_training.o \
147
	  intel_dp_mst.o \
D
Daniel Vetter 已提交
148
	  intel_dp.o \
149
	  intel_dsi.o \
150
	  intel_dsi_dcs_backlight.o \
151
	  intel_dsi_vbt.o \
D
Daniel Vetter 已提交
152 153 154
	  intel_dvo.o \
	  intel_hdmi.o \
	  intel_i2c.o \
155
	  intel_lspcon.o \
D
Daniel Vetter 已提交
156 157 158
	  intel_lvds.o \
	  intel_panel.o \
	  intel_sdvo.o \
159 160
	  intel_tv.o \
	  vlv_dsi.o \
161 162
	  vlv_dsi_pll.o \
	  intel_vdsc.o
163

164 165
# Post-mortem debug and GPU hang state capture
i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
166 167
i915-$(CONFIG_DRM_I915_SELFTEST) += \
	selftests/i915_random.o \
168
	selftests/i915_selftest.o \
169
	selftests/igt_flush_test.o \
170
	selftests/igt_live_test.o \
171
	selftests/igt_reset.o \
172
	selftests/igt_spinner.o
173

174 175 176
# virtual gpu code
i915-y += i915_vgpu.o

177
# perf code
178
i915-y += i915_perf.o \
179 180 181 182 183 184
	  i915_oa_hsw.o \
	  i915_oa_bdw.o \
	  i915_oa_chv.o \
	  i915_oa_sklgt2.o \
	  i915_oa_sklgt3.o \
	  i915_oa_sklgt4.o \
185 186
	  i915_oa_bxt.o \
	  i915_oa_kblgt2.o \
187
	  i915_oa_kblgt3.o \
188
	  i915_oa_glk.o \
189
	  i915_oa_cflgt2.o \
190
	  i915_oa_cflgt3.o \
191 192
	  i915_oa_cnl.o \
	  i915_oa_icl.o
193

194 195 196 197 198
ifeq ($(CONFIG_DRM_I915_GVT),y)
i915-y += intel_gvt.o
include $(src)/gvt/Makefile
endif

199 200 201
# LPE Audio for VLV and CHT
i915-y += intel_lpe_audio.o

202
obj-$(CONFIG_DRM_I915) += i915.o
203
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o