aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorHorace Chen <horace.chen@amd.com>2017-10-09 04:17:16 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-19 15:26:59 -0400
commit2dc8f81e4f822cfe8f6475da968ab2dd5881b8d8 (patch)
tree6598c1b183930a262552b4609172d97c690fc543 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent0ae94444c08a0adf2fab4aab26be0646ee445a19 (diff)
drm/amdgpu: SR-IOV data exchange between PF&VF
SR-IOV need to exchange some data between PF&VF through shared VRAM PF will copy some necessary firmware and information to the shared VRAM. It also requires some information from VF. PF will send a key through mailbox2 to help guest calculate checksum so that it can verify whether the data is correct. So check the data on the specified offset of the shared VRAM, if the checksum is right, read values from it and write some VF information next to the data from PF. Signed-off-by: Horace Chen <horace.chen@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 1f793eb301ef..9cdaba4af216 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2300,6 +2300,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2300 if (r) 2300 if (r)
2301 DRM_ERROR("ib ring test failed (%d).\n", r); 2301 DRM_ERROR("ib ring test failed (%d).\n", r);
2302 2302
2303 if (amdgpu_sriov_vf(adev))
2304 amdgpu_virt_init_data_exchange(adev);
2305
2303 amdgpu_fbdev_init(adev); 2306 amdgpu_fbdev_init(adev);
2304 2307
2305 r = amdgpu_pm_sysfs_init(adev); 2308 r = amdgpu_pm_sysfs_init(adev);