From: Xiangliang Yu Date: Wed, 8 Mar 2017 07:06:47 +0000 (+0800) Subject: drm/amdgpu/soc15: init virt ops for vf X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1a34465c8691efc39196d37736cb09a255b98f0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu/soc15: init virt ops for vf If gpu device is vf, set virt ops so that guest can talk with GPU hypervisor. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 0986ea59cca2..333edbf564df 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -58,6 +58,7 @@ #include "uvd_v7_0.h" #include "vce_v4_0.h" #include "amdgpu_powerplay.h" +#include "mxgpu_ai.h" MODULE_FIRMWARE("amdgpu/vega10_smc.bin"); @@ -471,6 +472,9 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev) { nbio_v6_1_detect_hw_virt(adev); + if (amdgpu_sriov_vf(adev)) + adev->virt.ops = &xgpu_ai_virt_ops; + switch (adev->asic_type) { case CHIP_VEGA10: amdgpu_ip_block_add(adev, &vega10_common_ip_block);