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