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 2643068cb7SMasahiro YamadaFULL_AMD_PATH=$(srctree)/$(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 \ 3804d5e276SAmber Lin -I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \ 3904d5e276SAmber Lin -I$(FULL_AMD_PATH)/amdkfd 40d38ceaf9SAlex Deucher 41d38ceaf9SAlex Deucheramdgpu-y := amdgpu_drv.o 42d38ceaf9SAlex Deucher 43d38ceaf9SAlex Deucher# add KMS driver 44d38ceaf9SAlex Deucheramdgpu-y += amdgpu_device.o amdgpu_kms.o \ 45d38ceaf9SAlex Deucher amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \ 46d38ceaf9SAlex Deucher atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \ 47d38ceaf9SAlex Deucher amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \ 48d38ceaf9SAlex Deucher amdgpu_fb.o amdgpu_gem.o amdgpu_ring.o \ 49d38ceaf9SAlex Deucher amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o amdgpu_test.o \ 50d38ceaf9SAlex Deucher amdgpu_pm.o atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \ 512f4b9400SChunming Zhou atombios_encoders.o amdgpu_sa.o atombios_i2c.o \ 522fbd6f94SChristian König amdgpu_dma_buf.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \ 53bb990bb0SChristian König amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \ 54effd924dSAndres Rodriguez amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \ 5511c3a249SChristian König amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \ 5647930de4SHawking Zhang amdgpu_gmc.o amdgpu_mmhub.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \ 57128a01f4SArnd Bergmann amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o amdgpu_nbio.o \ 58bd607166SKent Russell amdgpu_umc.o smu_v11_0_i2c.o amdgpu_fru_eeprom.o 59d155bef0SArnd Bergmann 60d155bef0SArnd Bergmannamdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o 61d38ceaf9SAlex Deucher 62aaa36a97SAlex Deucher# add asic specific block 63e42d8526SAlex Deucheramdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ 64bc4b539eSAlex Deucher dce_v8_0.o gfx_v7_0.o cik_sdma.o uvd_v4_2.o vce_v2_0.o 65a2e73f56SAlex Deucher 661919696eSMaruthi 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 67a036db18SKen Wang 68aaa36a97SAlex Deucheramdgpu-y += \ 698ee273e5SFeifei Xu 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 \ 70e78705ecSLe Ma vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o navi10_reg_init.o navi14_reg_init.o \ 71dccdbf3fSLikun Gao arct_reg_init.o navi12_reg_init.o mxgpu_nv.o sienna_cichlid_reg_init.o 72aaa36a97SAlex Deucher 73d99605eaSHawking Zhang# add DF block 74d99605eaSHawking Zhangamdgpu-y += \ 7513b58150SFeifei Xu df_v1_7.o \ 7613b58150SFeifei Xu df_v3_6.o 77d99605eaSHawking Zhang 78aaa36a97SAlex Deucher# add GMC block 79aaa36a97SAlex Deucheramdgpu-y += \ 80e42d8526SAlex Deucher gmc_v7_0.o \ 81e60f8db5SAlex Xie gmc_v8_0.o \ 822cb2ea1eSLe Ma gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o gfxhub_v1_1.o mmhub_v9_4.o \ 83af01d47dSLikun Gao gfxhub_v2_0.o mmhub_v2_0.o gmc_v10_0.o gfxhub_v2_1.o 84aaa36a97SAlex Deucher 859884c2b1SHawking Zhang# add UMC block 869884c2b1SHawking Zhangamdgpu-y += \ 87e7da754bSMonk Liu umc_v6_1.o umc_v6_0.o 889884c2b1SHawking Zhang 89d38ceaf9SAlex Deucher# add IH block 90d38ceaf9SAlex Deucheramdgpu-y += \ 91d38ceaf9SAlex Deucher amdgpu_irq.o \ 92aaa36a97SAlex Deucher amdgpu_ih.o \ 93aaa36a97SAlex Deucher iceland_ih.o \ 94aaa36a97SAlex Deucher tonga_ih.o \ 95282aae55SKen Wang cz_ih.o \ 96edc61147SHawking Zhang vega10_ih.o \ 97edc61147SHawking Zhang navi10_ih.o 98d38ceaf9SAlex Deucher 990e5ca0d1SHuang Rui# add PSP block 1000e5ca0d1SHuang Ruiamdgpu-y += \ 1010e5ca0d1SHuang Rui amdgpu_psp.o \ 102fd341dc5SHuang Rui psp_v3_1.o \ 103654f761cSFeifei Xu psp_v10_0.o \ 1046a7a0bdbSAaron Liu psp_v11_0.o \ 1056a7a0bdbSAaron Liu psp_v12_0.o 1060e5ca0d1SHuang Rui 107d38ceaf9SAlex Deucher# add SMC block 108d38ceaf9SAlex Deucheramdgpu-y += \ 109b905090dSRex Zhu amdgpu_dpm.o 110aaa36a97SAlex Deucher 111aaa36a97SAlex Deucher# add DCE block 112aaa36a97SAlex Deucheramdgpu-y += \ 113aaa36a97SAlex Deucher dce_v10_0.o \ 114c6e14f40SEmily Deng dce_v11_0.o \ 115c6e14f40SEmily Deng dce_virtual.o 116d38ceaf9SAlex Deucher 117d38ceaf9SAlex Deucher# add GFX block 118d38ceaf9SAlex Deucheramdgpu-y += \ 119aaa36a97SAlex Deucher amdgpu_gfx.o \ 12088dfc9a3SLikun Gao amdgpu_rlc.o \ 121b1023571SKen Wang gfx_v8_0.o \ 122a644d85aSHawking Zhang gfx_v9_0.o \ 1234c461d89SDennis Li gfx_v9_4.o \ 124a644d85aSHawking Zhang gfx_v10_0.o 125aaa36a97SAlex Deucher 126aaa36a97SAlex Deucher# add async DMA block 127aaa36a97SAlex Deucheramdgpu-y += \ 128bb7743bcSHuang Rui amdgpu_sdma.o \ 129aaa36a97SAlex Deucher sdma_v2_4.o \ 1302130f89cSKen Wang sdma_v3_0.o \ 131fef6e24cSHawking Zhang sdma_v4_0.o \ 132157e72e8SLikun Gao sdma_v5_0.o \ 133157e72e8SLikun Gao sdma_v5_2.o 134d38ceaf9SAlex Deucher 135886f82aaSJack Xiao# add MES block 136886f82aaSJack Xiaoamdgpu-y += \ 137886f82aaSJack Xiao mes_v10_1.o 138886f82aaSJack Xiao 139d38ceaf9SAlex Deucher# add UVD block 140d38ceaf9SAlex Deucheramdgpu-y += \ 141aaa36a97SAlex Deucher amdgpu_uvd.o \ 142aaa36a97SAlex Deucher uvd_v5_0.o \ 14309bfb891SLeo Liu uvd_v6_0.o \ 14409bfb891SLeo Liu uvd_v7_0.o 145d38ceaf9SAlex Deucher 146d38ceaf9SAlex Deucher# add VCE block 147d38ceaf9SAlex Deucheramdgpu-y += \ 148aaa36a97SAlex Deucher amdgpu_vce.o \ 149c1dc356aSLeo Liu vce_v3_0.o \ 150c1dc356aSLeo Liu vce_v4_0.o 151d38ceaf9SAlex Deucher 1529d9cc9b8SLeo Liu# add VCN and JPEG block 15395d0906fSLeo Liuamdgpu-y += \ 15488b5af70SLeo Liu amdgpu_vcn.o \ 1551b61de45SLeo Liu vcn_v1_0.o \ 15628c17d72SLeo Liu vcn_v2_0.o \ 1579d9cc9b8SLeo Liu vcn_v2_5.o \ 158cf14826cSLeo Liu vcn_v3_0.o \ 159bb0db70fSLeo Liu amdgpu_jpeg.o \ 1606ac27241SLeo Liu jpeg_v1_0.o \ 16114f43e8fSLeo Liu jpeg_v2_0.o \ 162dfd57dbfSLeo Liu jpeg_v2_5.o \ 163dfd57dbfSLeo Liu jpeg_v3_0.o 16495d0906fSLeo Liu 165367adb2aSJack Xiao# add ATHUB block 166367adb2aSJack Xiaoamdgpu-y += \ 167bee7b51aSLe Ma athub_v1_0.o \ 16845d76eebSLikun Gao athub_v2_0.o \ 16945d76eebSLikun Gao athub_v2_1.o 170367adb2aSJack Xiao 171130e0371SOded Gabbay# add amdkfd interfaces 172fcdfa432SOded Gabbayamdgpu-y += amdgpu_amdkfd.o 173fcdfa432SOded Gabbay 174fcdfa432SOded Gabbayifneq ($(CONFIG_HSA_AMD),) 17504d5e276SAmber LinAMDKFD_PATH := ../amdkfd 17604d5e276SAmber Lininclude $(FULL_AMD_PATH)/amdkfd/Makefile 17704d5e276SAmber Linamdgpu-y += $(AMDKFD_FILES) 178130e0371SOded Gabbayamdgpu-y += \ 179d8d019ccSFelix Kuehling amdgpu_amdkfd_fence.o \ 180a46a2cd1SFelix Kuehling amdgpu_amdkfd_gpuvm.o \ 181d5a114a6SFelix Kuehling amdgpu_amdkfd_gfx_v8.o \ 1826bdadb20SHawking Zhang amdgpu_amdkfd_gfx_v9.o \ 1833e205a08SOak Zeng amdgpu_amdkfd_arcturus.o \ 1843a2f0c81SYong Zhao amdgpu_amdkfd_gfx_v10.o \ 1853a2f0c81SYong Zhao amdgpu_amdkfd_gfx_v10_3.o 186130e0371SOded Gabbay 187fcdfa432SOded Gabbayifneq ($(CONFIG_DRM_AMDGPU_CIK),) 188fcdfa432SOded Gabbayamdgpu-y += amdgpu_amdkfd_gfx_v7.o 189fcdfa432SOded Gabbayendif 190fcdfa432SOded Gabbay 191fcdfa432SOded Gabbayendif 192fcdfa432SOded Gabbay 193d03846afSChunming Zhou# add cgs 194d03846afSChunming Zhouamdgpu-y += amdgpu_cgs.o 195d03846afSChunming Zhou 196b80d8475SAlex Deucher# GPU scheduler 1971b1f42d8SLucas Stachamdgpu-y += amdgpu_job.o 198b80d8475SAlex Deucher 199a8fe58ceSMaruthi Bayyavarapu# ACP componet 200a8fe58ceSMaruthi Bayyavarapuifneq ($(CONFIG_DRM_AMD_ACP),) 201a8fe58ceSMaruthi Bayyavarapuamdgpu-y += amdgpu_acp.o 202a8fe58ceSMaruthi Bayyavarapu 203a8fe58ceSMaruthi BayyavarapuAMDACPPATH := ../acp 204a8fe58ceSMaruthi Bayyavarapuinclude $(FULL_AMD_PATH)/acp/Makefile 205a8fe58ceSMaruthi Bayyavarapu 206a8fe58ceSMaruthi Bayyavarapuamdgpu-y += $(AMD_ACP_FILES) 207a8fe58ceSMaruthi Bayyavarapuendif 208a8fe58ceSMaruthi Bayyavarapu 209d38ceaf9SAlex Deucheramdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o 210d38ceaf9SAlex Deucheramdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o 211d38ceaf9SAlex Deucheramdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o 2122c5a51f5SPhilip Yangamdgpu-$(CONFIG_HMM_MIRROR) += amdgpu_mn.o 213d38ceaf9SAlex Deucher 214bd90dd89SQiang Yuinclude $(FULL_AMD_PATH)/powerplay/Makefile 2151f7371b2SAlex Deucher 2161f7371b2SAlex Deucheramdgpu-y += $(AMD_POWERPLAY_FILES) 2171f7371b2SAlex Deucher 2184562236bSHarry Wentlandifneq ($(CONFIG_DRM_AMD_DC),) 2194562236bSHarry Wentland 2204562236bSHarry WentlandRELATIVE_AMD_DISPLAY_PATH = ../$(DISPLAY_FOLDER_NAME) 2214562236bSHarry Wentlandinclude $(FULL_AMD_DISPLAY_PATH)/Makefile 2224562236bSHarry Wentland 2234562236bSHarry Wentlandamdgpu-y += $(AMD_DISPLAY_FILES) 2244562236bSHarry Wentland 2254562236bSHarry Wentlandendif 2264562236bSHarry Wentland 227d38ceaf9SAlex Deucherobj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o 228