Commit 2f294132 authored by Monk Liu's avatar Monk Liu Committed by Alex Deucher

drm/amdgpu: postpone entering fullaccess mode

if host support new handshake we only need to enter
fullaccess_mode in ip_init() part, otherwise we need
to do it before reading vbios (becuase host prepares vbios
for VF only after received REQ_GPU_INIT event under
legacy handshake)
Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
Reviewed-by: default avatarEmily Deng <Emily.Deng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dffa11b4
...@@ -1812,10 +1812,14 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev) ...@@ -1812,10 +1812,14 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
return r; return r;
} }
} }
}
/* we need to send REQ_GPU here for legacy handshaker otherwise the vbios
* will not be prepared by host for this VF */
if (amdgpu_sriov_vf(adev) && adev->virt.req_init_data_ver < 1) {
r = amdgpu_virt_request_full_gpu(adev, true); r = amdgpu_virt_request_full_gpu(adev, true);
if (r) if (r)
return -EAGAIN; return r;
} }
adev->pm.pp_feature = amdgpu_pp_feature_mask; adev->pm.pp_feature = amdgpu_pp_feature_mask;
...@@ -1975,6 +1979,12 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) ...@@ -1975,6 +1979,12 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
if (r) if (r)
return r; return r;
if (amdgpu_sriov_vf(adev) && adev->virt.req_init_data_ver > 0) {
r = amdgpu_virt_request_full_gpu(adev, true);
if (r)
return -EAGAIN;
}
for (i = 0; i < adev->num_ip_blocks; i++) { for (i = 0; i < adev->num_ip_blocks; i++) {
if (!adev->ip_blocks[i].status.valid) if (!adev->ip_blocks[i].status.valid)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment