AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Su, Jinzhou (Joe)" <Jinzhou.Su@amd.com>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: Add RLC_PG_DELAY_3 for Vangogh
Date: Tue, 19 Jan 2021 22:08:42 +0800	[thread overview]
Message-ID: <20210119140842.GB34485@hr-amd> (raw)
In-Reply-To: <20210119104854.24380-1-Jinzhou.Su@amd.com>

On Tue, Jan 19, 2021 at 06:48:54PM +0800, Su, Jinzhou (Joe) wrote:
> Copy from RLC MAS:

Remove this line.

> 
> Driver should enable the CGPG feature for RLC while it is in
> safe mode to prevent any misalignment or conflict while it is
> in middle of any power feature entry/exit sequence. This can
> be achieved by setting RLC_PG_CNTL.GFX_POWER_GATING_ENABLE = 0x1,
> and RLC_PG_DELAY_3.CGCG_ACTIVE_BEFORE_CGPG to the desired CGPG
> hysteresis value in refclk count.
> 
> Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index c4314e25f560..23a11ec40c33 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -120,6 +120,7 @@
>  #define mmSPI_CONFIG_CNTL_Vangogh_BASE_IDX       1
>  #define mmGCR_GENERAL_CNTL_Vangogh               0x1580
>  #define mmGCR_GENERAL_CNTL_Vangogh_BASE_IDX      0
> +#define RLC_PG_DELAY_3__CGCG_ACTIVE_BEFORE_CGPG_MASK_Vangogh   0x0000FFFFL
>  
>  #define mmCP_HYP_PFP_UCODE_ADDR			0x5814
>  #define mmCP_HYP_PFP_UCODE_ADDR_BASE_IDX	1
> @@ -7829,6 +7830,17 @@ static void gfx_v10_cntl_power_gating(struct amdgpu_device *adev, bool enable)
>  		data &= ~RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK;
>  
>  	WREG32_SOC15(GC, 0, mmRLC_PG_CNTL, data);
> +
> +	/*
> +	 * CGPG enablement required and the register to program the hysteresis value
> +	 * RLC_PG_DELAY_3.CGCG_ACTIVE_BEFORE_CGPG to the desired CGPG hysteresis value
> +	 * in refclk count. Note that RLC FW is modified to take 16 bits from
> +	 * RLC_PG_DELAY_3[15:0] as the hysteresis instead of just 8 bits.
> +	 */
> +	if (enable && (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG) && adev->asic_type == CHIP_VANGOGH) {
> +		data = 0x4E20 & RLC_PG_DELAY_3__CGCG_ACTIVE_BEFORE_CGPG_MASK_Vangogh;

How can you get the "0x4E20" here?

Thanks,
Ray

> +		WREG32_SOC15(GC, 0, mmRLC_PG_DELAY_3, data);
> +	}
>  }
>  
>  static void gfx_v10_cntl_pg(struct amdgpu_device *adev, bool enable)
> -- 
> 2.17.1
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-01-19 14:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 10:48 [PATCH] drm/amdgpu: Add RLC_PG_DELAY_3 for Vangogh Jinzhou Su
2021-01-19 14:08 ` Huang Rui [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-20  3:09 Jinzhou Su
2021-01-20  3:14 ` Huang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210119140842.GB34485@hr-amd \
    --to=ray.huang@amd.com \
    --cc=Jinzhou.Su@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox