mirror of https://gitee.com/openkylin/linux.git
drm/amdgpu/sriov: workaround on rev_id for Navi12 under sriov
guest vm gets 0xffffffff when reading RCC_DEV0_EPF0_STRAP0, as a consequence, the rev_id and external_rev_id are wrong. workaround it by hardcoding the rev_id to 0, which is the default value. v2. add comment in the code Signed-off-by: Tiecheng Zhou <Tiecheng.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2d5ef0b42c
commit
df5e984c8b
|
@ -726,6 +726,12 @@ static int nv_common_early_init(void *handle)
|
|||
AMD_PG_SUPPORT_VCN_DPG |
|
||||
AMD_PG_SUPPORT_JPEG |
|
||||
AMD_PG_SUPPORT_ATHUB;
|
||||
/* guest vm gets 0xffffffff when reading RCC_DEV0_EPF0_STRAP0,
|
||||
* as a consequence, the rev_id and external_rev_id are wrong.
|
||||
* workaround it by hardcoding rev_id to 0 (default value).
|
||||
*/
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
adev->rev_id = 0;
|
||||
adev->external_rev_id = adev->rev_id + 0xa;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue