summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/xe/Makefile
blob: 628c245c4822ebff7494e4764c93556eecf6cd8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the drm device driver.  This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.

# Enable W=1 warnings not enabled in drm subsystem Makefile
subdir-ccflags-y += $(call cc-option, -Wformat-truncation)

# Enable -Werror in CI and development
subdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror

subdir-ccflags-y += -I$(obj) -I$(src)

# generated sources
hostprogs := xe_gen_wa_oob

generated_oob := $(obj)/generated/xe_wa_oob.c $(obj)/generated/xe_wa_oob.h

quiet_cmd_wa_oob = GEN     $(notdir $(generated_oob))
      cmd_wa_oob = mkdir -p $(@D); $^ $(generated_oob)

$(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
		 $(src)/xe_wa_oob.rules
	$(call cmd,wa_oob)

uses_generated_oob := \
	$(obj)/xe_ggtt.o \
	$(obj)/xe_gsc.o \
	$(obj)/xe_gt.o \
	$(obj)/xe_guc.o \
	$(obj)/xe_guc_ads.o \
	$(obj)/xe_guc_pc.o \
	$(obj)/xe_migrate.o \
	$(obj)/xe_ring_ops.o \
	$(obj)/xe_vm.o \
	$(obj)/xe_wa.o \
	$(obj)/xe_ttm_stolen_mgr.o

$(uses_generated_oob): $(generated_oob)

# Please keep these build lists sorted!

# core driver code

xe-y += xe_bb.o \
	xe_bo.o \
	xe_bo_evict.o \
	xe_debugfs.o \
	xe_devcoredump.o \
	xe_device.o \
	xe_device_sysfs.o \
	xe_dma_buf.o \
	xe_drm_client.o \
	xe_exec.o \
	xe_execlist.o \
	xe_exec_queue.o \
	xe_force_wake.o \
	xe_ggtt.o \
	xe_gpu_scheduler.o \
	xe_gsc.o \
	xe_gsc_proxy.o \
	xe_gsc_submit.o \
	xe_gt.o \
	xe_gt_ccs_mode.o \
	xe_gt_clock.o \
	xe_gt_debugfs.o \
	xe_gt_freq.o \
	xe_gt_idle.o \
	xe_gt_mcr.o \
	xe_gt_pagefault.o \
	xe_gt_sysfs.o \
	xe_gt_throttle.o \
	xe_gt_tlb_invalidation.o \
	xe_gt_topology.o \
	xe_guc.o \
	xe_guc_ads.o \
	xe_guc_ct.o \
	xe_guc_db_mgr.o \
	xe_guc_debugfs.o \
	xe_guc_hwconfig.o \
	xe_guc_id_mgr.o \
	xe_guc_klv_helpers.o \
	xe_guc_log.o \
	xe_guc_pc.o \
	xe_guc_submit.o \
	xe_heci_gsc.o \
	xe_hw_engine.o \
	xe_hw_engine_class_sysfs.o \
	xe_hw_fence.o \
	xe_huc.o \
	xe_huc_debugfs.o \
	xe_irq.o \
	xe_lrc.o \
	xe_migrate.o \
	xe_mmio.o \
	xe_mocs.o \
	xe_module.o \
	xe_oa.o \
	xe_observation.o \
	xe_pat.o \
	xe_pci.o \
	xe_pcode.o \
	xe_pm.o \
	xe_preempt_fence.o \
	xe_pt.o \
	xe_pt_walk.o \
	xe_query.o \
	xe_range_fence.o \
	xe_reg_sr.o \
	xe_reg_whitelist.o \
	xe_rtp.o \
	xe_ring_ops.o \
	xe_sa.o \
	xe_sched_job.o \
	xe_step.o \
	xe_sync.o \
	xe_tile.o \
	xe_tile_sysfs.o \
	xe_trace.o \
	xe_trace_bo.o \
	xe_trace_guc.o \
	xe_ttm_sys_mgr.o \
	xe_ttm_stolen_mgr.o \
	xe_ttm_vram_mgr.o \
	xe_tuning.o \
	xe_uc.o \
	xe_uc_debugfs.o \
	xe_uc_fw.o \
	xe_vm.o \
	xe_vram.o \
	xe_vram_freq.o \
	xe_wait_user_fence.o \
	xe_wa.o \
	xe_wopcm.o

xe-$(CONFIG_HMM_MIRROR) += xe_hmm.o

# graphics hardware monitoring (HWMON) support
xe-$(CONFIG_HWMON) += xe_hwmon.o

# graphics virtualization (SR-IOV) support
xe-y += \
	xe_gt_sriov_vf.o \
	xe_gt_sriov_vf_debugfs.o \
	xe_guc_relay.o \
	xe_memirq.o \
	xe_sriov.o

xe-$(CONFIG_PCI_IOV) += \
	xe_gt_sriov_pf.o \
	xe_gt_sriov_pf_config.o \
	xe_gt_sriov_pf_control.o \
	xe_gt_sriov_pf_debugfs.o \
	xe_gt_sriov_pf_monitor.o \
	xe_gt_sriov_pf_policy.o \
	xe_gt_sriov_pf_service.o \
	xe_lmtt.o \
	xe_lmtt_2l.o \
	xe_lmtt_ml.o \
	xe_pci_sriov.o \
	xe_sriov_pf.o

# include helpers for tests even when XE is built-in
ifdef CONFIG_DRM_XE_KUNIT_TEST
xe-y += tests/xe_kunit_helpers.o
endif

# i915 Display compat #defines and #includes
subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \
	-I$(src)/display/ext \
	-I$(src)/compat-i915-headers \
	-I$(srctree)/drivers/gpu/drm/i915/display/ \
	-Ddrm_i915_gem_object=xe_bo \
	-Ddrm_i915_private=xe_device

# Rule to build SOC code shared with i915
$(obj)/i915-soc/%.o: $(srctree)/drivers/gpu/drm/i915/soc/%.c FORCE
	$(call cmd,force_checksrc)
	$(call if_changed_rule,cc_o_c)

# Rule to build display code shared with i915
$(obj)/i915-display/%.o: $(srctree)/drivers/gpu/drm/i915/display/%.c FORCE
	$(call cmd,force_checksrc)
	$(call if_changed_rule,cc_o_c)

# Display code specific to xe
xe-$(CONFIG_DRM_XE_DISPLAY) += \
	display/ext/i915_irq.o \
	display/ext/i915_utils.o \
	display/intel_fb_bo.o \
	display/intel_fbdev_fb.o \
	display/xe_display.o \
	display/xe_display_misc.o \
	display/xe_display_rps.o \
	display/xe_dsb_buffer.o \
	display/xe_fb_pin.o \
	display/xe_hdcp_gsc.o \
	display/xe_plane_initial.o \
	display/xe_tdf.o

# SOC code shared with i915
xe-$(CONFIG_DRM_XE_DISPLAY) += \
	i915-soc/intel_dram.o \
	i915-soc/intel_pch.o

# Display code shared with i915
xe-$(CONFIG_DRM_XE_DISPLAY) += \
	i915-display/icl_dsi.o \
	i915-display/intel_alpm.o \
	i915-display/intel_atomic.o \
	i915-display/intel_atomic_plane.o \
	i915-display/intel_audio.o \
	i915-display/intel_backlight.o \
	i915-display/intel_bios.o \
	i915-display/intel_bw.o \
	i915-display/intel_cdclk.o \
	i915-display/intel_color.o \
	i915-display/intel_combo_phy.o \
	i915-display/intel_connector.o \
	i915-display/intel_crtc.o \
	i915-display/intel_crtc_state_dump.o \
	i915-display/intel_cursor.o \
	i915-display/intel_cx0_phy.o \
	i915-display/intel_ddi.o \
	i915-display/intel_ddi_buf_trans.o \
	i915-display/intel_display.o \
	i915-display/intel_display_device.o \
	i915-display/intel_display_driver.o \
	i915-display/intel_display_irq.o \
	i915-display/intel_display_params.o \
	i915-display/intel_display_power.o \
	i915-display/intel_display_power_map.o \
	i915-display/intel_display_power_well.o \
	i915-display/intel_display_trace.o \
	i915-display/intel_display_wa.o \
	i915-display/intel_dkl_phy.o \
	i915-display/intel_dmc.o \
	i915-display/intel_dp.o \
	i915-display/intel_dp_aux.o \
	i915-display/intel_dp_aux_backlight.o \
	i915-display/intel_dp_hdcp.o \
	i915-display/intel_dp_link_training.o \
	i915-display/intel_dp_mst.o \
	i915-display/intel_dpll.o \
	i915-display/intel_dpll_mgr.o \
	i915-display/intel_dpt_common.o \
	i915-display/intel_drrs.o \
	i915-display/intel_dsb.o \
	i915-display/intel_dsi.o \
	i915-display/intel_dsi_dcs_backlight.o \
	i915-display/intel_dsi_vbt.o \
	i915-display/intel_encoder.o \
	i915-display/intel_fb.o \
	i915-display/intel_fbc.o \
	i915-display/intel_fdi.o \
	i915-display/intel_fifo_underrun.o \
	i915-display/intel_frontbuffer.o \
	i915-display/intel_global_state.o \
	i915-display/intel_gmbus.o \
	i915-display/intel_hdcp.o \
	i915-display/intel_hdcp_gsc_message.o \
	i915-display/intel_hdmi.o \
	i915-display/intel_hotplug.o \
	i915-display/intel_hotplug_irq.o \
	i915-display/intel_hti.o \
	i915-display/intel_link_bw.o \
	i915-display/intel_lspcon.o \
	i915-display/intel_modeset_lock.o \
	i915-display/intel_modeset_setup.o \
	i915-display/intel_modeset_verify.o \
	i915-display/intel_panel.o \
	i915-display/intel_pmdemand.o \
	i915-display/intel_pps.o \
	i915-display/intel_psr.o \
	i915-display/intel_qp_tables.o \
	i915-display/intel_quirks.o \
	i915-display/intel_snps_phy.o \
	i915-display/intel_tc.o \
	i915-display/intel_vblank.o \
	i915-display/intel_vdsc.o \
	i915-display/intel_vga.o \
	i915-display/intel_vrr.o \
	i915-display/intel_dmc_wl.o \
	i915-display/intel_wm.o \
	i915-display/skl_scaler.o \
	i915-display/skl_universal_plane.o \
	i915-display/skl_watermark.o

ifeq ($(CONFIG_ACPI),y)
	xe-$(CONFIG_DRM_XE_DISPLAY) += \
		i915-display/intel_acpi.o \
		i915-display/intel_opregion.o
endif

ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
	xe-$(CONFIG_DRM_XE_DISPLAY) += i915-display/intel_fbdev.o
endif

ifeq ($(CONFIG_DEBUG_FS),y)
	xe-$(CONFIG_DRM_XE_DISPLAY) += \
		i915-display/intel_display_debugfs.o \
		i915-display/intel_display_debugfs_params.o \
		i915-display/intel_pipe_crc.o
endif

obj-$(CONFIG_DRM_XE) += xe.o
obj-$(CONFIG_DRM_XE_KUNIT_TEST) += tests/

# header test
hdrtest_find_args := -not -path xe_rtp_helpers.h
ifneq ($(CONFIG_DRM_XE_DISPLAY),y)
	hdrtest_find_args += -not -path display/\* -not -path compat-i915-headers/\* -not -path xe_display.h
endif

always-$(CONFIG_DRM_XE_WERROR) += \
	$(patsubst %.h,%.hdrtest, $(shell cd $(src) && find * -name '*.h' $(hdrtest_find_args)))

quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
      cmd_hdrtest = $(CC) -DHDRTEST $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; touch $@

$(obj)/%.hdrtest: $(src)/%.h FORCE
	$(call if_changed_dep,hdrtest)