summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2022-04-07 09:51:41 -0400
committerAlex Deucher <alexander.deucher@amd.com>2022-05-04 10:02:56 -0400
commitd6b9a91f5d1bd9f8027dbab1119a3a51f0afed26 (patch)
tree98350ba2c04ed66341ea8373cddbdf43578ac084
parent550bb28e64a0200dbc04476fac880f86f914ad36 (diff)
drm/amdgpu: add FGCG support
Add the CG flag for Fine Grained Clock Gating. Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/include/amd_shared.h1
-rw-r--r--drivers/gpu/drm/amd/pm/amdgpu_pm.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
index 9086df53660c..9ae4060a9d0f 100644
--- a/drivers/gpu/drm/amd/include/amd_shared.h
+++ b/drivers/gpu/drm/amd/include/amd_shared.h
@@ -148,6 +148,7 @@ enum amd_powergating_state {
#define AMD_CG_SUPPORT_ATHUB_MGCG (1ULL << 29)
#define AMD_CG_SUPPORT_JPEG_MGCG (1ULL << 30)
#define AMD_CG_SUPPORT_GFX_FGCG (1ULL << 31)
+#define AMD_CG_SUPPORT_REPEATER_FGCG (1ULL << 32)
/* PG flags */
#define AMD_PG_SUPPORT_GFX_PG (1 << 0)
#define AMD_PG_SUPPORT_GFX_SMG (1 << 1)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 05f1ac355ba8..e92d07f88048 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -66,6 +66,7 @@ static const struct cg_flag_name clocks[] = {
{AMD_CG_SUPPORT_HDP_SD, "Host Data Path Shutdown"},
{AMD_CG_SUPPORT_IH_CG, "Interrupt Handler Clock Gating"},
{AMD_CG_SUPPORT_JPEG_MGCG, "JPEG Medium Grain Clock Gating"},
+ {AMD_CG_SUPPORT_REPEATER_FGCG, "Repeater Fine Grain Clock Gating"},
{AMD_CG_SUPPORT_ATHUB_MGCG, "Address Translation Hub Medium Grain Clock Gating"},
{AMD_CG_SUPPORT_ATHUB_LS, "Address Translation Hub Light Sleep"},