1 1.1 riastrad # 2 1.3 riastrad # Copyright 2017 Advanced Micro Devices, Inc. 3 1.3 riastrad # 4 1.3 riastrad # Permission is hereby granted, free of charge, to any person obtaining a 5 1.3 riastrad # copy of this software and associated documentation files (the "Software"), 6 1.3 riastrad # to deal in the Software without restriction, including without limitation 7 1.3 riastrad # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 1.3 riastrad # and/or sell copies of the Software, and to permit persons to whom the 9 1.3 riastrad # Software is furnished to do so, subject to the following conditions: 10 1.3 riastrad # 11 1.3 riastrad # The above copyright notice and this permission notice shall be included in 12 1.3 riastrad # all copies or substantial portions of the Software. 13 1.3 riastrad # 14 1.3 riastrad # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 1.3 riastrad # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 1.3 riastrad # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 1.3 riastrad # THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 1.3 riastrad # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 1.3 riastrad # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 1.3 riastrad # OTHER DEALINGS IN THE SOFTWARE. 21 1.3 riastrad # 22 1.3 riastrad # 23 1.1 riastrad # Makefile for the drm device driver. This driver provides support for the 24 1.1 riastrad # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. 25 1.1 riastrad 26 1.3 riastrad FULL_AMD_PATH=$(srctree)/$(src)/.. 27 1.3 riastrad DISPLAY_FOLDER_NAME=display 28 1.3 riastrad FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME) 29 1.3 riastrad 30 1.3 riastrad ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \ 31 1.3 riastrad -I$(FULL_AMD_PATH)/include \ 32 1.3 riastrad -I$(FULL_AMD_PATH)/amdgpu \ 33 1.3 riastrad -I$(FULL_AMD_PATH)/powerplay/inc \ 34 1.3 riastrad -I$(FULL_AMD_PATH)/acp/include \ 35 1.3 riastrad -I$(FULL_AMD_DISPLAY_PATH) \ 36 1.3 riastrad -I$(FULL_AMD_DISPLAY_PATH)/include \ 37 1.3 riastrad -I$(FULL_AMD_DISPLAY_PATH)/dc \ 38 1.3 riastrad -I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \ 39 1.3 riastrad -I$(FULL_AMD_PATH)/amdkfd 40 1.1 riastrad 41 1.1 riastrad amdgpu-y := amdgpu_drv.o 42 1.1 riastrad 43 1.1 riastrad # add KMS driver 44 1.1 riastrad amdgpu-y += amdgpu_device.o amdgpu_kms.o \ 45 1.1 riastrad amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \ 46 1.1 riastrad atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \ 47 1.1 riastrad amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \ 48 1.1 riastrad amdgpu_fb.o amdgpu_gem.o amdgpu_ring.o \ 49 1.1 riastrad amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o amdgpu_test.o \ 50 1.1 riastrad amdgpu_pm.o atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \ 51 1.3 riastrad atombios_encoders.o amdgpu_sa.o atombios_i2c.o \ 52 1.3 riastrad amdgpu_dma_buf.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \ 53 1.3 riastrad amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \ 54 1.3 riastrad amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \ 55 1.3 riastrad amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \ 56 1.3 riastrad amdgpu_gmc.o amdgpu_mmhub.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \ 57 1.3 riastrad amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o amdgpu_nbio.o \ 58 1.3 riastrad amdgpu_umc.o smu_v11_0_i2c.o 59 1.3 riastrad 60 1.3 riastrad amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o 61 1.1 riastrad 62 1.1 riastrad # add asic specific block 63 1.1 riastrad amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ 64 1.3 riastrad dce_v8_0.o gfx_v7_0.o cik_sdma.o uvd_v4_2.o vce_v2_0.o 65 1.3 riastrad 66 1.3 riastrad 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 67 1.3 riastrad 68 1.3 riastrad amdgpu-y += \ 69 1.3 riastrad 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 \ 70 1.3 riastrad vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o navi10_reg_init.o navi14_reg_init.o \ 71 1.3 riastrad arct_reg_init.o navi12_reg_init.o mxgpu_nv.o 72 1.1 riastrad 73 1.3 riastrad # add DF block 74 1.1 riastrad amdgpu-y += \ 75 1.3 riastrad df_v1_7.o \ 76 1.3 riastrad df_v3_6.o 77 1.1 riastrad 78 1.1 riastrad # add GMC block 79 1.1 riastrad amdgpu-y += \ 80 1.1 riastrad gmc_v7_0.o \ 81 1.3 riastrad gmc_v8_0.o \ 82 1.3 riastrad gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o gfxhub_v1_1.o mmhub_v9_4.o \ 83 1.3 riastrad gfxhub_v2_0.o mmhub_v2_0.o gmc_v10_0.o 84 1.3 riastrad 85 1.3 riastrad # add UMC block 86 1.3 riastrad amdgpu-y += \ 87 1.3 riastrad umc_v6_1.o umc_v6_0.o 88 1.1 riastrad 89 1.1 riastrad # add IH block 90 1.1 riastrad amdgpu-y += \ 91 1.1 riastrad amdgpu_irq.o \ 92 1.1 riastrad amdgpu_ih.o \ 93 1.1 riastrad iceland_ih.o \ 94 1.1 riastrad tonga_ih.o \ 95 1.3 riastrad cz_ih.o \ 96 1.3 riastrad vega10_ih.o \ 97 1.3 riastrad navi10_ih.o 98 1.3 riastrad 99 1.3 riastrad # add PSP block 100 1.3 riastrad amdgpu-y += \ 101 1.3 riastrad amdgpu_psp.o \ 102 1.3 riastrad psp_v3_1.o \ 103 1.3 riastrad psp_v10_0.o \ 104 1.3 riastrad psp_v11_0.o \ 105 1.3 riastrad psp_v12_0.o 106 1.1 riastrad 107 1.1 riastrad # add SMC block 108 1.1 riastrad amdgpu-y += \ 109 1.3 riastrad amdgpu_dpm.o 110 1.1 riastrad 111 1.1 riastrad # add DCE block 112 1.1 riastrad amdgpu-y += \ 113 1.1 riastrad dce_v10_0.o \ 114 1.3 riastrad dce_v11_0.o \ 115 1.3 riastrad dce_virtual.o 116 1.1 riastrad 117 1.1 riastrad # add GFX block 118 1.1 riastrad amdgpu-y += \ 119 1.1 riastrad amdgpu_gfx.o \ 120 1.3 riastrad amdgpu_rlc.o \ 121 1.3 riastrad gfx_v8_0.o \ 122 1.3 riastrad gfx_v9_0.o \ 123 1.3 riastrad gfx_v9_4.o \ 124 1.3 riastrad gfx_v10_0.o 125 1.1 riastrad 126 1.1 riastrad # add async DMA block 127 1.1 riastrad amdgpu-y += \ 128 1.3 riastrad amdgpu_sdma.o \ 129 1.1 riastrad sdma_v2_4.o \ 130 1.3 riastrad sdma_v3_0.o \ 131 1.3 riastrad sdma_v4_0.o \ 132 1.3 riastrad sdma_v5_0.o 133 1.3 riastrad 134 1.3 riastrad # add MES block 135 1.3 riastrad amdgpu-y += \ 136 1.3 riastrad mes_v10_1.o 137 1.1 riastrad 138 1.1 riastrad # add UVD block 139 1.1 riastrad amdgpu-y += \ 140 1.1 riastrad amdgpu_uvd.o \ 141 1.1 riastrad uvd_v5_0.o \ 142 1.3 riastrad uvd_v6_0.o \ 143 1.3 riastrad uvd_v7_0.o 144 1.1 riastrad 145 1.1 riastrad # add VCE block 146 1.1 riastrad amdgpu-y += \ 147 1.1 riastrad amdgpu_vce.o \ 148 1.3 riastrad vce_v3_0.o \ 149 1.3 riastrad vce_v4_0.o 150 1.3 riastrad 151 1.3 riastrad # add VCN and JPEG block 152 1.3 riastrad amdgpu-y += \ 153 1.3 riastrad amdgpu_vcn.o \ 154 1.3 riastrad vcn_v1_0.o \ 155 1.3 riastrad vcn_v2_0.o \ 156 1.3 riastrad vcn_v2_5.o \ 157 1.3 riastrad amdgpu_jpeg.o \ 158 1.3 riastrad jpeg_v1_0.o \ 159 1.3 riastrad jpeg_v2_0.o \ 160 1.3 riastrad jpeg_v2_5.o 161 1.3 riastrad 162 1.3 riastrad # add ATHUB block 163 1.3 riastrad amdgpu-y += \ 164 1.3 riastrad athub_v1_0.o \ 165 1.3 riastrad athub_v2_0.o 166 1.1 riastrad 167 1.1 riastrad # add amdkfd interfaces 168 1.3 riastrad amdgpu-y += amdgpu_amdkfd.o 169 1.3 riastrad 170 1.3 riastrad ifneq ($(CONFIG_HSA_AMD),) 171 1.3 riastrad AMDKFD_PATH := ../amdkfd 172 1.3 riastrad include $(FULL_AMD_PATH)/amdkfd/Makefile 173 1.3 riastrad amdgpu-y += $(AMDKFD_FILES) 174 1.3 riastrad amdgpu-y += \ 175 1.3 riastrad amdgpu_amdkfd_fence.o \ 176 1.3 riastrad amdgpu_amdkfd_gpuvm.o \ 177 1.3 riastrad amdgpu_amdkfd_gfx_v8.o \ 178 1.3 riastrad amdgpu_amdkfd_gfx_v9.o \ 179 1.3 riastrad amdgpu_amdkfd_arcturus.o \ 180 1.3 riastrad amdgpu_amdkfd_gfx_v10.o 181 1.3 riastrad 182 1.3 riastrad ifneq ($(CONFIG_DRM_AMDGPU_CIK),) 183 1.3 riastrad amdgpu-y += amdgpu_amdkfd_gfx_v7.o 184 1.3 riastrad endif 185 1.3 riastrad 186 1.3 riastrad endif 187 1.1 riastrad 188 1.1 riastrad # add cgs 189 1.1 riastrad amdgpu-y += amdgpu_cgs.o 190 1.1 riastrad 191 1.1 riastrad # GPU scheduler 192 1.3 riastrad amdgpu-y += amdgpu_job.o 193 1.3 riastrad 194 1.3 riastrad # ACP componet 195 1.3 riastrad ifneq ($(CONFIG_DRM_AMD_ACP),) 196 1.3 riastrad amdgpu-y += amdgpu_acp.o 197 1.3 riastrad 198 1.3 riastrad AMDACPPATH := ../acp 199 1.3 riastrad include $(FULL_AMD_PATH)/acp/Makefile 200 1.3 riastrad 201 1.3 riastrad amdgpu-y += $(AMD_ACP_FILES) 202 1.3 riastrad endif 203 1.1 riastrad 204 1.1 riastrad amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o 205 1.1 riastrad amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o 206 1.1 riastrad amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o 207 1.3 riastrad amdgpu-$(CONFIG_HMM_MIRROR) += amdgpu_mn.o 208 1.3 riastrad 209 1.3 riastrad include $(FULL_AMD_PATH)/powerplay/Makefile 210 1.3 riastrad 211 1.3 riastrad amdgpu-y += $(AMD_POWERPLAY_FILES) 212 1.3 riastrad 213 1.3 riastrad ifneq ($(CONFIG_DRM_AMD_DC),) 214 1.3 riastrad 215 1.3 riastrad RELATIVE_AMD_DISPLAY_PATH = ../$(DISPLAY_FOLDER_NAME) 216 1.3 riastrad include $(FULL_AMD_DISPLAY_PATH)/Makefile 217 1.3 riastrad 218 1.3 riastrad amdgpu-y += $(AMD_DISPLAY_FILES) 219 1.3 riastrad 220 1.3 riastrad endif 221 1.1 riastrad 222 1.1 riastrad obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o 223