xref: /linux-6.15/drivers/gpu/drm/amd/amdgpu/Makefile (revision 2f4b9400)
1d38ceaf9SAlex Deucher#
2d38ceaf9SAlex Deucher# Makefile for the drm device driver.  This driver provides support for the
3d38ceaf9SAlex Deucher# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
4d38ceaf9SAlex Deucher
5288912cbSJammy ZhouFULL_AMD_PATH=$(src)/..
6288912cbSJammy Zhou
7288912cbSJammy Zhouccflags-y := -Iinclude/drm -I$(FULL_AMD_PATH)/include/asic_reg \
8288912cbSJammy Zhou	-I$(FULL_AMD_PATH)/include \
9288912cbSJammy Zhou	-I$(FULL_AMD_PATH)/amdgpu \
101f7371b2SAlex Deucher	-I$(FULL_AMD_PATH)/scheduler \
111f7371b2SAlex Deucher	-I$(FULL_AMD_PATH)/powerplay/inc
12d38ceaf9SAlex Deucher
13d38ceaf9SAlex Deucheramdgpu-y := amdgpu_drv.o
14d38ceaf9SAlex Deucher
15d38ceaf9SAlex Deucher# add KMS driver
16d38ceaf9SAlex Deucheramdgpu-y += amdgpu_device.o amdgpu_kms.o \
17d38ceaf9SAlex Deucher	amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \
18d38ceaf9SAlex Deucher	atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \
19d38ceaf9SAlex Deucher	amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \
20d38ceaf9SAlex Deucher	amdgpu_fb.o amdgpu_gem.o amdgpu_ring.o \
21d38ceaf9SAlex Deucher	amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o amdgpu_test.o \
22d38ceaf9SAlex Deucher	amdgpu_pm.o atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \
23*2f4b9400SChunming Zhou	atombios_encoders.o amdgpu_sa.o atombios_i2c.o \
24d38ceaf9SAlex Deucher	amdgpu_prime.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \
25d38ceaf9SAlex Deucher	amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o
26d38ceaf9SAlex Deucher
27aaa36a97SAlex Deucher# add asic specific block
28e42d8526SAlex Deucheramdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \
2941548ef7SAlex 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 \
3041548ef7SAlex Deucher	amdgpu_amdkfd_gfx_v7.o
31a2e73f56SAlex Deucher
32aaa36a97SAlex Deucheramdgpu-y += \
33aaa36a97SAlex Deucher	vi.o
34aaa36a97SAlex Deucher
35aaa36a97SAlex Deucher# add GMC block
36aaa36a97SAlex Deucheramdgpu-y += \
37e42d8526SAlex Deucher	gmc_v7_0.o \
38aaa36a97SAlex Deucher	gmc_v8_0.o
39aaa36a97SAlex Deucher
40d38ceaf9SAlex Deucher# add IH block
41d38ceaf9SAlex Deucheramdgpu-y += \
42d38ceaf9SAlex Deucher	amdgpu_irq.o \
43aaa36a97SAlex Deucher	amdgpu_ih.o \
44aaa36a97SAlex Deucher	iceland_ih.o \
45aaa36a97SAlex Deucher	tonga_ih.o \
46aaa36a97SAlex Deucher	cz_ih.o
47d38ceaf9SAlex Deucher
48d38ceaf9SAlex Deucher# add SMC block
49d38ceaf9SAlex Deucheramdgpu-y += \
50aaa36a97SAlex Deucher	amdgpu_dpm.o \
511f7371b2SAlex Deucher	amdgpu_powerplay.o \
52aaa36a97SAlex Deucher	cz_smc.o cz_dpm.o \
53aaa36a97SAlex Deucher	tonga_smc.o tonga_dpm.o \
548e711e1aSDavid Zhang	fiji_smc.o fiji_dpm.o \
55aaa36a97SAlex Deucher	iceland_smc.o iceland_dpm.o
56aaa36a97SAlex Deucher
57aaa36a97SAlex Deucher# add DCE block
58aaa36a97SAlex Deucheramdgpu-y += \
59aaa36a97SAlex Deucher	dce_v10_0.o \
60aaa36a97SAlex Deucher	dce_v11_0.o
61d38ceaf9SAlex Deucher
62d38ceaf9SAlex Deucher# add GFX block
63d38ceaf9SAlex Deucheramdgpu-y += \
64aaa36a97SAlex Deucher	amdgpu_gfx.o \
65aaa36a97SAlex Deucher	gfx_v8_0.o
66aaa36a97SAlex Deucher
67aaa36a97SAlex Deucher# add async DMA block
68aaa36a97SAlex Deucheramdgpu-y += \
69aaa36a97SAlex Deucher	sdma_v2_4.o \
70aaa36a97SAlex Deucher	sdma_v3_0.o
71d38ceaf9SAlex Deucher
72d38ceaf9SAlex Deucher# add UVD block
73d38ceaf9SAlex Deucheramdgpu-y += \
74aaa36a97SAlex Deucher	amdgpu_uvd.o \
75aaa36a97SAlex Deucher	uvd_v5_0.o \
76aaa36a97SAlex Deucher	uvd_v6_0.o
77d38ceaf9SAlex Deucher
78d38ceaf9SAlex Deucher# add VCE block
79d38ceaf9SAlex Deucheramdgpu-y += \
80aaa36a97SAlex Deucher	amdgpu_vce.o \
81aaa36a97SAlex Deucher	vce_v3_0.o
82d38ceaf9SAlex Deucher
83130e0371SOded Gabbay# add amdkfd interfaces
84130e0371SOded Gabbayamdgpu-y += \
8532c22e99SOded Gabbay	 amdgpu_amdkfd.o \
86ff758a12SBen Goz	 amdgpu_amdkfd_gfx_v8.o
87130e0371SOded Gabbay
88d03846afSChunming Zhou# add cgs
89d03846afSChunming Zhouamdgpu-y += amdgpu_cgs.o
90d03846afSChunming Zhou
91b80d8475SAlex Deucher# GPU scheduler
92b80d8475SAlex Deucheramdgpu-y += \
93c1b69ed0SChunming Zhou	../scheduler/gpu_scheduler.o \
94f556cb0cSChunming Zhou	../scheduler/sched_fence.o \
95c1b69ed0SChunming Zhou	amdgpu_sched.o
96b80d8475SAlex Deucher
97d38ceaf9SAlex Deucheramdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o
98d38ceaf9SAlex Deucheramdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o
99d38ceaf9SAlex Deucheramdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o
100d38ceaf9SAlex Deucheramdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o
101d38ceaf9SAlex Deucher
1021f7371b2SAlex Deucherifneq ($(CONFIG_DRM_AMD_POWERPLAY),)
1031f7371b2SAlex Deucher
104bd90dd89SQiang Yuinclude $(FULL_AMD_PATH)/powerplay/Makefile
1051f7371b2SAlex Deucher
1061f7371b2SAlex Deucheramdgpu-y += $(AMD_POWERPLAY_FILES)
1071f7371b2SAlex Deucher
1081f7371b2SAlex Deucherendif
1091f7371b2SAlex Deucher
110d38ceaf9SAlex Deucherobj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
111d38ceaf9SAlex Deucher
112d38ceaf9SAlex DeucherCFLAGS_amdgpu_trace_points.o := -I$(src)
113