Does FIJI need the golden init?

Thanks!
Xiangliang Yu

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Saturday, February 04, 2017 6:22 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Monk <monk....@amd.com>
> Subject: [PATCH 02/21] drm/amdgpu:fix golden init for sriov
> 
> although only vi supports SRIOV now,but we shouldn't make code has such
> assumption.
> 
> Change-Id: Ie73c185dc2e7f64756253045b32cabe70d618d19
> Signed-off-by: Monk Liu <monk....@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/vi.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c
> b/drivers/gpu/drm/amd/amdgpu/vi.c index 89b0dfe..7810030 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -274,12 +274,6 @@ static void vi_init_golden_registers(struct
> amdgpu_device *adev)
>       /* Some of the registers might be dependent on GRBM_GFX_INDEX
> */
>       mutex_lock(&adev->grbm_idx_mutex);
> 
> -     if (amdgpu_sriov_vf(adev)) {
> -             xgpu_vi_init_golden_registers(adev);
> -             mutex_unlock(&adev->grbm_idx_mutex);
> -             return;
> -     }
> -
>       switch (adev->asic_type) {
>       case CHIP_TOPAZ:
>               amdgpu_program_register_sequence(adev,
> @@ -292,7 +286,10 @@ static void vi_init_golden_registers(struct
> amdgpu_device *adev)
>                                                (const
> u32)ARRAY_SIZE(fiji_mgcg_cgcg_init));
>               break;
>       case CHIP_TONGA:
> -             amdgpu_program_register_sequence(adev,
> +             if (amdgpu_sriov_vf(adev))
> +                     xgpu_vi_init_golden_registers(adev);
> +             else
> +                     amdgpu_program_register_sequence(adev,
>                                                tonga_mgcg_cgcg_init,
>                                                (const
> u32)ARRAY_SIZE(tonga_mgcg_cgcg_init));
>               break;
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to