[PATCH] drm/amdgpu/sriov: workaround on rev_id for Navi12 under sriov
Alex Deucher
alexdeucher at gmail.com
Wed Jan 8 14:22:39 UTC 2020
On Wed, Jan 8, 2020 at 1:15 AM Tiecheng Zhou <Tiecheng.Zhou at amd.com> wrote:
>
> 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.
>
> Signed-off-by: Tiecheng Zhou <Tiecheng.Zhou at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/nv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
> index b0229543e887..63d54604ace6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nv.c
> @@ -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:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> adev->external_rev_id = adev->rev_id + 0xa;
> break;
> default:
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list