Add Kconfig for user configure and add Makefile to compile GPU virtualization code and wires it into amdpgu modules. Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com> --- drivers/gpu/drm/amd/amdgpu/Makefile | 7 +++++++ drivers/gpu/drm/amd/mxgpu/Kconfig | 13 +++++++++++++ drivers/gpu/drm/amd/mxgpu/Makefile | 11 +++++++++++ 3 files changed, 31 insertions(+) create mode 100644 drivers/gpu/drm/amd/mxgpu/Kconfig create mode 100644 drivers/gpu/drm/amd/mxgpu/Makefile diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 635ff94..f67dbbf 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -88,6 +88,13 @@ amdgpu-y += \ amdgpu_vce.o \ vce_v3_0.o +# MxGPU componet +ifneq ($(CONFIG_DRM_AMD_MXGPU),) +MxGPU_PATH = ../mxgpu +include $(FULL_AMD_PATH)/mxgpu/Makefile +amdgpu-y += $(AMD_Mx_GPU_FILES) +endif + # add amdkfd interfaces amdgpu-y += \ amdgpu_amdkfd.o \ diff --git a/drivers/gpu/drm/amd/mxgpu/Kconfig b/drivers/gpu/drm/amd/mxgpu/Kconfig new file mode 100644 index 0000000..190b575 --- /dev/null +++ b/drivers/gpu/drm/amd/mxgpu/Kconfig @@ -0,0 +1,13 @@ +menu "AMD GPU virtualization Configuration" + +config DRM_AMD_MXGPU + bool "Enable AMD GPU virtualization support" + depends on DRM_AMDGPU + help + Choose this option if you want to enable experimental support + for AMD GPU virtualization. + This adds AMD GPU virtualization driver and wires it up into + the amdgpu drivers. User can load the driver in guest OS and + run graphics applications on AMD hardware in guest mode. + +endmenu diff --git a/drivers/gpu/drm/amd/mxgpu/Makefile b/drivers/gpu/drm/amd/mxgpu/Makefile new file mode 100644 index 0000000..1e7fc18 --- /dev/null +++ b/drivers/gpu/drm/amd/mxgpu/Makefile @@ -0,0 +1,11 @@ +# +# Makefile for Mxgpu +# + +subdir-ccflags-y += -I$(MxGPU_PATH)/ + +MxGPU = amd_mxgpu.o mxgpu_kiq.o mxgpu_csa.o mxgpu_mb.o mxgpu_vi.o + +AMD_MxGPU = $(addprefix $(MxGPU_PATH)/,$(MxGPU)) + +AMD_Mx_GPU_FILES := $(AMD_MxGPU) -- 2.7.4