blob: 82047fce2db12591c39aae5fdd93018dfef786d3 [file] [log] [blame]
Alex Deucherd38ceaf2015-04-20 16:55:21 -04001#
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
Jammy Zhou288912c2015-11-24 16:55:20 +08005FULL_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 \
Alex Deucher1f7371b2015-12-02 17:46:21 -050010 -I$(FULL_AMD_PATH)/scheduler \
Maruthi Bayyavarapua8fe58c2015-09-22 17:05:20 -040011 -I$(FULL_AMD_PATH)/powerplay/inc \
12 -I$(FULL_AMD_PATH)/acp/include
Alex Deucherd38ceaf2015-04-20 16:55:21 -040013
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 \
Chunming Zhou2f4b9402016-01-15 11:05:21 +080024 atombios_encoders.o amdgpu_sa.o atombios_i2c.o \
Alex Deucherd38ceaf2015-04-20 16:55:21 -040025 amdgpu_prime.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \
Christian Königbb990bb2016-09-09 16:32:33 +020026 amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \
Alex Deuchera5bde2f2016-09-23 16:23:41 -040027 amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o
Alex Deucherd38ceaf2015-04-20 16:55:21 -040028
Alex Deucheraaa36a92015-04-20 17:31:14 -040029# add asic specific block
Alex Deuchere42d8522016-02-02 10:59:53 -050030amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \
Alex Deucher41548ef2015-07-31 17:20:14 -040031 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
Alex Deuchera2e73f52015-04-20 17:09:27 -040033
Maruthi Srinivas Bayyavarapu19196962016-04-26 20:35:36 +053034amdgpu-$(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
Ken Wanga036db12016-01-19 14:19:53 +080035
Alex Deucheraaa36a92015-04-20 17:31:14 -040036amdgpu-y += \
Junwei Zhangc1d83da2017-03-03 17:46:40 -050037 vi.o mxgpu_vi.o nbio_v6_1.o
Alex Deucheraaa36a92015-04-20 17:31:14 -040038
39# add GMC block
40amdgpu-y += \
Alex Deuchere42d8522016-02-02 10:59:53 -050041 gmc_v7_0.o \
Alex Xiee60f8db2017-03-09 11:36:26 -050042 gmc_v8_0.o \
43 gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o
Alex Deucheraaa36a92015-04-20 17:31:14 -040044
Alex Deucherd38ceaf2015-04-20 16:55:21 -040045# add IH block
46amdgpu-y += \
47 amdgpu_irq.o \
Alex Deucheraaa36a92015-04-20 17:31:14 -040048 amdgpu_ih.o \
49 iceland_ih.o \
50 tonga_ih.o \
51 cz_ih.o
Alex Deucherd38ceaf2015-04-20 16:55:21 -040052
53# add SMC block
54amdgpu-y += \
Alex Deucheraaa36a92015-04-20 17:31:14 -040055 amdgpu_dpm.o \
Rex Zhudb7da7a2016-12-23 14:07:25 +080056 amdgpu_powerplay.o
Alex Deucheraaa36a92015-04-20 17:31:14 -040057
58# add DCE block
59amdgpu-y += \
60 dce_v10_0.o \
Emily Dengc6e14f42016-08-08 11:30:50 +080061 dce_v11_0.o \
62 dce_virtual.o
Alex Deucherd38ceaf2015-04-20 16:55:21 -040063
64# add GFX block
65amdgpu-y += \
Alex Deucheraaa36a92015-04-20 17:31:14 -040066 amdgpu_gfx.o \
Ken Wangb1023572017-03-03 17:59:39 -050067 gfx_v8_0.o \
68 gfx_v9_0.o
Alex Deucheraaa36a92015-04-20 17:31:14 -040069
70# add async DMA block
71amdgpu-y += \
72 sdma_v2_4.o \
Ken Wang2130f892017-03-03 17:31:51 -050073 sdma_v3_0.o \
74 sdma_v4_0.o
Alex Deucherd38ceaf2015-04-20 16:55:21 -040075
76# add UVD block
77amdgpu-y += \
Alex Deucheraaa36a92015-04-20 17:31:14 -040078 amdgpu_uvd.o \
79 uvd_v5_0.o \
80 uvd_v6_0.o
Alex Deucherd38ceaf2015-04-20 16:55:21 -040081
82# add VCE block
83amdgpu-y += \
Alex Deucheraaa36a92015-04-20 17:31:14 -040084 amdgpu_vce.o \
85 vce_v3_0.o
Alex Deucherd38ceaf2015-04-20 16:55:21 -040086
Oded Gabbay130e0372015-06-12 21:35:14 +030087# add amdkfd interfaces
88amdgpu-y += \
Oded Gabbay32c22e92015-06-12 21:38:22 +030089 amdgpu_amdkfd.o \
Ben Gozff758a12014-10-07 14:43:07 +030090 amdgpu_amdkfd_gfx_v8.o
Oded Gabbay130e0372015-06-12 21:35:14 +030091
Chunming Zhoud03846a2015-07-28 14:20:03 -040092# add cgs
93amdgpu-y += amdgpu_cgs.o
94
Alex Deucherb80d8472015-08-16 22:55:02 -040095# GPU scheduler
96amdgpu-y += \
Chunming Zhouc1b69ed2015-07-21 13:45:14 +080097 ../scheduler/gpu_scheduler.o \
Chunming Zhouf556cb0c2015-08-02 11:18:04 +080098 ../scheduler/sched_fence.o \
Christian König0856cab2016-02-01 12:31:01 +010099 amdgpu_job.o
Alex Deucherb80d8472015-08-16 22:55:02 -0400100
Maruthi Bayyavarapua8fe58c2015-09-22 17:05:20 -0400101# ACP componet
102ifneq ($(CONFIG_DRM_AMD_ACP),)
103amdgpu-y += amdgpu_acp.o
104
105AMDACPPATH := ../acp
106include $(FULL_AMD_PATH)/acp/Makefile
107
108amdgpu-y += $(AMD_ACP_FILES)
109endif
110
Alex Deucherd38ceaf2015-04-20 16:55:21 -0400111amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o
112amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o
113amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o
114amdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o
115
Qiang Yubd90dd82015-12-02 10:56:57 +0800116include $(FULL_AMD_PATH)/powerplay/Makefile
Alex Deucher1f7371b2015-12-02 17:46:21 -0500117
118amdgpu-y += $(AMD_POWERPLAY_FILES)
119
Alex Deucherd38ceaf2015-04-20 16:55:21 -0400120obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
121
122CFLAGS_amdgpu_trace_points.o := -I$(src)