1# SPDX-License-Identifier: GPL-2.0 2# 3# Makefile for the drm device driver. This driver provides support for the 4# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. 5 6FULL_AMD_PATH=$(src)/.. 7DISPLAY_FOLDER_NAME=display 8FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME) 9 10ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \ 11 -I$(FULL_AMD_PATH)/include \ 12 -I$(FULL_AMD_PATH)/amdgpu \ 13 -I$(FULL_AMD_PATH)/scheduler \ 14 -I$(FULL_AMD_PATH)/powerplay/inc \ 15 -I$(FULL_AMD_PATH)/acp/include \ 16 -I$(FULL_AMD_DISPLAY_PATH) \ 17 -I$(FULL_AMD_DISPLAY_PATH)/include \ 18 -I$(FULL_AMD_DISPLAY_PATH)/dc \ 19 -I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm 20 21amdgpu-y := amdgpu_drv.o 22 23# add KMS driver 24amdgpu-y += amdgpu_device.o amdgpu_kms.o \ 25 amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \ 26 atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \ 27 amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \ 28 amdgpu_fb.o amdgpu_gem.o amdgpu_ring.o \ 29 amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o amdgpu_test.o \ 30 amdgpu_pm.o atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \ 31 atombios_encoders.o amdgpu_sa.o atombios_i2c.o \ 32 amdgpu_prime.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \ 33 amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \ 34 amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \ 35 amdgpu_queue_mgr.o amdgpu_vf_error.o amdgpu_sched.o 36 37# add asic specific block 38amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ 39 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 \ 40 amdgpu_amdkfd_gfx_v7.o 41 42amdgpu-$(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 43 44amdgpu-y += \ 45 vi.o mxgpu_vi.o nbio_v6_1.o soc15.o mxgpu_ai.o nbio_v7_0.o 46 47# add GMC block 48amdgpu-y += \ 49 gmc_v7_0.o \ 50 gmc_v8_0.o \ 51 gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o 52 53# add IH block 54amdgpu-y += \ 55 amdgpu_irq.o \ 56 amdgpu_ih.o \ 57 iceland_ih.o \ 58 tonga_ih.o \ 59 cz_ih.o \ 60 vega10_ih.o 61 62# add PSP block 63amdgpu-y += \ 64 amdgpu_psp.o \ 65 psp_v3_1.o \ 66 psp_v10_0.o 67 68# add SMC block 69amdgpu-y += \ 70 amdgpu_dpm.o \ 71 amdgpu_powerplay.o 72 73# add DCE block 74amdgpu-y += \ 75 dce_v10_0.o \ 76 dce_v11_0.o \ 77 dce_virtual.o 78 79# add GFX block 80amdgpu-y += \ 81 amdgpu_gfx.o \ 82 gfx_v8_0.o \ 83 gfx_v9_0.o 84 85# add async DMA block 86amdgpu-y += \ 87 sdma_v2_4.o \ 88 sdma_v3_0.o \ 89 sdma_v4_0.o 90 91# add UVD block 92amdgpu-y += \ 93 amdgpu_uvd.o \ 94 uvd_v5_0.o \ 95 uvd_v6_0.o \ 96 uvd_v7_0.o 97 98# add VCE block 99amdgpu-y += \ 100 amdgpu_vce.o \ 101 vce_v3_0.o \ 102 vce_v4_0.o 103 104# add VCN block 105amdgpu-y += \ 106 amdgpu_vcn.o \ 107 vcn_v1_0.o 108 109# add amdkfd interfaces 110amdgpu-y += \ 111 amdgpu_amdkfd.o \ 112 amdgpu_amdkfd_gfx_v8.o 113 114# add cgs 115amdgpu-y += amdgpu_cgs.o 116 117# GPU scheduler 118amdgpu-y += \ 119 ../scheduler/gpu_scheduler.o \ 120 ../scheduler/sched_fence.o \ 121 amdgpu_job.o 122 123# ACP componet 124ifneq ($(CONFIG_DRM_AMD_ACP),) 125amdgpu-y += amdgpu_acp.o 126 127AMDACPPATH := ../acp 128include $(FULL_AMD_PATH)/acp/Makefile 129 130amdgpu-y += $(AMD_ACP_FILES) 131endif 132 133amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o 134amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o 135amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o 136amdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o 137 138include $(FULL_AMD_PATH)/powerplay/Makefile 139 140amdgpu-y += $(AMD_POWERPLAY_FILES) 141 142ifneq ($(CONFIG_DRM_AMD_DC),) 143 144RELATIVE_AMD_DISPLAY_PATH = ../$(DISPLAY_FOLDER_NAME) 145include $(FULL_AMD_DISPLAY_PATH)/Makefile 146 147amdgpu-y += $(AMD_DISPLAY_FILES) 148 149endif 150 151obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o 152