1*1a09120fSAlex Deucher# 2*1a09120fSAlex Deucher# Copyright 2017 Advanced Micro Devices, Inc. 3*1a09120fSAlex Deucher# 4*1a09120fSAlex Deucher# Permission is hereby granted, free of charge, to any person obtaining a 5*1a09120fSAlex Deucher# copy of this software and associated documentation files (the "Software"), 6*1a09120fSAlex Deucher# to deal in the Software without restriction, including without limitation 7*1a09120fSAlex Deucher# the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*1a09120fSAlex Deucher# and/or sell copies of the Software, and to permit persons to whom the 9*1a09120fSAlex Deucher# Software is furnished to do so, subject to the following conditions: 10*1a09120fSAlex Deucher# 11*1a09120fSAlex Deucher# The above copyright notice and this permission notice shall be included in 12*1a09120fSAlex Deucher# all copies or substantial portions of the Software. 13*1a09120fSAlex Deucher# 14*1a09120fSAlex Deucher# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*1a09120fSAlex Deucher# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*1a09120fSAlex Deucher# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*1a09120fSAlex Deucher# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*1a09120fSAlex Deucher# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*1a09120fSAlex Deucher# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*1a09120fSAlex Deucher# OTHER DEALINGS IN THE SOFTWARE. 21*1a09120fSAlex 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 26288912cbSJammy ZhouFULL_AMD_PATH=$(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 \ 331f7371b2SAlex Deucher -I$(FULL_AMD_PATH)/scheduler \ 34a8fe58ceSMaruthi Bayyavarapu -I$(FULL_AMD_PATH)/powerplay/inc \ 354562236bSHarry Wentland -I$(FULL_AMD_PATH)/acp/include \ 364562236bSHarry Wentland -I$(FULL_AMD_DISPLAY_PATH) \ 374562236bSHarry Wentland -I$(FULL_AMD_DISPLAY_PATH)/include \ 384562236bSHarry Wentland -I$(FULL_AMD_DISPLAY_PATH)/dc \ 394562236bSHarry Wentland -I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm 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 \ 52d38ceaf9SAlex Deucher amdgpu_prime.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 \ 5552c6a62cSAndres Rodriguez amdgpu_queue_mgr.o amdgpu_vf_error.o amdgpu_sched.o 56d38ceaf9SAlex Deucher 57aaa36a97SAlex Deucher# add asic specific block 58e42d8526SAlex Deucheramdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ 5941548ef7SAlex 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 \ 6041548ef7SAlex Deucher amdgpu_amdkfd_gfx_v7.o 61a2e73f56SAlex Deucher 621919696eSMaruthi 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 63a036db18SKen Wang 64aaa36a97SAlex Deucheramdgpu-y += \ 65954d5d43SChunming Zhou vi.o mxgpu_vi.o nbio_v6_1.o soc15.o mxgpu_ai.o nbio_v7_0.o 66aaa36a97SAlex Deucher 67aaa36a97SAlex Deucher# add GMC block 68aaa36a97SAlex Deucheramdgpu-y += \ 69e42d8526SAlex Deucher gmc_v7_0.o \ 70e60f8db5SAlex Xie gmc_v8_0.o \ 71e60f8db5SAlex Xie gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o 72aaa36a97SAlex Deucher 73d38ceaf9SAlex Deucher# add IH block 74d38ceaf9SAlex Deucheramdgpu-y += \ 75d38ceaf9SAlex Deucher amdgpu_irq.o \ 76aaa36a97SAlex Deucher amdgpu_ih.o \ 77aaa36a97SAlex Deucher iceland_ih.o \ 78aaa36a97SAlex Deucher tonga_ih.o \ 79282aae55SKen Wang cz_ih.o \ 80282aae55SKen Wang vega10_ih.o 81d38ceaf9SAlex Deucher 820e5ca0d1SHuang Rui# add PSP block 830e5ca0d1SHuang Ruiamdgpu-y += \ 840e5ca0d1SHuang Rui amdgpu_psp.o \ 85fd341dc5SHuang Rui psp_v3_1.o \ 86fd341dc5SHuang Rui psp_v10_0.o 870e5ca0d1SHuang Rui 88d38ceaf9SAlex Deucher# add SMC block 89d38ceaf9SAlex Deucheramdgpu-y += \ 90aaa36a97SAlex Deucher amdgpu_dpm.o \ 91db7da7aaSRex Zhu amdgpu_powerplay.o 92aaa36a97SAlex Deucher 93aaa36a97SAlex Deucher# add DCE block 94aaa36a97SAlex Deucheramdgpu-y += \ 95aaa36a97SAlex Deucher dce_v10_0.o \ 96c6e14f40SEmily Deng dce_v11_0.o \ 97c6e14f40SEmily Deng dce_virtual.o 98d38ceaf9SAlex Deucher 99d38ceaf9SAlex Deucher# add GFX block 100d38ceaf9SAlex Deucheramdgpu-y += \ 101aaa36a97SAlex Deucher amdgpu_gfx.o \ 102b1023571SKen Wang gfx_v8_0.o \ 103b1023571SKen Wang gfx_v9_0.o 104aaa36a97SAlex Deucher 105aaa36a97SAlex Deucher# add async DMA block 106aaa36a97SAlex Deucheramdgpu-y += \ 107aaa36a97SAlex Deucher sdma_v2_4.o \ 1082130f89cSKen Wang sdma_v3_0.o \ 1092130f89cSKen Wang sdma_v4_0.o 110d38ceaf9SAlex Deucher 111d38ceaf9SAlex Deucher# add UVD block 112d38ceaf9SAlex Deucheramdgpu-y += \ 113aaa36a97SAlex Deucher amdgpu_uvd.o \ 114aaa36a97SAlex Deucher uvd_v5_0.o \ 11509bfb891SLeo Liu uvd_v6_0.o \ 11609bfb891SLeo Liu uvd_v7_0.o 117d38ceaf9SAlex Deucher 118d38ceaf9SAlex Deucher# add VCE block 119d38ceaf9SAlex Deucheramdgpu-y += \ 120aaa36a97SAlex Deucher amdgpu_vce.o \ 121c1dc356aSLeo Liu vce_v3_0.o \ 122c1dc356aSLeo Liu vce_v4_0.o 123d38ceaf9SAlex Deucher 12495d0906fSLeo Liu# add VCN block 12595d0906fSLeo Liuamdgpu-y += \ 12688b5af70SLeo Liu amdgpu_vcn.o \ 12788b5af70SLeo Liu vcn_v1_0.o 12895d0906fSLeo Liu 129130e0371SOded Gabbay# add amdkfd interfaces 130130e0371SOded Gabbayamdgpu-y += \ 13132c22e99SOded Gabbay amdgpu_amdkfd.o \ 132ff758a12SBen Goz amdgpu_amdkfd_gfx_v8.o 133130e0371SOded Gabbay 134d03846afSChunming Zhou# add cgs 135d03846afSChunming Zhouamdgpu-y += amdgpu_cgs.o 136d03846afSChunming Zhou 137b80d8475SAlex Deucher# GPU scheduler 138b80d8475SAlex Deucheramdgpu-y += \ 139c1b69ed0SChunming Zhou ../scheduler/gpu_scheduler.o \ 140f556cb0cSChunming Zhou ../scheduler/sched_fence.o \ 1410856cab1SChristian König amdgpu_job.o 142b80d8475SAlex Deucher 143a8fe58ceSMaruthi Bayyavarapu# ACP componet 144a8fe58ceSMaruthi Bayyavarapuifneq ($(CONFIG_DRM_AMD_ACP),) 145a8fe58ceSMaruthi Bayyavarapuamdgpu-y += amdgpu_acp.o 146a8fe58ceSMaruthi Bayyavarapu 147a8fe58ceSMaruthi BayyavarapuAMDACPPATH := ../acp 148a8fe58ceSMaruthi Bayyavarapuinclude $(FULL_AMD_PATH)/acp/Makefile 149a8fe58ceSMaruthi Bayyavarapu 150a8fe58ceSMaruthi Bayyavarapuamdgpu-y += $(AMD_ACP_FILES) 151a8fe58ceSMaruthi Bayyavarapuendif 152a8fe58ceSMaruthi Bayyavarapu 153d38ceaf9SAlex Deucheramdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o 154d38ceaf9SAlex Deucheramdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o 155d38ceaf9SAlex Deucheramdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o 156d38ceaf9SAlex Deucheramdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o 157d38ceaf9SAlex Deucher 158bd90dd89SQiang Yuinclude $(FULL_AMD_PATH)/powerplay/Makefile 1591f7371b2SAlex Deucher 1601f7371b2SAlex Deucheramdgpu-y += $(AMD_POWERPLAY_FILES) 1611f7371b2SAlex Deucher 1624562236bSHarry Wentlandifneq ($(CONFIG_DRM_AMD_DC),) 1634562236bSHarry Wentland 1644562236bSHarry WentlandRELATIVE_AMD_DISPLAY_PATH = ../$(DISPLAY_FOLDER_NAME) 1654562236bSHarry Wentlandinclude $(FULL_AMD_DISPLAY_PATH)/Makefile 1664562236bSHarry Wentland 1674562236bSHarry Wentlandamdgpu-y += $(AMD_DISPLAY_FILES) 1684562236bSHarry Wentland 1694562236bSHarry Wentlandendif 1704562236bSHarry Wentland 171d38ceaf9SAlex Deucherobj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o 172