Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 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 | |
Jammy Zhou | 288912c | 2015-11-24 16:55:20 +0800 | [diff] [blame] | 5 | FULL_AMD_PATH=$(src)/.. |
| 6 | |
| 7 | ccflags-y := -Iinclude/drm -I$(FULL_AMD_PATH)/include/asic_reg \ |
| 8 | -I$(FULL_AMD_PATH)/include \ |
| 9 | -I$(FULL_AMD_PATH)/amdgpu \ |
Alex Deucher | 1f7371b | 2015-12-02 17:46:21 -0500 | [diff] [blame] | 10 | -I$(FULL_AMD_PATH)/scheduler \ |
Maruthi Bayyavarapu | a8fe58c | 2015-09-22 17:05:20 -0400 | [diff] [blame] | 11 | -I$(FULL_AMD_PATH)/powerplay/inc \ |
| 12 | -I$(FULL_AMD_PATH)/acp/include |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 13 | |
| 14 | amdgpu-y := amdgpu_drv.o |
| 15 | |
| 16 | # add KMS driver |
| 17 | amdgpu-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 Zhou | 2f4b940 | 2016-01-15 11:05:21 +0800 | [diff] [blame] | 24 | atombios_encoders.o amdgpu_sa.o atombios_i2c.o \ |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 25 | amdgpu_prime.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \ |
Christian König | bb990bb | 2016-09-09 16:32:33 +0200 | [diff] [blame] | 26 | amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \ |
Alex Deucher | a5bde2f | 2016-09-23 16:23:41 -0400 | [diff] [blame] | 27 | amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 28 | |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 29 | # add asic specific block |
Alex Deucher | e42d852 | 2016-02-02 10:59:53 -0500 | [diff] [blame] | 30 | amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ |
Alex Deucher | 41548ef | 2015-07-31 17:20:14 -0400 | [diff] [blame] | 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 |
Alex Deucher | a2e73f5 | 2015-04-20 17:09:27 -0400 | [diff] [blame] | 33 | |
Maruthi Srinivas Bayyavarapu | 1919696 | 2016-04-26 20:35:36 +0530 | [diff] [blame] | 34 | amdgpu-$(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 Wang | a036db1 | 2016-01-19 14:19:53 +0800 | [diff] [blame] | 35 | |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 36 | amdgpu-y += \ |
Junwei Zhang | c1d83da | 2017-03-03 17:46:40 -0500 | [diff] [blame] | 37 | vi.o mxgpu_vi.o nbio_v6_1.o |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 38 | |
| 39 | # add GMC block |
| 40 | amdgpu-y += \ |
Alex Deucher | e42d852 | 2016-02-02 10:59:53 -0500 | [diff] [blame] | 41 | gmc_v7_0.o \ |
Alex Xie | e60f8db | 2017-03-09 11:36:26 -0500 | [diff] [blame] | 42 | gmc_v8_0.o \ |
| 43 | gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 44 | |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 45 | # add IH block |
| 46 | amdgpu-y += \ |
| 47 | amdgpu_irq.o \ |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 48 | amdgpu_ih.o \ |
| 49 | iceland_ih.o \ |
| 50 | tonga_ih.o \ |
Ken Wang | 282aae5 | 2017-03-03 18:06:01 -0500 | [diff] [blame] | 51 | cz_ih.o \ |
| 52 | vega10_ih.o |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 53 | |
| 54 | # add SMC block |
| 55 | amdgpu-y += \ |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 56 | amdgpu_dpm.o \ |
Rex Zhu | db7da7a | 2016-12-23 14:07:25 +0800 | [diff] [blame] | 57 | amdgpu_powerplay.o |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 58 | |
| 59 | # add DCE block |
| 60 | amdgpu-y += \ |
| 61 | dce_v10_0.o \ |
Emily Deng | c6e14f4 | 2016-08-08 11:30:50 +0800 | [diff] [blame] | 62 | dce_v11_0.o \ |
| 63 | dce_virtual.o |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 64 | |
| 65 | # add GFX block |
| 66 | amdgpu-y += \ |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 67 | amdgpu_gfx.o \ |
Ken Wang | b102357 | 2017-03-03 17:59:39 -0500 | [diff] [blame] | 68 | gfx_v8_0.o \ |
| 69 | gfx_v9_0.o |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 70 | |
| 71 | # add async DMA block |
| 72 | amdgpu-y += \ |
| 73 | sdma_v2_4.o \ |
Ken Wang | 2130f89 | 2017-03-03 17:31:51 -0500 | [diff] [blame] | 74 | sdma_v3_0.o \ |
| 75 | sdma_v4_0.o |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 76 | |
| 77 | # add UVD block |
| 78 | amdgpu-y += \ |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 79 | amdgpu_uvd.o \ |
| 80 | uvd_v5_0.o \ |
Leo Liu | 09bfb89 | 2017-03-03 18:13:26 -0500 | [diff] [blame^] | 81 | uvd_v6_0.o \ |
| 82 | uvd_v7_0.o |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 83 | |
| 84 | # add VCE block |
| 85 | amdgpu-y += \ |
Alex Deucher | aaa36a9 | 2015-04-20 17:31:14 -0400 | [diff] [blame] | 86 | amdgpu_vce.o \ |
| 87 | vce_v3_0.o |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 88 | |
Oded Gabbay | 130e037 | 2015-06-12 21:35:14 +0300 | [diff] [blame] | 89 | # add amdkfd interfaces |
| 90 | amdgpu-y += \ |
Oded Gabbay | 32c22e9 | 2015-06-12 21:38:22 +0300 | [diff] [blame] | 91 | amdgpu_amdkfd.o \ |
Ben Goz | ff758a1 | 2014-10-07 14:43:07 +0300 | [diff] [blame] | 92 | amdgpu_amdkfd_gfx_v8.o |
Oded Gabbay | 130e037 | 2015-06-12 21:35:14 +0300 | [diff] [blame] | 93 | |
Chunming Zhou | d03846a | 2015-07-28 14:20:03 -0400 | [diff] [blame] | 94 | # add cgs |
| 95 | amdgpu-y += amdgpu_cgs.o |
| 96 | |
Alex Deucher | b80d847 | 2015-08-16 22:55:02 -0400 | [diff] [blame] | 97 | # GPU scheduler |
| 98 | amdgpu-y += \ |
Chunming Zhou | c1b69ed | 2015-07-21 13:45:14 +0800 | [diff] [blame] | 99 | ../scheduler/gpu_scheduler.o \ |
Chunming Zhou | f556cb0c | 2015-08-02 11:18:04 +0800 | [diff] [blame] | 100 | ../scheduler/sched_fence.o \ |
Christian König | 0856cab | 2016-02-01 12:31:01 +0100 | [diff] [blame] | 101 | amdgpu_job.o |
Alex Deucher | b80d847 | 2015-08-16 22:55:02 -0400 | [diff] [blame] | 102 | |
Maruthi Bayyavarapu | a8fe58c | 2015-09-22 17:05:20 -0400 | [diff] [blame] | 103 | # ACP componet |
| 104 | ifneq ($(CONFIG_DRM_AMD_ACP),) |
| 105 | amdgpu-y += amdgpu_acp.o |
| 106 | |
| 107 | AMDACPPATH := ../acp |
| 108 | include $(FULL_AMD_PATH)/acp/Makefile |
| 109 | |
| 110 | amdgpu-y += $(AMD_ACP_FILES) |
| 111 | endif |
| 112 | |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 113 | amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o |
| 114 | amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o |
| 115 | amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o |
| 116 | amdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o |
| 117 | |
Qiang Yu | bd90dd8 | 2015-12-02 10:56:57 +0800 | [diff] [blame] | 118 | include $(FULL_AMD_PATH)/powerplay/Makefile |
Alex Deucher | 1f7371b | 2015-12-02 17:46:21 -0500 | [diff] [blame] | 119 | |
| 120 | amdgpu-y += $(AMD_POWERPLAY_FILES) |
| 121 | |
Alex Deucher | d38ceaf | 2015-04-20 16:55:21 -0400 | [diff] [blame] | 122 | obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o |
| 123 | |
| 124 | CFLAGS_amdgpu_trace_points.o := -I$(src) |