drm/amdgpu/sriov: workaround on rev_id for Navi12 under sriov
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +2 -0
@@ -726,6 +726,8 @@ static int nv_common_early_init(void *handle)AMD_PG_SUPPORT_VCN_DPG |AMD_PG_SUPPORT_JPEG |AMD_PG_SUPPORT_ATHUB ; +if (amdgpu_sriov_vf (adev)) + adev->rev_id =0 ; adev->external_rev_id = adev->rev_id +0xa ;break ;default :
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 16 lines · Tiecheng Zhou
guest vm gets
0xffffffffwhen readingRCC_DEV0_EPF0_STRAP0, as a consequence, therev_idandexternal_rev_idare wrong.workaround it by hardcoding the
rev_idto 0, which is the default value.Signed-off-by Tiecheng Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/nv.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/nv.c +0
-0
drivers/gpu/drm/amd/amdgpu/nv.c static int nv_common_early_init(void *handle) · line 730
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/nv.c +2
-0@@ -726,6 +726,8 @@ static int nv_common_early_init(void *handle)AMD_PG_SUPPORT_VCN_DPG |AMD_PG_SUPPORT_JPEG |AMD_PG_SUPPORT_ATHUB ; +if (amdgpu_sriov_vf (adev)) + adev->rev_id =0 ;
Please add a comment explaining this here so it's clear why we are doing this. With that added:
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/nv.c +0
-1adev->external_rev_id = adev->rev_id +0xa ;break ;default : --2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx