drm/amdgpu: indirect register access for nv12 sriov

[ Upstream commit 8b8a162da820d48bb94261ae4684f2c839ce148c ]

unify host driver and guest driver indirect access
control bits names

Signed-off-by: Peng Ju Zhou <PengJu.Zhou@amd.com>
Reviewed-by: Emily.Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Peng Ju Zhou
2021-03-29 15:47:20 +08:00
committed by Greg Kroah-Hartman
parent 9f55f36f74
commit 87a4e51fb8
2 changed files with 13 additions and 0 deletions

View File

@@ -2047,6 +2047,11 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0); amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
return r; return r;
} }
/*get pf2vf msg info at it's earliest time*/
if (amdgpu_sriov_vf(adev))
amdgpu_virt_init_data_exchange(adev);
} }
} }

View File

@@ -615,6 +615,14 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)
if (adev->virt.ras_init_done) if (adev->virt.ras_init_done)
amdgpu_virt_add_bad_page(adev, bp_block_offset, bp_block_size); amdgpu_virt_add_bad_page(adev, bp_block_offset, bp_block_size);
} }
} else if (adev->bios != NULL) {
adev->virt.fw_reserve.p_pf2vf =
(struct amd_sriov_msg_pf2vf_info_header *)
(adev->bios + (AMD_SRIOV_MSG_PF2VF_OFFSET_KB << 10));
amdgpu_virt_read_pf2vf_data(adev);
return;
} }
if (adev->virt.vf2pf_update_interval_ms != 0) { if (adev->virt.vf2pf_update_interval_ms != 0) {