Commit 0cfce240 authored by Yiqing Yao's avatar Yiqing Yao Committed by Alex Deucher

drm/amdgpu: Clean up soc21 early init for SRIOV

Use virt_init_setting instead of per ip version setting.
Signed-off-by: default avatarYiqing Yao <yiqing.yao@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9a1662f5
...@@ -584,10 +584,6 @@ static int soc21_common_early_init(void *handle) ...@@ -584,10 +584,6 @@ static int soc21_common_early_init(void *handle)
AMD_PG_SUPPORT_JPEG | AMD_PG_SUPPORT_JPEG |
AMD_PG_SUPPORT_ATHUB | AMD_PG_SUPPORT_ATHUB |
AMD_PG_SUPPORT_MMHUB; AMD_PG_SUPPORT_MMHUB;
if (amdgpu_sriov_vf(adev)) {
adev->cg_flags = 0;
adev->pg_flags = 0;
}
adev->external_rev_id = adev->rev_id + 0x1; // TODO: need update adev->external_rev_id = adev->rev_id + 0x1; // TODO: need update
break; break;
case IP_VERSION(11, 0, 2): case IP_VERSION(11, 0, 2):
...@@ -645,11 +641,6 @@ static int soc21_common_early_init(void *handle) ...@@ -645,11 +641,6 @@ static int soc21_common_early_init(void *handle)
adev->pg_flags = AMD_PG_SUPPORT_VCN | adev->pg_flags = AMD_PG_SUPPORT_VCN |
AMD_PG_SUPPORT_VCN_DPG | AMD_PG_SUPPORT_VCN_DPG |
AMD_PG_SUPPORT_JPEG; AMD_PG_SUPPORT_JPEG;
if (amdgpu_sriov_vf(adev)) {
/* hypervisor control CG and PG enablement */
adev->cg_flags = 0;
adev->pg_flags = 0;
}
adev->external_rev_id = adev->rev_id + 0x20; adev->external_rev_id = adev->rev_id + 0x20;
break; break;
default: default:
...@@ -657,6 +648,9 @@ static int soc21_common_early_init(void *handle) ...@@ -657,6 +648,9 @@ static int soc21_common_early_init(void *handle)
return -EINVAL; return -EINVAL;
} }
if (amdgpu_sriov_vf(adev))
amdgpu_virt_init_setting(adev);
return 0; return 0;
} }
......
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