summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/nv.c
diff options
context:
space:
mode:
authorWenhui Sheng <Wenhui.Sheng@amd.com>2020-06-23 11:35:05 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-07-02 12:02:50 -0400
commitc1299461b7d68eed457478ddf3e93bbd89e5c3ca (patch)
tree2b260fc0942bff3730c35dcbbaa1b06dedfee17f /drivers/gpu/drm/amd/amdgpu/nv.c
parent81659b2022cbdd7491f9480ab15afd38b91281d5 (diff)
downloadlinux-c1299461b7d68eed457478ddf3e93bbd89e5c3ca.tar.gz
linux-c1299461b7d68eed457478ddf3e93bbd89e5c3ca.tar.bz2
linux-c1299461b7d68eed457478ddf3e93bbd89e5c3ca.zip
drm/amdgpu: request init data in virt detection
Move request init data to virt detection func, so we can insert request full access between request init data and set ip blocks. Signed-off-by: Wenhui Sheng <Wenhui.Sheng@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/nv.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/nv.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index a7cfe3ac7cb6..4b87506cb005 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -420,6 +420,11 @@ legacy_init:
return 0;
}
+void nv_set_virt_ops(struct amdgpu_device *adev)
+{
+ adev->virt.ops = &xgpu_nv_virt_ops;
+}
+
int nv_set_ip_blocks(struct amdgpu_device *adev)
{
int r;
@@ -427,12 +432,6 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
adev->nbio.funcs = &nbio_v2_3_funcs;
adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg;
- if (amdgpu_sriov_vf(adev)) {
- adev->virt.ops = &xgpu_nv_virt_ops;
- /* try send GPU_INIT_DATA request to host */
- amdgpu_virt_request_init_data(adev);
- }
-
/* Set IP register base before any HW register access */
r = nv_reg_base_init(adev);
if (r)