Makefile 5.1 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_suspend.o \
44
	  i915_syncmap.o \
45
	  i915_sw_fence.o \
D
Daniel Vetter 已提交
46
	  i915_sysfs.o \
D
Daniel Vetter 已提交
47
	  intel_csr.o \
48
	  intel_device_info.o \
49
	  intel_pm.o \
50 51
	  intel_runtime_pm.o \
	  intel_workarounds.o
52

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

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

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

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

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

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

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

172 173 174
# virtual gpu code
i915-y += i915_vgpu.o

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

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

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

200
obj-$(CONFIG_DRM_I915) += i915.o