[PATCH 03/10] drm/amdgpu: init rlc save restore as long as the lists exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ray,

After reconsideration, I think for the rlc save restore related, there are the following issues:
1. To use adev->gfx.rlc.reg_list_format_direct_reg_list_length or GFX9_RLC_FORMAT_DIRECT_REG_LIST_LENGTH?
->  "reg_list_format_direct_reg_list_length" is new introduced by rlc v2_1. 
To back compatible with asics(vega12,vega20 and vega10) with rlc v2_0,  i will suggest to use GFX9_RLC_FORMAT_DIRECT_REG_LIST_LENGTH directly.

2. Do we need to consider the gfxoff enable/disable message + old rlc fw case?
Per my observatrion and tests, there will be no harms for such case.
Since gfxoff will actually not take effect if the rlc fw is not ready. So, we do not need to consider back compatibility here.

Conclude all, I do not think we need to update vega12 rlc from v2_0 to v2_1. The below comparations can guard we do not break old vega12 rlc fws.
+	if (adev->gfx.rlc.reg_list_format_size_bytes &&
+	    adev->gfx.rlc.reg_list_size_bytes &&
+	    adev->gfx.rlc.reg_restore_list_size) {

Regards,
Evan
> -----Original Message-----
> From: Huang Rui [mailto:ray.huang at amd.com]
> Sent: Friday, July 06, 2018 6:15 PM
> To: Quan, Evan <Evan.Quan at amd.com>
> Cc: amd-gfx at lists.freedesktop.org
> Subject: Re: [PATCH 03/10] drm/amdgpu: init rlc save restore as long as the
> lists exist
> 
> 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;
> 
> Furthermore, as talked with you, we can continue using "adev-
> >gfx.rlc.is_rlc_v2_1" rlc firmware header version to check if the current asic
> and ucode supported gfxoff, you know, we have to support legacy ucode
> even the driver codes are updated.
> 
> Thanks,
> Ray
> 
> > +	/* init rlc save restore as long as the lists exist */
> > +	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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux