[PATCH 03/10] drm/amdgpu: init rlc save restore as long as the lists exist
Huang Rui
ray.huang at amd.com
Thu Jul 5 15:19:05 UTC 2018
On Thu, Jul 05, 2018 at 05:09:28PM +0800, Evan Quan wrote:
> It does not have to be rlc v2_1 and pg enabled. For rlc v2_0, rlc
> save restore is also needed. And pg support is definitely not a
> must for rlc save restore.
>
> Change-Id: I85c0e3525ca7fb385c3d0b9e5abc13708c91e795
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 2f6ac255203f..8d895afa6c69 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -2184,8 +2184,13 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)
> {
> gfx_v9_0_init_csb(adev);
>
> - if (!adev->gfx.rlc.is_rlc_v2_1)
> - return;
> + /* init rlc save restore as long as the lists exist */
Is there any case if the save restore list not exist?
As far as I know, it should be always existed.
Thanks,
Ray
> + if (adev->gfx.rlc.reg_list_format_size_bytes &&
> + adev->gfx.rlc.reg_list_size_bytes &&
> + adev->gfx.rlc.reg_restore_list_size) {
> + gfx_v9_1_init_rlc_save_restore_list(adev);
> + gfx_v9_0_enable_save_restore_machine(adev);
> + }
>
> if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG |
> AMD_PG_SUPPORT_GFX_SMG |
> @@ -2193,9 +2198,6 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)
> AMD_PG_SUPPORT_CP |
> AMD_PG_SUPPORT_GDS |
> AMD_PG_SUPPORT_RLC_SMU_HS)) {
> - gfx_v9_1_init_rlc_save_restore_list(adev);
> - gfx_v9_0_enable_save_restore_machine(adev);
> -
> WREG32(mmRLC_JUMP_TABLE_RESTORE,
> adev->gfx.rlc.cp_table_gpu_addr >> 8);
> gfx_v9_0_init_gfx_power_gating(adev);
> --
> 2.18.0
>
> _______________________________________________
> 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