xref: /linux-6.15/drivers/gpu/drm/amd/amdgpu/Makefile (revision d99605ea)
11a09120fSAlex Deucher#
21a09120fSAlex Deucher# Copyright 2017 Advanced Micro Devices, Inc.
31a09120fSAlex Deucher#
41a09120fSAlex Deucher# Permission is hereby granted, free of charge, to any person obtaining a
51a09120fSAlex Deucher# copy of this software and associated documentation files (the "Software"),
61a09120fSAlex Deucher# to deal in the Software without restriction, including without limitation
71a09120fSAlex Deucher# the rights to use, copy, modify, merge, publish, distribute, sublicense,
81a09120fSAlex Deucher# and/or sell copies of the Software, and to permit persons to whom the
91a09120fSAlex Deucher# Software is furnished to do so, subject to the following conditions:
101a09120fSAlex Deucher#
111a09120fSAlex Deucher# The above copyright notice and this permission notice shall be included in
121a09120fSAlex Deucher# all copies or substantial portions of the Software.
131a09120fSAlex Deucher#
141a09120fSAlex Deucher# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
151a09120fSAlex Deucher# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
161a09120fSAlex Deucher# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
171a09120fSAlex Deucher# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
181a09120fSAlex Deucher# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
191a09120fSAlex Deucher# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
201a09120fSAlex Deucher# OTHER DEALINGS IN THE SOFTWARE.
211a09120fSAlex Deucher#
22d38ceaf9SAlex Deucher#
23d38ceaf9SAlex Deucher# Makefile for the drm device driver.  This driver provides support for the
24d38ceaf9SAlex Deucher# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
25d38ceaf9SAlex Deucher
26288912cbSJammy ZhouFULL_AMD_PATH=$(src)/..
274562236bSHarry WentlandDISPLAY_FOLDER_NAME=display
284562236bSHarry WentlandFULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
29288912cbSJammy Zhou
30248a1d6fSMasahiro Yamadaccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
31288912cbSJammy Zhou	-I$(FULL_AMD_PATH)/include \
32288912cbSJammy Zhou	-I$(FULL_AMD_PATH)/amdgpu \
33a8fe58ceSMaruthi Bayyavarapu	-I$(FULL_AMD_PATH)/powerplay/inc \
344562236bSHarry Wentland	-I$(FULL_AMD_PATH)/acp/include \
354562236bSHarry Wentland	-I$(FULL_AMD_DISPLAY_PATH) \
364562236bSHarry Wentland	-I$(FULL_AMD_DISPLAY_PATH)/include \
374562236bSHarry Wentland	-I$(FULL_AMD_DISPLAY_PATH)/dc \
384562236bSHarry Wentland	-I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm
39d38ceaf9SAlex Deucher
40d38ceaf9SAlex Deucheramdgpu-y := amdgpu_drv.o
41d38ceaf9SAlex Deucher
42d38ceaf9SAlex Deucher# add KMS driver
43d38ceaf9SAlex Deucheramdgpu-y += amdgpu_device.o amdgpu_kms.o \
44d38ceaf9SAlex Deucher	amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \
45d38ceaf9SAlex Deucher	atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \
46d38ceaf9SAlex Deucher	amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \
47d38ceaf9SAlex Deucher	amdgpu_fb.o amdgpu_gem.o amdgpu_ring.o \
48d38ceaf9SAlex Deucher	amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o amdgpu_test.o \
49d38ceaf9SAlex Deucher	amdgpu_pm.o atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \
502f4b9400SChunming Zhou	atombios_encoders.o amdgpu_sa.o atombios_i2c.o \
51d38ceaf9SAlex Deucher	amdgpu_prime.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \
52bb990bb0SChristian König	amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \
53effd924dSAndres Rodriguez	amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \
54620f774fSChristian König	amdgpu_queue_mgr.o amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o \
55620f774fSChristian König	amdgpu_ids.o
56d38ceaf9SAlex Deucher
57aaa36a97SAlex Deucher# add asic specific block
58e42d8526SAlex Deucheramdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \
5941548ef7SAlex Deucher	ci_smc.o ci_dpm.o dce_v8_0.o gfx_v7_0.o cik_sdma.o uvd_v4_2.o vce_v2_0.o \
6041548ef7SAlex Deucher	amdgpu_amdkfd_gfx_v7.o
61a2e73f56SAlex Deucher
621919696eSMaruthi Srinivas Bayyavarapuamdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o dce_v6_0.o si_dpm.o si_smc.o
63a036db18SKen Wang
64aaa36a97SAlex Deucheramdgpu-y += \
659475a943SShaoyun Liu	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
66aaa36a97SAlex Deucher
67*d99605eaSHawking Zhang# add DF block
68*d99605eaSHawking Zhangamdgpu-y += \
69*d99605eaSHawking Zhang	df_v1_7.o
70*d99605eaSHawking Zhang
71aaa36a97SAlex Deucher# add GMC block
72aaa36a97SAlex Deucheramdgpu-y += \
73e42d8526SAlex Deucher	gmc_v7_0.o \
74e60f8db5SAlex Xie	gmc_v8_0.o \
75e60f8db5SAlex Xie	gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o
76aaa36a97SAlex Deucher
77d38ceaf9SAlex Deucher# add IH block
78d38ceaf9SAlex Deucheramdgpu-y += \
79d38ceaf9SAlex Deucher	amdgpu_irq.o \
80aaa36a97SAlex Deucher	amdgpu_ih.o \
81aaa36a97SAlex Deucher	iceland_ih.o \
82aaa36a97SAlex Deucher	tonga_ih.o \
83282aae55SKen Wang	cz_ih.o \
84282aae55SKen Wang	vega10_ih.o
85d38ceaf9SAlex Deucher
860e5ca0d1SHuang Rui# add PSP block
870e5ca0d1SHuang Ruiamdgpu-y += \
880e5ca0d1SHuang Rui	amdgpu_psp.o \
89fd341dc5SHuang Rui	psp_v3_1.o \
90fd341dc5SHuang Rui	psp_v10_0.o
910e5ca0d1SHuang Rui
92d38ceaf9SAlex Deucher# add SMC block
93d38ceaf9SAlex Deucheramdgpu-y += \
94b905090dSRex Zhu	amdgpu_dpm.o
95aaa36a97SAlex Deucher
96aaa36a97SAlex Deucher# add DCE block
97aaa36a97SAlex Deucheramdgpu-y += \
98aaa36a97SAlex Deucher	dce_v10_0.o \
99c6e14f40SEmily Deng	dce_v11_0.o \
100c6e14f40SEmily Deng	dce_virtual.o
101d38ceaf9SAlex Deucher
102d38ceaf9SAlex Deucher# add GFX block
103d38ceaf9SAlex Deucheramdgpu-y += \
104aaa36a97SAlex Deucher	amdgpu_gfx.o \
105b1023571SKen Wang	gfx_v8_0.o \
106b1023571SKen Wang	gfx_v9_0.o
107aaa36a97SAlex Deucher
108aaa36a97SAlex Deucher# add async DMA block
109aaa36a97SAlex Deucheramdgpu-y += \
110aaa36a97SAlex Deucher	sdma_v2_4.o \
1112130f89cSKen Wang	sdma_v3_0.o \
1122130f89cSKen Wang	sdma_v4_0.o
113d38ceaf9SAlex Deucher
114d38ceaf9SAlex Deucher# add UVD block
115d38ceaf9SAlex Deucheramdgpu-y += \
116aaa36a97SAlex Deucher	amdgpu_uvd.o \
117aaa36a97SAlex Deucher	uvd_v5_0.o \
11809bfb891SLeo Liu	uvd_v6_0.o \
11909bfb891SLeo Liu	uvd_v7_0.o
120d38ceaf9SAlex Deucher
121d38ceaf9SAlex Deucher# add VCE block
122d38ceaf9SAlex Deucheramdgpu-y += \
123aaa36a97SAlex Deucher	amdgpu_vce.o \
124c1dc356aSLeo Liu	vce_v3_0.o \
125c1dc356aSLeo Liu	vce_v4_0.o
126d38ceaf9SAlex Deucher
12795d0906fSLeo Liu# add VCN block
12895d0906fSLeo Liuamdgpu-y += \
12988b5af70SLeo Liu	amdgpu_vcn.o \
13088b5af70SLeo Liu	vcn_v1_0.o
13195d0906fSLeo Liu
132130e0371SOded Gabbay# add amdkfd interfaces
133130e0371SOded Gabbayamdgpu-y += \
13432c22e99SOded Gabbay	 amdgpu_amdkfd.o \
135d8d019ccSFelix Kuehling	 amdgpu_amdkfd_fence.o \
136a46a2cd1SFelix Kuehling	 amdgpu_amdkfd_gpuvm.o \
137ff758a12SBen Goz	 amdgpu_amdkfd_gfx_v8.o
138130e0371SOded Gabbay
139d03846afSChunming Zhou# add cgs
140d03846afSChunming Zhouamdgpu-y += amdgpu_cgs.o
141d03846afSChunming Zhou
142b80d8475SAlex Deucher# GPU scheduler
1431b1f42d8SLucas Stachamdgpu-y += amdgpu_job.o
144b80d8475SAlex Deucher
145a8fe58ceSMaruthi Bayyavarapu# ACP componet
146a8fe58ceSMaruthi Bayyavarapuifneq ($(CONFIG_DRM_AMD_ACP),)
147a8fe58ceSMaruthi Bayyavarapuamdgpu-y += amdgpu_acp.o
148a8fe58ceSMaruthi Bayyavarapu
149a8fe58ceSMaruthi BayyavarapuAMDACPPATH := ../acp
150a8fe58ceSMaruthi Bayyavarapuinclude $(FULL_AMD_PATH)/acp/Makefile
151a8fe58ceSMaruthi Bayyavarapu
152a8fe58ceSMaruthi Bayyavarapuamdgpu-y += $(AMD_ACP_FILES)
153a8fe58ceSMaruthi Bayyavarapuendif
154a8fe58ceSMaruthi Bayyavarapu
155d38ceaf9SAlex Deucheramdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o
156d38ceaf9SAlex Deucheramdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o
157d38ceaf9SAlex Deucheramdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o
158d38ceaf9SAlex Deucheramdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o
159d38ceaf9SAlex Deucher
160bd90dd89SQiang Yuinclude $(FULL_AMD_PATH)/powerplay/Makefile
1611f7371b2SAlex Deucher
1621f7371b2SAlex Deucheramdgpu-y += $(AMD_POWERPLAY_FILES)
1631f7371b2SAlex Deucher
1644562236bSHarry Wentlandifneq ($(CONFIG_DRM_AMD_DC),)
1654562236bSHarry Wentland
1664562236bSHarry WentlandRELATIVE_AMD_DISPLAY_PATH = ../$(DISPLAY_FOLDER_NAME)
1674562236bSHarry Wentlandinclude $(FULL_AMD_DISPLAY_PATH)/Makefile
1684562236bSHarry Wentland
1694562236bSHarry Wentlandamdgpu-y += $(AMD_DISPLAY_FILES)
1704562236bSHarry Wentland
1714562236bSHarry Wentlandendif
1724562236bSHarry Wentland
173d38ceaf9SAlex Deucherobj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
174