xref: /openbmc/linux/drivers/gpu/drm/amd/amdgpu/Makefile (revision 0545810f)
1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
23# Makefile for the drm device driver.  This driver provides support for the
24# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
25
26FULL_AMD_PATH=$(srctree)/$(src)/..
27DISPLAY_FOLDER_NAME=display
28FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
29
30ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
31	-I$(FULL_AMD_PATH)/include \
32	-I$(FULL_AMD_PATH)/amdgpu \
33	-I$(FULL_AMD_PATH)/pm/inc \
34	-I$(FULL_AMD_PATH)/acp/include \
35	-I$(FULL_AMD_DISPLAY_PATH) \
36	-I$(FULL_AMD_DISPLAY_PATH)/include \
37	-I$(FULL_AMD_DISPLAY_PATH)/modules/inc \
38	-I$(FULL_AMD_DISPLAY_PATH)/dc \
39	-I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \
40	-I$(FULL_AMD_PATH)/amdkfd
41
42amdgpu-y := amdgpu_drv.o
43
44# add KMS driver
45amdgpu-y += amdgpu_device.o amdgpu_kms.o \
46	amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \
47	atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \
48	amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \
49	amdgpu_gem.o amdgpu_ring.o \
50	amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o \
51	atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \
52	atombios_encoders.o amdgpu_sa.o atombios_i2c.o \
53	amdgpu_dma_buf.o amdgpu_vm.o amdgpu_vm_pt.o amdgpu_ib.o amdgpu_pll.o \
54	amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \
55	amdgpu_gtt_mgr.o amdgpu_preempt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o \
56	amdgpu_atomfirmware.o amdgpu_vf_error.o amdgpu_sched.o \
57	amdgpu_debugfs.o amdgpu_ids.o amdgpu_gmc.o amdgpu_mmhub.o amdgpu_hdp.o \
58	amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
59	amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o amdgpu_nbio.o \
60	amdgpu_umc.o smu_v11_0_i2c.o amdgpu_fru_eeprom.o amdgpu_rap.o \
61	amdgpu_fw_attestation.o amdgpu_securedisplay.o \
62	amdgpu_eeprom.o amdgpu_mca.o amdgpu_psp_ta.o amdgpu_lsdma.o \
63	amdgpu_ring_mux.o
64
65amdgpu-$(CONFIG_PROC_FS) += amdgpu_fdinfo.o
66
67amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o
68
69# add asic specific block
70amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o \
71	dce_v8_0.o gfx_v7_0.o cik_sdma.o uvd_v4_2.o vce_v2_0.o
72
73amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o dce_v6_0.o \
74	uvd_v3_1.o
75
76amdgpu-y += \
77	vi.o mxgpu_vi.o nbio_v6_1.o soc15.o emu_soc.o mxgpu_ai.o nbio_v7_0.o vega10_reg_init.o \
78	vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o arct_reg_init.o mxgpu_nv.o \
79	nbio_v7_2.o hdp_v4_0.o hdp_v5_0.o aldebaran_reg_init.o aldebaran.o soc21.o \
80	sienna_cichlid.o smu_v13_0_10.o nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o \
81	nbio_v7_9.o
82
83# add DF block
84amdgpu-y += \
85	df_v1_7.o \
86	df_v3_6.o \
87	df_v4_3.o
88
89# add GMC block
90amdgpu-y += \
91	gmc_v7_0.o \
92	gmc_v8_0.o \
93	gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o gfxhub_v1_1.o mmhub_v9_4.o \
94	gfxhub_v2_0.o mmhub_v2_0.o gmc_v10_0.o gfxhub_v2_1.o mmhub_v2_3.o \
95	mmhub_v1_7.o gfxhub_v3_0.o mmhub_v3_0.o mmhub_v3_0_2.o gmc_v11_0.o \
96	mmhub_v3_0_1.o gfxhub_v3_0_3.o gfxhub_v1_2.o mmhub_v1_8.o
97
98# add UMC block
99amdgpu-y += \
100	umc_v6_0.o umc_v6_1.o umc_v6_7.o umc_v8_7.o umc_v8_10.o
101
102# add IH block
103amdgpu-y += \
104	amdgpu_irq.o \
105	amdgpu_ih.o \
106	iceland_ih.o \
107	tonga_ih.o \
108	cz_ih.o \
109	vega10_ih.o \
110	vega20_ih.o \
111	navi10_ih.o \
112	ih_v6_0.o
113
114# add PSP block
115amdgpu-y += \
116	amdgpu_psp.o \
117	psp_v3_1.o \
118	psp_v10_0.o \
119	psp_v11_0.o \
120	psp_v11_0_8.o \
121	psp_v12_0.o \
122	psp_v13_0.o \
123	psp_v13_0_4.o
124
125# add DCE block
126amdgpu-y += \
127	dce_v10_0.o \
128	dce_v11_0.o \
129	amdgpu_vkms.o
130
131# add GFX block
132amdgpu-y += \
133	amdgpu_gfx.o \
134	amdgpu_rlc.o \
135	gfx_v8_0.o \
136	gfx_v9_0.o \
137	gfx_v9_4.o \
138	gfx_v9_4_2.o \
139	gfx_v9_4_3.o \
140	gfx_v10_0.o \
141	imu_v11_0.o \
142	gfx_v11_0.o \
143	gfx_v11_0_3.o \
144	imu_v11_0_3.o
145
146# add async DMA block
147amdgpu-y += \
148	amdgpu_sdma.o \
149	sdma_v2_4.o \
150	sdma_v3_0.o \
151	sdma_v4_0.o \
152	sdma_v4_4.o \
153	sdma_v4_4_2.o \
154	sdma_v5_0.o \
155	sdma_v5_2.o \
156	sdma_v6_0.o
157
158# add MES block
159amdgpu-y += \
160	amdgpu_mes.o \
161	mes_v10_1.o \
162	mes_v11_0.o
163
164# add UVD block
165amdgpu-y += \
166	amdgpu_uvd.o \
167	uvd_v5_0.o \
168	uvd_v6_0.o \
169	uvd_v7_0.o
170
171# add VCE block
172amdgpu-y += \
173	amdgpu_vce.o \
174	vce_v3_0.o \
175	vce_v4_0.o
176
177# add VCN and JPEG block
178amdgpu-y += \
179	amdgpu_vcn.o \
180	vcn_sw_ring.o \
181	vcn_v1_0.o \
182	vcn_v2_0.o \
183	vcn_v2_5.o \
184	vcn_v3_0.o \
185	vcn_v4_0.o \
186	amdgpu_jpeg.o \
187	jpeg_v1_0.o \
188	jpeg_v2_0.o \
189	jpeg_v2_5.o \
190	jpeg_v3_0.o \
191	jpeg_v4_0.o
192
193# add ATHUB block
194amdgpu-y += \
195	athub_v1_0.o \
196	athub_v2_0.o \
197	athub_v2_1.o \
198	athub_v3_0.o
199
200# add SMUIO block
201amdgpu-y += \
202	smuio_v9_0.o \
203	smuio_v11_0.o \
204	smuio_v11_0_6.o \
205	smuio_v13_0.o \
206	smuio_v13_0_6.o
207
208# add reset block
209amdgpu-y += \
210	amdgpu_reset.o
211
212# add MCA block
213amdgpu-y += \
214	mca_v3_0.o
215
216# add amdkfd interfaces
217amdgpu-y += amdgpu_amdkfd.o
218
219
220ifneq ($(CONFIG_HSA_AMD),)
221AMDKFD_PATH := ../amdkfd
222include $(FULL_AMD_PATH)/amdkfd/Makefile
223amdgpu-y += $(AMDKFD_FILES)
224amdgpu-y += \
225	amdgpu_amdkfd_fence.o \
226	amdgpu_amdkfd_gpuvm.o \
227	amdgpu_amdkfd_gfx_v8.o \
228	amdgpu_amdkfd_gfx_v9.o \
229	amdgpu_amdkfd_arcturus.o \
230	amdgpu_amdkfd_aldebaran.o \
231	amdgpu_amdkfd_gfx_v10.o \
232	amdgpu_amdkfd_gfx_v10_3.o \
233	amdgpu_amdkfd_gfx_v11.o
234
235ifneq ($(CONFIG_DRM_AMDGPU_CIK),)
236amdgpu-y += amdgpu_amdkfd_gfx_v7.o
237endif
238
239endif
240
241# add cgs
242amdgpu-y += amdgpu_cgs.o
243
244# GPU scheduler
245amdgpu-y += amdgpu_job.o
246
247# ACP componet
248ifneq ($(CONFIG_DRM_AMD_ACP),)
249amdgpu-y += amdgpu_acp.o
250
251AMDACPPATH := ../acp
252include $(FULL_AMD_PATH)/acp/Makefile
253
254amdgpu-y += $(AMD_ACP_FILES)
255endif
256
257amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o
258amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o
259amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o
260amdgpu-$(CONFIG_HMM_MIRROR) += amdgpu_hmm.o
261
262include $(FULL_AMD_PATH)/pm/Makefile
263
264amdgpu-y += $(AMD_POWERPLAY_FILES)
265
266ifneq ($(CONFIG_DRM_AMD_DC),)
267
268RELATIVE_AMD_DISPLAY_PATH = ../$(DISPLAY_FOLDER_NAME)
269include $(FULL_AMD_DISPLAY_PATH)/Makefile
270
271amdgpu-y += $(AMD_DISPLAY_FILES)
272
273endif
274
275obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
276