drm/amdgpu: add clockgating support for NBIO v7.7.1
Subsystems (2)
PATCH 1/1 drm/amdgpu: add clockgating support for NBIO v7.7.1
add clockgating support for NBIO ip 7.7.1 and modify if condition.
--- drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c +2 -2
@@ -254,7 +254,7 @@ static void nbio_v7_7_update_medium_grain_clock_gating(struct amdgpu_device *ade {uint32_t def, data; -if (enable && !(adev->cg_flags &AMD_CG_SUPPORT_BIF_MGCG )) +if (!(adev->cg_flags &AMD_CG_SUPPORT_BIF_MGCG ))return ; def = data =RREG32_SOC15 (NBIO ,0 , regBIF0_CPM_CONTROL);
@@ -283,7 +283,7 @@ static void nbio_v7_7_update_medium_grain_light_sleep(struct amdgpu_device *adev {uint32_t def, data; -if (enable && !(adev->cg_flags &AMD_CG_SUPPORT_BIF_LS )) +if (!(adev->cg_flags &AMD_CG_SUPPORT_BIF_LS ))return ; def = data =RREG32_SOC15 (NBIO ,0 , regBIF0_PCIE_CNTL2);
drivers/gpu/drm/amd/amdgpu/soc21.c +1 -0
@@ -863,6 +863,7 @@ static int soc21_common_set_clockgating_state(void *handle,case IP_VERSION (4 ,3 ,0 ):case IP_VERSION (4 ,3 ,1 ):case IP_VERSION (7 ,7 ,0 ): +case IP_VERSION (7 ,7 ,1 ): adev->nbio.funcs->update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ); adev->nbio.funcs->update_medium_grain_light_sleep(adev,
Signature · 1 line
2.25.1
[Public]
Best Regards,
Tim Huang
-----Original Message-----
From: Ma, Li <[email protected]>
Sent: Tuesday, October 17, 2023 6:09 PM
To: [email protected]
Cc: Zhang, Yifan <[email protected]>; Huang, Tim <[email protected]>; Ma, Li <[email protected]>
Subject: [PATCH] drm/amdgpu: add clockgating support for NBIO v7.7.1
add clockgating support for NBIO ip 7.7.1 and modify if condition.
--- drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c +1 -1
@@ -254,7 +254,7 @@ static void nbio_v7_7_update_medium_grain_clock_gating(struct amdgpu_device *ade {uint32_t def, data; -if (enable && !(adev->cg_flags &AMD_CG_SUPPORT_BIF_MGCG )) +if (!(adev->cg_flags &AMD_CG_SUPPORT_BIF_MGCG ))return ; def = data = RREG32_SOC15(NBIO, 0, regBIF0_CPM_CONTROL); @@ -283,7 +283,7 @@ static void nbio_v7_7_update_medium_grain_light_sleep(struct amdgpu_device *adev {uint32_t def, data;
- if (enable && !(adev->cg_flags & AMD_CG_SUPPORT_BIF_LS))
+ if (!(adev->cg_flags & AMD_CG_SUPPORT_BIF_LS))
return;
def = data = RREG32_SOC15(NBIO, 0, regBIF0_PCIE_CNTL2); diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.cindex df7462cec6ab..3ab188067d84 100644
drivers/gpu/drm/amd/amdgpu/soc21.c +1 -0
@@ -863,6 +863,7 @@ static int soc21_common_set_clockgating_state(void *handle,case IP_VERSION (4 ,3 ,0 ):case IP_VERSION (4 ,3 ,1 ):case IP_VERSION (7 ,7 ,0 ): +case IP_VERSION (7 ,7 ,1 ): adev->nbio.funcs->update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ); adev->nbio.funcs->update_medium_grain_light_sleep(adev,
--
2.25.1
[AMD Official Use Only - General]
Please separate feature enabling and code cleaning to two patches. With that fixed this patch is :
-----Original Message-----
From: Ma, Li <[email protected]>
Sent: Tuesday, October 17, 2023 6:09 PM
To: [email protected]
Cc: Zhang, Yifan <[email protected]>; Huang, Tim <[email protected]>; Ma, Li <[email protected]>
Subject: [PATCH] drm/amdgpu: add clockgating support for NBIO v7.7.1
add clockgating support for NBIO ip 7.7.1 and modify if condition.
--- drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c +1 -1
@@ -254,7 +254,7 @@ static void nbio_v7_7_update_medium_grain_clock_gating(struct amdgpu_device *ade {uint32_t def, data; -if (enable && !(adev->cg_flags &AMD_CG_SUPPORT_BIF_MGCG )) +if (!(adev->cg_flags &AMD_CG_SUPPORT_BIF_MGCG ))return ; def = data = RREG32_SOC15(NBIO, 0, regBIF0_CPM_CONTROL); @@ -283,7 +283,7 @@ static void nbio_v7_7_update_medium_grain_light_sleep(struct amdgpu_device *adev {uint32_t def, data;
- if (enable && !(adev->cg_flags & AMD_CG_SUPPORT_BIF_LS))
+ if (!(adev->cg_flags & AMD_CG_SUPPORT_BIF_LS))
return;
def = data = RREG32_SOC15(NBIO, 0, regBIF0_PCIE_CNTL2); diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.cindex df7462cec6ab..3ab188067d84 100644
drivers/gpu/drm/amd/amdgpu/soc21.c +1 -0
@@ -863,6 +863,7 @@ static int soc21_common_set_clockgating_state(void *handle,case IP_VERSION (4 ,3 ,0 ):case IP_VERSION (4 ,3 ,1 ):case IP_VERSION (7 ,7 ,0 ): +case IP_VERSION (7 ,7 ,1 ): adev->nbio.funcs->update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ); adev->nbio.funcs->update_medium_grain_light_sleep(adev,
--
2.25.1