xref: /linux/drivers/gpu/drm/amd/amdgpu/Makefile (revision c316cf670491def52a396d3bdc5a63ad01f7fefa)
1#
2# Makefile for the drm device driver.  This driver provides support for the
3# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
4
5FULL_AMD_PATH=$(src)/..
6
7ccflags-y := -Iinclude/drm -I$(FULL_AMD_PATH)/include/asic_reg \
8	-I$(FULL_AMD_PATH)/include \
9	-I$(FULL_AMD_PATH)/amdgpu \
10	-I$(FULL_AMD_PATH)/scheduler \
11	-I$(FULL_AMD_PATH)/powerplay/inc \
12	-I$(FULL_AMD_PATH)/acp/include
13
14amdgpu-y := amdgpu_drv.o
15
16# add KMS driver
17amdgpu-y += amdgpu_device.o amdgpu_kms.o \
18	amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \
19	atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \
20	amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \
21	amdgpu_fb.o amdgpu_gem.o amdgpu_ring.o \
22	amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o amdgpu_test.o \
23	amdgpu_pm.o atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \
24	atombios_encoders.o amdgpu_sa.o atombios_i2c.o \
25	amdgpu_prime.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \
26	amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \
27	amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o
28
29# add asic specific block
30amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \
31	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 \
32	amdgpu_amdkfd_gfx_v7.o
33
34amdgpu-$(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
35
36amdgpu-y += \
37	vi.o mxgpu_vi.o nbio_v6_1.o soc15.o mxgpu_ai.o
38
39# add GMC block
40amdgpu-y += \
41	gmc_v7_0.o \
42	gmc_v8_0.o \
43	gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o
44
45# add IH block
46amdgpu-y += \
47	amdgpu_irq.o \
48	amdgpu_ih.o \
49	iceland_ih.o \
50	tonga_ih.o \
51	cz_ih.o \
52	vega10_ih.o
53
54# add PSP block
55amdgpu-y += \
56	amdgpu_psp.o \
57	psp_v3_1.o
58
59# add SMC block
60amdgpu-y += \
61	amdgpu_dpm.o \
62	amdgpu_powerplay.o
63
64# add DCE block
65amdgpu-y += \
66	dce_v10_0.o \
67	dce_v11_0.o \
68	dce_virtual.o
69
70# add GFX block
71amdgpu-y += \
72	amdgpu_gfx.o \
73	gfx_v8_0.o \
74	gfx_v9_0.o
75
76# add async DMA block
77amdgpu-y += \
78	sdma_v2_4.o \
79	sdma_v3_0.o \
80	sdma_v4_0.o
81
82# add UVD block
83amdgpu-y += \
84	amdgpu_uvd.o \
85	uvd_v5_0.o \
86	uvd_v6_0.o \
87	uvd_v7_0.o
88
89# add VCE block
90amdgpu-y += \
91	amdgpu_vce.o \
92	vce_v3_0.o \
93	vce_v4_0.o
94
95# add amdkfd interfaces
96amdgpu-y += \
97	 amdgpu_amdkfd.o \
98	 amdgpu_amdkfd_gfx_v8.o
99
100# add cgs
101amdgpu-y += amdgpu_cgs.o
102
103# GPU scheduler
104amdgpu-y += \
105	../scheduler/gpu_scheduler.o \
106	../scheduler/sched_fence.o \
107	amdgpu_job.o
108
109# ACP componet
110ifneq ($(CONFIG_DRM_AMD_ACP),)
111amdgpu-y += amdgpu_acp.o
112
113AMDACPPATH := ../acp
114include $(FULL_AMD_PATH)/acp/Makefile
115
116amdgpu-y += $(AMD_ACP_FILES)
117endif
118
119amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o
120amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o
121amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o
122amdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o
123
124include $(FULL_AMD_PATH)/powerplay/Makefile
125
126amdgpu-y += $(AMD_POWERPLAY_FILES)
127
128obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
129
130CFLAGS_amdgpu_trace_points.o := -I$(src)
131