* [PATCH 2/4] drm/amdgpu: Remove is_idle (trivial cases)
2026-08-15 18:00 [PATCH 0/4] drm/amdgpu: Remove is_idle method linux
2026-08-15 18:00 ` [PATCH 1/4] drm/amdgpu: Remove is_idle test case linux
@ 2026-08-15 18:00 ` linux
2026-08-15 18:00 ` [PATCH 3/4] drm/amdgpu: Remove is_idle (non trivial functions) linux
2026-08-15 18:00 ` [PATCH 4/4] drm/amdgpu: Remove is_idle linux
3 siblings, 0 replies; 7+ messages in thread
From: linux @ 2026-08-15 18:00 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, harry.wentland, sunpeng.li,
amd-gfx
Cc: airlied, simona, dri-devel, linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
The is_idle method on amd_ip_funcs is never called.
Remove the trivial cases where either:
a) It's just a return true function that can be deleted
together with the .is_init =
b) The function is called somewhere else, so we just remove
the assignment.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 ------
drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 ------
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 ------
drivers/gpu/drm/amd/amdgpu/cik.c | 7 -------
drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 -
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 ------
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 6 ------
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 6 ------
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 1 -
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 1 -
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 7 -------
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 7 -------
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 7 -------
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 -------
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 7 -------
drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 7 -------
drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 7 -------
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 2 --
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c | 1 -
drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 7 -------
drivers/gpu/drm/amd/amdgpu/nv.c | 6 ------
drivers/gpu/drm/amd/amdgpu/si.c | 6 ------
drivers/gpu/drm/amd/amdgpu/si_dma.c | 1 -
drivers/gpu/drm/amd/amdgpu/si_ih.c | 1 -
drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ------
drivers/gpu/drm/amd/amdgpu/soc21.c | 6 ------
drivers/gpu/drm/amd/amdgpu/soc24.c | 6 ------
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 6 ------
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/vce_v1_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 --
drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 -------
drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 7 -------
drivers/gpu/drm/amd/amdgpu/vi.c | 6 ------
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 --------
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 -
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 6 ------
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 7 -------
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 6 ------
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
57 files changed, 213 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index 9014678d75ab..e475bf2bd1a0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@ -588,11 +588,6 @@ static int acp_resume(struct amdgpu_ip_block *ip_block)
return 0;
}
-static bool acp_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int acp_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -618,7 +613,6 @@ static const struct amd_ip_funcs acp_ip_funcs = {
.hw_fini = acp_hw_fini,
.suspend = acp_suspend,
.resume = acp_resume,
- .is_idle = acp_is_idle,
.set_clockgating_state = acp_set_clockgating_state,
.set_powergating_state = acp_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c
index 532f83d783d1..976b65f90bc1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c
@@ -126,11 +126,6 @@ static int isp_early_init(struct amdgpu_ip_block *ip_block)
return 0;
}
-static bool isp_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int isp_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -345,7 +340,6 @@ static const struct amd_ip_funcs isp_ip_funcs = {
.early_init = isp_early_init,
.hw_init = isp_hw_init,
.hw_fini = isp_hw_fini,
- .is_idle = isp_is_idle,
.suspend = isp_suspend,
.resume = isp_resume,
.set_clockgating_state = isp_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index c835504fdf2b..d6b51b3f216b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -508,11 +508,6 @@ static int amdgpu_vkms_resume(struct amdgpu_ip_block *ip_block)
return drm_mode_config_helper_resume(adev_to_drm(ip_block->adev));
}
-static bool amdgpu_vkms_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int amdgpu_vkms_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -533,7 +528,6 @@ static const struct amd_ip_funcs amdgpu_vkms_ip_funcs = {
.hw_fini = amdgpu_vkms_hw_fini,
.suspend = amdgpu_vkms_suspend,
.resume = amdgpu_vkms_resume,
- .is_idle = amdgpu_vkms_is_idle,
.set_clockgating_state = amdgpu_vkms_set_clockgating_state,
.set_powergating_state = amdgpu_vkms_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c
index e037c08c8547..d29991a4af4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik.c
@@ -2137,12 +2137,6 @@ static int cik_common_resume(struct amdgpu_ip_block *ip_block)
return cik_common_hw_init(ip_block);
}
-static bool cik_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
-
static int cik_common_soft_reset(struct amdgpu_ip_block *ip_block)
{
@@ -2168,7 +2162,6 @@ static const struct amd_ip_funcs cik_common_ip_funcs = {
.hw_init = cik_common_hw_init,
.hw_fini = cik_common_hw_fini,
.resume = cik_common_resume,
- .is_idle = cik_common_is_idle,
.soft_reset = cik_common_soft_reset,
.set_clockgating_state = cik_common_set_clockgating_state,
.set_powergating_state = cik_common_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index b951328d94cf..824ccac9f9f5 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -1225,7 +1225,6 @@ static const struct amd_ip_funcs cik_sdma_ip_funcs = {
.hw_fini = cik_sdma_hw_fini,
.suspend = cik_sdma_suspend,
.resume = cik_sdma_resume,
- .is_idle = cik_sdma_is_idle,
.wait_for_idle = cik_sdma_wait_for_idle,
.soft_reset = cik_sdma_soft_reset,
.set_clockgating_state = cik_sdma_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
index f2977fe6d824..7de7adc8f225 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
@@ -2921,11 +2921,6 @@ static int dce_v10_0_resume(struct amdgpu_ip_block *ip_block)
return amdgpu_display_resume_helper(adev);
}
-static bool dce_v10_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static void dce_v10_0_set_crtc_vblank_interrupt_state(struct amdgpu_device *adev,
int crtc,
enum amdgpu_interrupt_state state)
@@ -3267,7 +3262,6 @@ static const struct amd_ip_funcs dce_v10_0_ip_funcs = {
.hw_fini = dce_v10_0_hw_fini,
.suspend = dce_v10_0_suspend,
.resume = dce_v10_0_resume,
- .is_idle = dce_v10_0_is_idle,
.set_clockgating_state = dce_v10_0_set_clockgating_state,
.set_powergating_state = dce_v10_0_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
index c68de0fe1d7d..3c1d6901127d 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
@@ -2867,11 +2867,6 @@ static int dce_v6_0_resume(struct amdgpu_ip_block *ip_block)
return amdgpu_display_resume_helper(adev);
}
-static bool dce_v6_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static void dce_v6_0_set_crtc_vblank_interrupt_state(struct amdgpu_device *adev,
int crtc,
enum amdgpu_interrupt_state state)
@@ -3167,7 +3162,6 @@ static const struct amd_ip_funcs dce_v6_0_ip_funcs = {
.hw_fini = dce_v6_0_hw_fini,
.suspend = dce_v6_0_suspend,
.resume = dce_v6_0_resume,
- .is_idle = dce_v6_0_is_idle,
.set_clockgating_state = dce_v6_0_set_clockgating_state,
.set_powergating_state = dce_v6_0_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index c3906270f25e..a17944d5e843 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -2839,11 +2839,6 @@ static int dce_v8_0_resume(struct amdgpu_ip_block *ip_block)
return amdgpu_display_resume_helper(adev);
}
-static bool dce_v8_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static void dce_v8_0_set_crtc_vblank_interrupt_state(struct amdgpu_device *adev,
int crtc,
enum amdgpu_interrupt_state state)
@@ -3184,7 +3179,6 @@ static const struct amd_ip_funcs dce_v8_0_ip_funcs = {
.hw_fini = dce_v8_0_hw_fini,
.suspend = dce_v8_0_suspend,
.resume = dce_v8_0_resume,
- .is_idle = dce_v8_0_is_idle,
.set_clockgating_state = dce_v8_0_set_clockgating_state,
.set_powergating_state = dce_v8_0_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index e49d8a79045c..9dd7a3335719 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -4186,7 +4186,6 @@ static const struct amd_ip_funcs gfx_v12_1_ip_funcs = {
.hw_fini = gfx_v12_1_hw_fini,
.suspend = gfx_v12_1_suspend,
.resume = gfx_v12_1_resume,
- .is_idle = gfx_v12_1_is_idle,
.wait_for_idle = gfx_v12_1_wait_for_idle,
.set_clockgating_state = gfx_v12_1_set_clockgating_state,
.set_powergating_state = gfx_v12_1_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 563abcf718b7..6c98de9d9747 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -3665,7 +3665,6 @@ static const struct amd_ip_funcs gfx_v6_0_ip_funcs = {
.hw_fini = gfx_v6_0_hw_fini,
.suspend = gfx_v6_0_suspend,
.resume = gfx_v6_0_resume,
- .is_idle = gfx_v6_0_is_idle,
.wait_for_idle = gfx_v6_0_wait_for_idle,
.soft_reset = gfx_v6_0_soft_reset,
.set_clockgating_state = gfx_v6_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 6cf427995078..f7c2b149acd0 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -6762,7 +6762,6 @@ static const struct amd_ip_funcs gfx_v8_0_ip_funcs = {
.hw_fini = gfx_v8_0_hw_fini,
.suspend = gfx_v8_0_suspend,
.resume = gfx_v8_0_resume,
- .is_idle = gfx_v8_0_is_idle,
.wait_for_idle = gfx_v8_0_wait_for_idle,
.soft_reset = gfx_v8_0_soft_reset,
.set_clockgating_state = gfx_v8_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index c3322058720f..a4365e26120a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -7528,7 +7528,6 @@ static const struct amd_ip_funcs gfx_v9_0_ip_funcs = {
.hw_fini = gfx_v9_0_hw_fini,
.suspend = gfx_v9_0_suspend,
.resume = gfx_v9_0_resume,
- .is_idle = gfx_v9_0_is_idle,
.wait_for_idle = gfx_v9_0_wait_for_idle,
.soft_reset = gfx_v9_0_soft_reset,
.set_clockgating_state = gfx_v9_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index 522981fa182d..99732056c58f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -3944,7 +3944,6 @@ static const struct amd_ip_funcs gfx_v9_4_3_ip_funcs = {
.hw_fini = gfx_v9_4_3_hw_fini,
.suspend = gfx_v9_4_3_suspend,
.resume = gfx_v9_4_3_resume,
- .is_idle = gfx_v9_4_3_is_idle,
.wait_for_idle = gfx_v9_4_3_wait_for_idle,
.soft_reset = gfx_v9_4_3_soft_reset,
.set_clockgating_state = gfx_v9_4_3_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index c70657bc089b..75a552782c97 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -1043,12 +1043,6 @@ static int gmc_v10_0_resume(struct amdgpu_ip_block *ip_block)
return 0;
}
-static bool gmc_v10_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* MC is always ready in GMC v10.*/
- return true;
-}
-
static int gmc_v10_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* There is no need to wait for MC idle in GMC v10.*/
@@ -1114,7 +1108,6 @@ const struct amd_ip_funcs gmc_v10_0_ip_funcs = {
.hw_fini = gmc_v10_0_hw_fini,
.suspend = gmc_v10_0_suspend,
.resume = gmc_v10_0_resume,
- .is_idle = gmc_v10_0_is_idle,
.wait_for_idle = gmc_v10_0_wait_for_idle,
.set_clockgating_state = gmc_v10_0_set_clockgating_state,
.set_powergating_state = gmc_v10_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index 7e612f947349..f454aff831b0 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -1004,12 +1004,6 @@ static int gmc_v11_0_resume(struct amdgpu_ip_block *ip_block)
return 0;
}
-static bool gmc_v11_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* MC is always ready in GMC v11.*/
- return true;
-}
-
static int gmc_v11_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* There is no need to wait for MC idle in GMC v11.*/
@@ -1054,7 +1048,6 @@ const struct amd_ip_funcs gmc_v11_0_ip_funcs = {
.hw_fini = gmc_v11_0_hw_fini,
.suspend = gmc_v11_0_suspend,
.resume = gmc_v11_0_resume,
- .is_idle = gmc_v11_0_is_idle,
.wait_for_idle = gmc_v11_0_wait_for_idle,
.set_clockgating_state = gmc_v11_0_set_clockgating_state,
.set_powergating_state = gmc_v11_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
index b05465dc30b4..2c7e3eae7b23 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
@@ -1105,12 +1105,6 @@ static int gmc_v12_0_resume(struct amdgpu_ip_block *ip_block)
return 0;
}
-static bool gmc_v12_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* MC is always ready in GMC v11.*/
- return true;
-}
-
static int gmc_v12_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* There is no need to wait for MC idle in GMC v11.*/
@@ -1159,7 +1153,6 @@ const struct amd_ip_funcs gmc_v12_0_ip_funcs = {
.hw_fini = gmc_v12_0_hw_fini,
.suspend = gmc_v12_0_suspend,
.resume = gmc_v12_0_resume,
- .is_idle = gmc_v12_0_is_idle,
.wait_for_idle = gmc_v12_0_wait_for_idle,
.set_clockgating_state = gmc_v12_0_set_clockgating_state,
.set_powergating_state = gmc_v12_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index b49098931d19..ca7afb9b7d0a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -1132,7 +1132,6 @@ static const struct amd_ip_funcs gmc_v6_0_ip_funcs = {
.hw_fini = gmc_v6_0_hw_fini,
.suspend = gmc_v6_0_suspend,
.resume = gmc_v6_0_resume,
- .is_idle = gmc_v6_0_is_idle,
.wait_for_idle = gmc_v6_0_wait_for_idle,
.soft_reset = gmc_v6_0_soft_reset,
.set_clockgating_state = gmc_v6_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 98db62cc8718..1c1eccfe383f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -1346,7 +1346,6 @@ static const struct amd_ip_funcs gmc_v7_0_ip_funcs = {
.hw_fini = gmc_v7_0_hw_fini,
.suspend = gmc_v7_0_suspend,
.resume = gmc_v7_0_resume,
- .is_idle = gmc_v7_0_is_idle,
.wait_for_idle = gmc_v7_0_wait_for_idle,
.soft_reset = gmc_v7_0_soft_reset,
.set_clockgating_state = gmc_v7_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 119268273530..b46b87291c51 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -2300,12 +2300,6 @@ static int gmc_v9_0_resume(struct amdgpu_ip_block *ip_block)
return 0;
}
-static bool gmc_v9_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* MC is always ready in GMC v9.*/
- return true;
-}
-
static int gmc_v9_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* There is no need to wait for MC idle in GMC v9.*/
@@ -2355,7 +2349,6 @@ const struct amd_ip_funcs gmc_v9_0_ip_funcs = {
.hw_fini = gmc_v9_0_hw_fini,
.suspend = gmc_v9_0_suspend,
.resume = gmc_v9_0_resume,
- .is_idle = gmc_v9_0_is_idle,
.wait_for_idle = gmc_v9_0_wait_for_idle,
.soft_reset = gmc_v9_0_soft_reset,
.set_clockgating_state = gmc_v9_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
index 333e9c30c091..512c76d97840 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_0.c
@@ -655,12 +655,6 @@ static int ih_v6_0_resume(struct amdgpu_ip_block *ip_block)
return ih_v6_0_hw_init(ip_block);
}
-static bool ih_v6_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* todo */
- return true;
-}
-
static int ih_v6_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* todo */
@@ -788,7 +782,6 @@ static const struct amd_ip_funcs ih_v6_0_ip_funcs = {
.hw_fini = ih_v6_0_hw_fini,
.suspend = ih_v6_0_suspend,
.resume = ih_v6_0_resume,
- .is_idle = ih_v6_0_is_idle,
.wait_for_idle = ih_v6_0_wait_for_idle,
.soft_reset = ih_v6_0_soft_reset,
.set_clockgating_state = ih_v6_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
index 699c274d357e..bae86e5fa316 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v6_1.c
@@ -630,12 +630,6 @@ static int ih_v6_1_resume(struct amdgpu_ip_block *ip_block)
return ih_v6_1_hw_init(ip_block);
}
-static bool ih_v6_1_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* todo */
- return true;
-}
-
static int ih_v6_1_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* todo */
@@ -767,7 +761,6 @@ static const struct amd_ip_funcs ih_v6_1_ip_funcs = {
.hw_fini = ih_v6_1_hw_fini,
.suspend = ih_v6_1_suspend,
.resume = ih_v6_1_resume,
- .is_idle = ih_v6_1_is_idle,
.wait_for_idle = ih_v6_1_wait_for_idle,
.soft_reset = ih_v6_1_soft_reset,
.set_clockgating_state = ih_v6_1_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
index 6de9e87e04e1..b51dacf9e126 100644
--- a/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/ih_v7_0.c
@@ -670,12 +670,6 @@ static int ih_v7_0_resume(struct amdgpu_ip_block *ip_block)
return ih_v7_0_hw_init(ip_block);
}
-static bool ih_v7_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* todo */
- return true;
-}
-
static int ih_v7_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* todo */
@@ -844,7 +838,6 @@ static const struct amd_ip_funcs ih_v7_0_ip_funcs = {
.hw_fini = ih_v7_0_hw_fini,
.suspend = ih_v7_0_suspend,
.resume = ih_v7_0_resume,
- .is_idle = ih_v7_0_is_idle,
.wait_for_idle = ih_v7_0_wait_for_idle,
.soft_reset = ih_v7_0_soft_reset,
.set_clockgating_state = ih_v7_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
index a9c00adcfe41..72069b77f6f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
@@ -791,7 +791,6 @@ static const struct amd_ip_funcs jpeg_v2_0_ip_funcs = {
.hw_fini = jpeg_v2_0_hw_fini,
.suspend = jpeg_v2_0_suspend,
.resume = jpeg_v2_0_resume,
- .is_idle = jpeg_v2_0_is_idle,
.wait_for_idle = jpeg_v2_0_wait_for_idle,
.set_clockgating_state = jpeg_v2_0_set_clockgating_state,
.set_powergating_state = jpeg_v2_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
index 5208312e7017..2968256d4cd7 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
@@ -665,7 +665,6 @@ static const struct amd_ip_funcs jpeg_v2_5_ip_funcs = {
.hw_fini = jpeg_v2_5_hw_fini,
.suspend = jpeg_v2_5_suspend,
.resume = jpeg_v2_5_resume,
- .is_idle = jpeg_v2_5_is_idle,
.wait_for_idle = jpeg_v2_5_wait_for_idle,
.set_clockgating_state = jpeg_v2_5_set_clockgating_state,
.set_powergating_state = jpeg_v2_5_set_powergating_state,
@@ -682,7 +681,6 @@ static const struct amd_ip_funcs jpeg_v2_6_ip_funcs = {
.hw_fini = jpeg_v2_5_hw_fini,
.suspend = jpeg_v2_5_suspend,
.resume = jpeg_v2_5_resume,
- .is_idle = jpeg_v2_5_is_idle,
.wait_for_idle = jpeg_v2_5_wait_for_idle,
.set_clockgating_state = jpeg_v2_5_set_clockgating_state,
.set_powergating_state = jpeg_v2_5_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
index e9ccadeb7696..564e40899df2 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
@@ -564,7 +564,6 @@ static const struct amd_ip_funcs jpeg_v3_0_ip_funcs = {
.hw_fini = jpeg_v3_0_hw_fini,
.suspend = jpeg_v3_0_suspend,
.resume = jpeg_v3_0_resume,
- .is_idle = jpeg_v3_0_is_idle,
.wait_for_idle = jpeg_v3_0_wait_for_idle,
.set_clockgating_state = jpeg_v3_0_set_clockgating_state,
.set_powergating_state = jpeg_v3_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c
index 6fd4238a8471..b29ca3a49939 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c
@@ -748,7 +748,6 @@ static const struct amd_ip_funcs jpeg_v4_0_ip_funcs = {
.hw_fini = jpeg_v4_0_hw_fini,
.suspend = jpeg_v4_0_suspend,
.resume = jpeg_v4_0_resume,
- .is_idle = jpeg_v4_0_is_idle,
.wait_for_idle = jpeg_v4_0_wait_for_idle,
.set_clockgating_state = jpeg_v4_0_set_clockgating_state,
.set_powergating_state = jpeg_v4_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
index 0fdc32b3ae91..49f84e6647a5 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
@@ -1225,7 +1225,6 @@ static const struct amd_ip_funcs jpeg_v4_0_3_ip_funcs = {
.hw_fini = jpeg_v4_0_3_hw_fini,
.suspend = jpeg_v4_0_3_suspend,
.resume = jpeg_v4_0_3_resume,
- .is_idle = jpeg_v4_0_3_is_idle,
.wait_for_idle = jpeg_v4_0_3_wait_for_idle,
.set_clockgating_state = jpeg_v4_0_3_set_clockgating_state,
.set_powergating_state = jpeg_v4_0_3_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
index 3f61d5367d94..197d1af18a3a 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
@@ -806,7 +806,6 @@ static const struct amd_ip_funcs jpeg_v4_0_5_ip_funcs = {
.hw_fini = jpeg_v4_0_5_hw_fini,
.suspend = jpeg_v4_0_5_suspend,
.resume = jpeg_v4_0_5_resume,
- .is_idle = jpeg_v4_0_5_is_idle,
.wait_for_idle = jpeg_v4_0_5_wait_for_idle,
.set_clockgating_state = jpeg_v4_0_5_set_clockgating_state,
.set_powergating_state = jpeg_v4_0_5_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
index e6e99f7e0a8a..9b57fdc1e69a 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
@@ -682,7 +682,6 @@ static const struct amd_ip_funcs jpeg_v5_0_0_ip_funcs = {
.hw_fini = jpeg_v5_0_0_hw_fini,
.suspend = jpeg_v5_0_0_suspend,
.resume = jpeg_v5_0_0_resume,
- .is_idle = jpeg_v5_0_0_is_idle,
.wait_for_idle = jpeg_v5_0_0_wait_for_idle,
.set_clockgating_state = jpeg_v5_0_0_set_clockgating_state,
.set_powergating_state = jpeg_v5_0_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
index db3fbe4eabb9..62632d9b4287 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
@@ -886,7 +886,6 @@ static const struct amd_ip_funcs jpeg_v5_0_1_ip_funcs = {
.hw_fini = jpeg_v5_0_1_hw_fini,
.suspend = jpeg_v5_0_1_suspend,
.resume = jpeg_v5_0_1_resume,
- .is_idle = jpeg_v5_0_1_is_idle,
.wait_for_idle = jpeg_v5_0_1_wait_for_idle,
.soft_reset = NULL,
.set_clockgating_state = jpeg_v5_0_1_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c
index ea54a2b6eddb..5a4859ee96f3 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c
@@ -631,7 +631,6 @@ static const struct amd_ip_funcs jpeg_v5_0_2_ip_funcs = {
.hw_fini = jpeg_v5_0_2_hw_fini,
.suspend = jpeg_v5_0_2_suspend,
.resume = jpeg_v5_0_2_resume,
- .is_idle = jpeg_v5_0_2_is_idle,
.wait_for_idle = jpeg_v5_0_2_wait_for_idle,
.soft_reset = NULL,
.set_clockgating_state = jpeg_v5_0_2_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c
index c929d6f83bac..8ddd12740a04 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c
@@ -671,7 +671,6 @@ static const struct amd_ip_funcs jpeg_v5_3_0_ip_funcs = {
.hw_fini = jpeg_v5_3_0_hw_fini,
.suspend = jpeg_v5_3_0_suspend,
.resume = jpeg_v5_3_0_resume,
- .is_idle = jpeg_v5_3_0_is_idle,
.wait_for_idle = jpeg_v5_3_0_wait_for_idle,
.set_clockgating_state = jpeg_v5_3_0_set_clockgating_state,
.set_powergating_state = jpeg_v5_3_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
index 4cd325149b63..7a167ad93fd0 100644
--- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c
@@ -625,12 +625,6 @@ static int navi10_ih_resume(struct amdgpu_ip_block *ip_block)
return navi10_ih_hw_init(ip_block);
}
-static bool navi10_ih_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* todo */
- return true;
-}
-
static int navi10_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* todo */
@@ -699,7 +693,6 @@ static const struct amd_ip_funcs navi10_ih_ip_funcs = {
.hw_fini = navi10_ih_hw_fini,
.suspend = navi10_ih_suspend,
.resume = navi10_ih_resume,
- .is_idle = navi10_ih_is_idle,
.wait_for_idle = navi10_ih_wait_for_idle,
.soft_reset = navi10_ih_soft_reset,
.set_clockgating_state = navi10_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 96faaf8c5737..e9a1bd3f0d6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -992,11 +992,6 @@ static int nv_common_resume(struct amdgpu_ip_block *ip_block)
return nv_common_hw_init(ip_block);
}
-static bool nv_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int nv_common_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -1058,7 +1053,6 @@ static const struct amd_ip_funcs nv_common_ip_funcs = {
.hw_fini = nv_common_hw_fini,
.suspend = nv_common_suspend,
.resume = nv_common_resume,
- .is_idle = nv_common_is_idle,
.set_clockgating_state = nv_common_set_clockgating_state,
.set_powergating_state = nv_common_set_powergating_state,
.get_clockgating_state = nv_common_get_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
index 7100f30ffeff..0adfd4b101aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/si.c
+++ b/drivers/gpu/drm/amd/amdgpu/si.c
@@ -2647,11 +2647,6 @@ static int si_common_resume(struct amdgpu_ip_block *ip_block)
return si_common_hw_init(ip_block);
}
-static bool si_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int si_common_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -2670,7 +2665,6 @@ static const struct amd_ip_funcs si_common_ip_funcs = {
.hw_init = si_common_hw_init,
.hw_fini = si_common_hw_fini,
.resume = si_common_resume,
- .is_idle = si_common_is_idle,
.set_clockgating_state = si_common_set_clockgating_state,
.set_powergating_state = si_common_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c
index 47f1d325bd1a..edebd9109fd4 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
@@ -725,7 +725,6 @@ static const struct amd_ip_funcs si_dma_ip_funcs = {
.hw_fini = si_dma_hw_fini,
.suspend = si_dma_suspend,
.resume = si_dma_resume,
- .is_idle = si_dma_is_idle,
.wait_for_idle = si_dma_wait_for_idle,
.soft_reset = si_dma_soft_reset,
.set_clockgating_state = si_dma_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c
index 66f650f87243..52118765dccf 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_ih.c
@@ -297,7 +297,6 @@ static const struct amd_ip_funcs si_ih_ip_funcs = {
.hw_fini = si_ih_hw_fini,
.suspend = si_ih_suspend,
.resume = si_ih_resume,
- .is_idle = si_ih_is_idle,
.wait_for_idle = si_ih_wait_for_idle,
.soft_reset = si_ih_soft_reset,
.set_clockgating_state = si_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 3d4573d93742..b2024d05aa5f 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -1324,11 +1324,6 @@ static int soc15_common_resume(struct amdgpu_ip_block *ip_block)
return soc15_common_hw_init(ip_block);
}
-static bool soc15_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static void soc15_update_drm_clock_gating(struct amdgpu_device *adev, bool enable)
{
uint32_t def, data;
@@ -1480,7 +1475,6 @@ static const struct amd_ip_funcs soc15_common_ip_funcs = {
.hw_fini = soc15_common_hw_fini,
.suspend = soc15_common_suspend,
.resume = soc15_common_resume,
- .is_idle = soc15_common_is_idle,
.set_clockgating_state = soc15_common_set_clockgating_state,
.set_powergating_state = soc15_common_set_powergating_state,
.get_clockgating_state= soc15_common_get_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c
index 5a6c84c802f6..599d47e1d38b 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc21.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc21.c
@@ -1042,11 +1042,6 @@ static int soc21_common_resume(struct amdgpu_ip_block *ip_block)
return soc21_common_hw_init(ip_block);
}
-static bool soc21_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int soc21_common_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -1111,7 +1106,6 @@ static const struct amd_ip_funcs soc21_common_ip_funcs = {
.hw_fini = soc21_common_hw_fini,
.suspend = soc21_common_suspend,
.resume = soc21_common_resume,
- .is_idle = soc21_common_is_idle,
.set_clockgating_state = soc21_common_set_clockgating_state,
.set_powergating_state = soc21_common_set_powergating_state,
.get_clockgating_state = soc21_common_get_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/soc24.c b/drivers/gpu/drm/amd/amdgpu/soc24.c
index 9a658e4837f4..6c8b8ed4a44d 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc24.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc24.c
@@ -519,11 +519,6 @@ static int soc24_common_resume(struct amdgpu_ip_block *ip_block)
return soc24_common_hw_init(ip_block);
}
-static bool soc24_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int soc24_common_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -582,7 +577,6 @@ static const struct amd_ip_funcs soc24_common_ip_funcs = {
.hw_fini = soc24_common_hw_fini,
.suspend = soc24_common_suspend,
.resume = soc24_common_resume,
- .is_idle = soc24_common_is_idle,
.set_clockgating_state = soc24_common_set_clockgating_state,
.set_powergating_state = soc24_common_set_powergating_state,
.get_clockgating_state = soc24_common_get_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
index 43e92e2a85e8..10fc2afddea6 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
@@ -355,11 +355,6 @@ static int soc_v1_0_common_resume(struct amdgpu_ip_block *ip_block)
return soc_v1_0_common_hw_init(ip_block);
}
-static bool soc_v1_0_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int soc_v1_0_common_set_clockgating_state(struct amdgpu_ip_block *ip_block,
enum amd_clockgating_state state)
{
@@ -387,7 +382,6 @@ static const struct amd_ip_funcs soc_v1_0_common_ip_funcs = {
.hw_fini = soc_v1_0_common_hw_fini,
.suspend = soc_v1_0_common_suspend,
.resume = soc_v1_0_common_resume,
- .is_idle = soc_v1_0_common_is_idle,
.set_clockgating_state = soc_v1_0_common_set_clockgating_state,
.set_powergating_state = soc_v1_0_common_set_powergating_state,
.get_clockgating_state = soc_v1_0_common_get_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index bbd0e05d39e5..dcb8487e22b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -1496,7 +1496,6 @@ static const struct amd_ip_funcs uvd_v6_0_ip_funcs = {
.prepare_suspend = uvd_v6_0_prepare_suspend,
.suspend = uvd_v6_0_suspend,
.resume = uvd_v6_0_resume,
- .is_idle = uvd_v6_0_is_idle,
.wait_for_idle = uvd_v6_0_wait_for_idle,
.soft_reset = uvd_v6_0_soft_reset,
.set_clockgating_state = uvd_v6_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v1_0.c
index 93253db5e2de..b1428f5bbc81 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v1_0.c
@@ -796,7 +796,6 @@ static const struct amd_ip_funcs vce_v1_0_ip_funcs = {
.hw_fini = vce_v1_0_hw_fini,
.suspend = vce_v1_0_suspend,
.resume = vce_v1_0_resume,
- .is_idle = vce_v1_0_is_idle,
.wait_for_idle = vce_v1_0_wait_for_idle,
.set_clockgating_state = vce_v1_0_set_clockgating_state,
.set_powergating_state = vce_v1_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
index 3a6fc8604108..dd870ecac2a4 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
@@ -633,7 +633,6 @@ static const struct amd_ip_funcs vce_v2_0_ip_funcs = {
.hw_fini = vce_v2_0_hw_fini,
.suspend = vce_v2_0_suspend,
.resume = vce_v2_0_resume,
- .is_idle = vce_v2_0_is_idle,
.wait_for_idle = vce_v2_0_wait_for_idle,
.soft_reset = vce_v2_0_soft_reset,
.set_clockgating_state = vce_v2_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
index a9497e2e07f7..9809a23fa521 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
@@ -857,7 +857,6 @@ static const struct amd_ip_funcs vce_v3_0_ip_funcs = {
.hw_fini = vce_v3_0_hw_fini,
.suspend = vce_v3_0_suspend,
.resume = vce_v3_0_resume,
- .is_idle = vce_v3_0_is_idle,
.wait_for_idle = vce_v3_0_wait_for_idle,
.soft_reset = vce_v3_0_soft_reset,
.set_clockgating_state = vce_v3_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
index e9d790914761..69976c8be034 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
@@ -2034,7 +2034,6 @@ static const struct amd_ip_funcs vcn_v1_0_ip_funcs = {
.hw_fini = vcn_v1_0_hw_fini,
.suspend = vcn_v1_0_suspend,
.resume = vcn_v1_0_resume,
- .is_idle = vcn_v1_0_is_idle,
.wait_for_idle = vcn_v1_0_wait_for_idle,
.set_clockgating_state = vcn_v1_0_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
index 0442bfcfd384..c559213e442c 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
@@ -2102,7 +2102,6 @@ static const struct amd_ip_funcs vcn_v2_0_ip_funcs = {
.hw_fini = vcn_v2_0_hw_fini,
.suspend = vcn_v2_0_suspend,
.resume = vcn_v2_0_resume,
- .is_idle = vcn_v2_0_is_idle,
.wait_for_idle = vcn_v2_0_wait_for_idle,
.set_clockgating_state = vcn_v2_0_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
index 0d8a3cea63ee..732aaa1d8e67 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
@@ -2110,7 +2110,6 @@ static const struct amd_ip_funcs vcn_v2_5_ip_funcs = {
.hw_fini = vcn_v2_5_hw_fini,
.suspend = vcn_v2_5_suspend,
.resume = vcn_v2_5_resume,
- .is_idle = vcn_v2_5_is_idle,
.wait_for_idle = vcn_v2_5_wait_for_idle,
.set_clockgating_state = vcn_v2_5_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
@@ -2127,7 +2126,6 @@ static const struct amd_ip_funcs vcn_v2_6_ip_funcs = {
.hw_fini = vcn_v2_5_hw_fini,
.suspend = vcn_v2_5_suspend,
.resume = vcn_v2_5_resume,
- .is_idle = vcn_v2_5_is_idle,
.wait_for_idle = vcn_v2_5_wait_for_idle,
.set_clockgating_state = vcn_v2_5_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
index eb16916c6473..4509e6130bc2 100644
--- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
@@ -555,12 +555,6 @@ static int vega10_ih_resume(struct amdgpu_ip_block *ip_block)
return vega10_ih_hw_init(ip_block);
}
-static bool vega10_ih_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* todo */
- return true;
-}
-
static int vega10_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* todo */
@@ -630,7 +624,6 @@ const struct amd_ip_funcs vega10_ih_ip_funcs = {
.hw_fini = vega10_ih_hw_fini,
.suspend = vega10_ih_suspend,
.resume = vega10_ih_resume,
- .is_idle = vega10_ih_is_idle,
.wait_for_idle = vega10_ih_wait_for_idle,
.soft_reset = vega10_ih_soft_reset,
.set_clockgating_state = vega10_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
index 85846fd08ce4..460f4bf195e8 100644
--- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
@@ -655,12 +655,6 @@ static int vega20_ih_resume(struct amdgpu_ip_block *ip_block)
return vega20_ih_hw_init(ip_block);
}
-static bool vega20_ih_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* todo */
- return true;
-}
-
static int vega20_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* todo */
@@ -727,7 +721,6 @@ const struct amd_ip_funcs vega20_ih_ip_funcs = {
.hw_fini = vega20_ih_hw_fini,
.suspend = vega20_ih_suspend,
.resume = vega20_ih_resume,
- .is_idle = vega20_ih_is_idle,
.wait_for_idle = vega20_ih_wait_for_idle,
.soft_reset = vega20_ih_soft_reset,
.set_clockgating_state = vega20_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 352c27103305..2cd6d7d77b1c 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -1729,11 +1729,6 @@ static int vi_common_resume(struct amdgpu_ip_block *ip_block)
return vi_common_hw_init(ip_block);
}
-static bool vi_common_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static void vi_update_bif_medium_grain_light_sleep(struct amdgpu_device *adev,
bool enable)
{
@@ -2025,7 +2020,6 @@ static const struct amd_ip_funcs vi_common_ip_funcs = {
.hw_fini = vi_common_hw_fini,
.suspend = vi_common_suspend,
.resume = vi_common_resume,
- .is_idle = vi_common_is_idle,
.set_clockgating_state = vi_common_set_clockgating_state,
.set_powergating_state = vi_common_set_powergating_state,
.get_clockgating_state = vi_common_get_clockgating_state,
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 284aac4d96bc..d19b7e985c02 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -224,13 +224,6 @@ STATIC_IFN_KUNIT int dm_crtc_get_scanoutpos(struct amdgpu_device *adev, int crtc
}
EXPORT_IF_KUNIT(dm_crtc_get_scanoutpos);
-STATIC_IFN_KUNIT bool dm_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* XXX todo */
- return true;
-}
-EXPORT_IF_KUNIT(dm_is_idle);
-
STATIC_IFN_KUNIT int dm_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* XXX todo */
@@ -2079,7 +2072,6 @@ static const struct amd_ip_funcs amdgpu_dm_funcs = {
.hw_fini = dm_hw_fini,
.suspend = dm_suspend,
.resume = dm_resume,
- .is_idle = dm_is_idle,
.wait_for_idle = dm_wait_for_idle,
.soft_reset = dm_soft_reset,
.set_clockgating_state = dm_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
index 3524931451c8..488a24e857fc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -1157,7 +1157,6 @@ struct __drm_planes_state *amdgpu_dm_get_next_zpos(struct drm_atomic_commit *sta
#if IS_ENABLED(CONFIG_DRM_AMD_DC_KUNIT_TEST)
struct amdgpu_ip_block;
-bool dm_is_idle(struct amdgpu_ip_block *ip_block);
int dm_wait_for_idle(struct amdgpu_ip_block *ip_block);
int dm_soft_reset(struct amdgpu_ip_block *ip_block);
int dm_set_clockgating_state(struct amdgpu_ip_block *ip_block,
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c
index b763fdf43c60..6dd81a17bc6b 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c
@@ -3108,11 +3108,6 @@ static int kv_dpm_resume(struct amdgpu_ip_block *ip_block)
return ret;
}
-static bool kv_dpm_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return true;
-}
-
static int kv_dpm_set_interrupt_state(struct amdgpu_device *adev,
struct amdgpu_irq_src *src,
unsigned type,
@@ -3317,7 +3312,6 @@ static const struct amd_ip_funcs kv_dpm_ip_funcs = {
.hw_fini = kv_dpm_hw_fini,
.suspend = kv_dpm_suspend,
.resume = kv_dpm_resume,
- .is_idle = kv_dpm_is_idle,
.set_clockgating_state = kv_dpm_set_clockgating_state,
.set_powergating_state = kv_dpm_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
index 012227c70600..6cc414a8a4de 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
@@ -7928,12 +7928,6 @@ static int si_dpm_resume(struct amdgpu_ip_block *ip_block)
return ret;
}
-static bool si_dpm_is_idle(struct amdgpu_ip_block *ip_block)
-{
- /* XXX */
- return true;
-}
-
static int si_dpm_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
/* XXX */
@@ -8134,7 +8128,6 @@ static const struct amd_ip_funcs si_dpm_ip_funcs = {
.hw_fini = si_dpm_hw_fini,
.suspend = si_dpm_suspend,
.resume = si_dpm_resume,
- .is_idle = si_dpm_is_idle,
.wait_for_idle = si_dpm_wait_for_idle,
.set_clockgating_state = si_dpm_set_clockgating_state,
.set_powergating_state = si_dpm_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
index 7c70e228a5ba..239c64b8edca 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
@@ -241,11 +241,6 @@ static void pp_late_fini(struct amdgpu_ip_block *ip_block)
}
-static bool pp_is_idle(struct amdgpu_ip_block *ip_block)
-{
- return false;
-}
-
static int pp_set_powergating_state(struct amdgpu_ip_block *ip_block,
enum amd_powergating_state state)
{
@@ -286,7 +281,6 @@ static const struct amd_ip_funcs pp_ip_funcs = {
.late_fini = pp_late_fini,
.suspend = pp_suspend,
.resume = pp_resume,
- .is_idle = pp_is_idle,
.set_clockgating_state = pp_set_clockgating_state,
.set_powergating_state = pp_set_powergating_state,
};
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index cca32f74abf0..ab6da9bd91b0 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2811,7 +2811,6 @@ const struct amd_ip_funcs smu_ip_funcs = {
.late_fini = smu_late_fini,
.suspend = smu_suspend,
.resume = smu_resume,
- .is_idle = NULL,
.wait_for_idle = NULL,
.soft_reset = NULL,
.set_clockgating_state = smu_set_clockgating_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/4] drm/amdgpu: Remove is_idle (non trivial functions)
2026-08-15 18:00 [PATCH 0/4] drm/amdgpu: Remove is_idle method linux
2026-08-15 18:00 ` [PATCH 1/4] drm/amdgpu: Remove is_idle test case linux
2026-08-15 18:00 ` [PATCH 2/4] drm/amdgpu: Remove is_idle (trivial cases) linux
@ 2026-08-15 18:00 ` linux
2026-08-15 18:37 ` sashiko-bot
2026-08-15 18:00 ` [PATCH 4/4] drm/amdgpu: Remove is_idle linux
3 siblings, 1 reply; 7+ messages in thread
From: linux @ 2026-08-15 18:00 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, harry.wentland, sunpeng.li,
amd-gfx
Cc: airlied, simona, dri-devel, linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
The is_idle method on amd_ip_funcs is never called.
Remove the implementations that actually do something.
In most cases the same code has been duplicated in
the wait_for_idle method implementations that is still used.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/gpu/drm/amd/amdgpu/cik_ih.c | 12 ------------
drivers/gpu/drm/amd/amdgpu/cz_ih.c | 12 ------------
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 ------------
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 12 ------------
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 12 ------------
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 -----------
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 13 -------------
drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 12 ------------
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 13 -------------
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 13 -------------
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 12 ------------
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 8 --------
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 8 --------
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 8 --------
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 16 ----------------
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 23 -----------------------
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 21 ---------------------
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 23 -----------------------
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 23 -----------------------
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 19 -------------------
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c | 19 -------------------
28 files changed, 414 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
index 876a3256dba4..314d8f1d64cc 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
@@ -357,17 +357,6 @@ static int cik_ih_resume(struct amdgpu_ip_block *ip_block)
return cik_ih_hw_init(ip_block);
}
-static bool cik_ih_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 tmp = RREG32(mmSRBM_STATUS);
-
- if (tmp & SRBM_STATUS__IH_BUSY_MASK)
- return false;
-
- return true;
-}
-
static int cik_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -435,7 +424,6 @@ static const struct amd_ip_funcs cik_ih_ip_funcs = {
.hw_fini = cik_ih_hw_fini,
.suspend = cik_ih_suspend,
.resume = cik_ih_resume,
- .is_idle = cik_ih_is_idle,
.wait_for_idle = cik_ih_wait_for_idle,
.soft_reset = cik_ih_soft_reset,
.set_clockgating_state = cik_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/cz_ih.c b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
index bc7a2e06ab5f..8d02602f8433 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
@@ -351,17 +351,6 @@ static int cz_ih_resume(struct amdgpu_ip_block *ip_block)
return cz_ih_hw_init(ip_block);
}
-static bool cz_ih_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 tmp = RREG32(mmSRBM_STATUS);
-
- if (REG_GET_FIELD(tmp, SRBM_STATUS, IH_BUSY))
- return false;
-
- return true;
-}
-
static int cz_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -431,7 +420,6 @@ static const struct amd_ip_funcs cz_ih_ip_funcs = {
.hw_fini = cz_ih_hw_fini,
.suspend = cz_ih_suspend,
.resume = cz_ih_resume,
- .is_idle = cz_ih_is_idle,
.wait_for_idle = cz_ih_wait_for_idle,
.soft_reset = cz_ih_soft_reset,
.set_clockgating_state = cz_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 00798d80479f..f9154421c2d5 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -7611,17 +7611,6 @@ static int gfx_v10_0_resume(struct amdgpu_ip_block *ip_block)
return gfx_v10_0_hw_init(ip_block);
}
-static bool gfx_v10_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
-
- if (REG_GET_FIELD(RREG32_SOC15(GC, 0, mmGRBM_STATUS),
- GRBM_STATUS, GUI_ACTIVE))
- return false;
- else
- return true;
-}
-
static int gfx_v10_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned int i;
@@ -9821,7 +9810,6 @@ static const struct amd_ip_funcs gfx_v10_0_ip_funcs = {
.hw_fini = gfx_v10_0_hw_fini,
.suspend = gfx_v10_0_suspend,
.resume = gfx_v10_0_resume,
- .is_idle = gfx_v10_0_is_idle,
.wait_for_idle = gfx_v10_0_wait_for_idle,
.soft_reset = gfx_v10_0_soft_reset,
.set_clockgating_state = gfx_v10_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index 69776dbe188d..a447562977ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -5099,17 +5099,6 @@ static int gfx_v11_0_resume(struct amdgpu_ip_block *ip_block)
return gfx_v11_0_hw_init(ip_block);
}
-static bool gfx_v11_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
-
- if (REG_GET_FIELD(RREG32_SOC15(GC, 0, regGRBM_STATUS),
- GRBM_STATUS, GUI_ACTIVE))
- return false;
- else
- return true;
-}
-
static int gfx_v11_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -7057,7 +7046,6 @@ static const struct amd_ip_funcs gfx_v11_0_ip_funcs = {
.hw_fini = gfx_v11_0_hw_fini,
.suspend = gfx_v11_0_suspend,
.resume = gfx_v11_0_resume,
- .is_idle = gfx_v11_0_is_idle,
.wait_for_idle = gfx_v11_0_wait_for_idle,
.soft_reset = gfx_v11_0_soft_reset,
.set_clockgating_state = gfx_v11_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index 1e5fd1ef8f1d..fdfee88e41e3 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -3929,17 +3929,6 @@ static int gfx_v12_0_resume(struct amdgpu_ip_block *ip_block)
return gfx_v12_0_hw_init(ip_block);
}
-static bool gfx_v12_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
-
- if (REG_GET_FIELD(RREG32_SOC15(GC, 0, regGRBM_STATUS),
- GRBM_STATUS, GUI_ACTIVE))
- return false;
- else
- return true;
-}
-
static int gfx_v12_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -5343,7 +5332,6 @@ static const struct amd_ip_funcs gfx_v12_0_ip_funcs = {
.hw_fini = gfx_v12_0_hw_fini,
.suspend = gfx_v12_0_suspend,
.resume = gfx_v12_0_resume,
- .is_idle = gfx_v12_0_is_idle,
.wait_for_idle = gfx_v12_0_wait_for_idle,
.set_clockgating_state = gfx_v12_0_set_clockgating_state,
.set_powergating_state = gfx_v12_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 5fc19fefca81..a1e00be54005 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -4511,16 +4511,6 @@ static int gfx_v7_0_resume(struct amdgpu_ip_block *ip_block)
return gfx_v7_0_hw_init(ip_block);
}
-static bool gfx_v7_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
-
- if (RREG32(mmGRBM_STATUS) & GRBM_STATUS__GUI_ACTIVE_MASK)
- return false;
- else
- return true;
-}
-
static int gfx_v7_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -4951,7 +4941,6 @@ static const struct amd_ip_funcs gfx_v7_0_ip_funcs = {
.hw_fini = gfx_v7_0_hw_fini,
.suspend = gfx_v7_0_suspend,
.resume = gfx_v7_0_resume,
- .is_idle = gfx_v7_0_is_idle,
.wait_for_idle = gfx_v7_0_wait_for_idle,
.soft_reset = gfx_v7_0_soft_reset,
.set_clockgating_state = gfx_v7_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 64ebedc595b5..bf089595e5da 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -1221,18 +1221,6 @@ static int gmc_v8_0_resume(struct amdgpu_ip_block *ip_block)
return 0;
}
-static bool gmc_v8_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 tmp = RREG32(mmSRBM_STATUS);
-
- if (tmp & (SRBM_STATUS__MCB_BUSY_MASK | SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK |
- SRBM_STATUS__MCC_BUSY_MASK | SRBM_STATUS__MCD_BUSY_MASK | SRBM_STATUS__VMC_BUSY_MASK))
- return false;
-
- return true;
-}
-
static int gmc_v8_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned int i;
@@ -1592,7 +1580,6 @@ static const struct amd_ip_funcs gmc_v8_0_ip_funcs = {
.hw_fini = gmc_v8_0_hw_fini,
.suspend = gmc_v8_0_suspend,
.resume = gmc_v8_0_resume,
- .is_idle = gmc_v8_0_is_idle,
.wait_for_idle = gmc_v8_0_wait_for_idle,
.set_clockgating_state = gmc_v8_0_set_clockgating_state,
.set_powergating_state = gmc_v8_0_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
index 01cadf898c00..49002c80dc71 100644
--- a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
@@ -345,17 +345,6 @@ static int iceland_ih_resume(struct amdgpu_ip_block *ip_block)
return iceland_ih_hw_init(ip_block);
}
-static bool iceland_ih_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 tmp = RREG32(mmSRBM_STATUS);
-
- if (REG_GET_FIELD(tmp, SRBM_STATUS, IH_BUSY))
- return false;
-
- return true;
-}
-
static int iceland_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -423,7 +412,6 @@ static const struct amd_ip_funcs iceland_ih_ip_funcs = {
.hw_fini = iceland_ih_hw_fini,
.suspend = iceland_ih_suspend,
.resume = iceland_ih_resume,
- .is_idle = iceland_ih_is_idle,
.wait_for_idle = iceland_ih_wait_for_idle,
.soft_reset = iceland_ih_soft_reset,
.set_clockgating_state = iceland_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index c7253b908351..9ef7134149d5 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -919,18 +919,6 @@ static int sdma_v2_4_resume(struct amdgpu_ip_block *ip_block)
return sdma_v2_4_hw_init(ip_block);
}
-static bool sdma_v2_4_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 tmp = RREG32(mmSRBM_STATUS2);
-
- if (tmp & (SRBM_STATUS2__SDMA_BUSY_MASK |
- SRBM_STATUS2__SDMA1_BUSY_MASK))
- return false;
-
- return true;
-}
-
static int sdma_v2_4_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -1112,7 +1100,6 @@ static const struct amd_ip_funcs sdma_v2_4_ip_funcs = {
.hw_fini = sdma_v2_4_hw_fini,
.suspend = sdma_v2_4_suspend,
.resume = sdma_v2_4_resume,
- .is_idle = sdma_v2_4_is_idle,
.wait_for_idle = sdma_v2_4_wait_for_idle,
.soft_reset = sdma_v2_4_soft_reset,
.set_clockgating_state = sdma_v2_4_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 05cce4bde73e..6198bc2024e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -1209,18 +1209,6 @@ static int sdma_v3_0_resume(struct amdgpu_ip_block *ip_block)
return sdma_v3_0_hw_init(ip_block);
}
-static bool sdma_v3_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 tmp = RREG32(mmSRBM_STATUS2);
-
- if (tmp & (SRBM_STATUS2__SDMA_BUSY_MASK |
- SRBM_STATUS2__SDMA1_BUSY_MASK))
- return false;
-
- return true;
-}
-
static int sdma_v3_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -1492,7 +1480,6 @@ static const struct amd_ip_funcs sdma_v3_0_ip_funcs = {
.hw_fini = sdma_v3_0_hw_fini,
.suspend = sdma_v3_0_suspend,
.resume = sdma_v3_0_resume,
- .is_idle = sdma_v3_0_is_idle,
.wait_for_idle = sdma_v3_0_wait_for_idle,
.soft_reset = sdma_v3_0_soft_reset,
.set_clockgating_state = sdma_v3_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 20c8ebf0e159..a0f19f7b39e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -2027,21 +2027,6 @@ static int sdma_v4_0_resume(struct amdgpu_ip_block *ip_block)
return sdma_v4_0_hw_init(ip_block);
}
-static bool sdma_v4_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 i;
-
- for (i = 0; i < adev->sdma.num_instances; i++) {
- u32 tmp = RREG32_SDMA(i, mmSDMA0_STATUS_REG);
-
- if (!(tmp & SDMA0_STATUS_REG__IDLE_MASK))
- return false;
- }
-
- return true;
-}
-
static int sdma_v4_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i, j;
@@ -2412,7 +2397,6 @@ const struct amd_ip_funcs sdma_v4_0_ip_funcs = {
.hw_fini = sdma_v4_0_hw_fini,
.suspend = sdma_v4_0_suspend,
.resume = sdma_v4_0_resume,
- .is_idle = sdma_v4_0_is_idle,
.wait_for_idle = sdma_v4_0_wait_for_idle,
.soft_reset = sdma_v4_0_soft_reset,
.set_clockgating_state = sdma_v4_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
index 6fe3d3d56c40..1a2810b6f27c 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
@@ -1627,21 +1627,6 @@ static int sdma_v4_4_2_resume(struct amdgpu_ip_block *ip_block)
return sdma_v4_4_2_hw_init(ip_block);
}
-static bool sdma_v4_4_2_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 i;
-
- for (i = 0; i < adev->sdma.num_instances; i++) {
- u32 tmp = RREG32_SDMA(i, regSDMA_STATUS_REG);
-
- if (!(tmp & SDMA_STATUS_REG__IDLE_MASK))
- return false;
- }
-
- return true;
-}
-
static int sdma_v4_4_2_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i, j;
@@ -2118,7 +2103,6 @@ const struct amd_ip_funcs sdma_v4_4_2_ip_funcs = {
.hw_fini = sdma_v4_4_2_hw_fini,
.suspend = sdma_v4_4_2_suspend,
.resume = sdma_v4_4_2_resume,
- .is_idle = sdma_v4_4_2_is_idle,
.wait_for_idle = sdma_v4_4_2_wait_for_idle,
.soft_reset = sdma_v4_4_2_soft_reset,
.set_clockgating_state = sdma_v4_4_2_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
index 1ca0e7f65442..1a022a251011 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
@@ -1501,21 +1501,6 @@ static int sdma_v5_0_resume(struct amdgpu_ip_block *ip_block)
return sdma_v5_0_hw_init(ip_block);
}
-static bool sdma_v5_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 i;
-
- for (i = 0; i < adev->sdma.num_instances; i++) {
- u32 tmp = RREG32(sdma_v5_0_get_reg_offset(adev, i, mmSDMA0_STATUS_REG));
-
- if (!(tmp & SDMA0_STATUS_REG__IDLE_MASK))
- return false;
- }
-
- return true;
-}
-
static int sdma_v5_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -1916,7 +1901,6 @@ static const struct amd_ip_funcs sdma_v5_0_ip_funcs = {
.hw_fini = sdma_v5_0_hw_fini,
.suspend = sdma_v5_0_suspend,
.resume = sdma_v5_0_resume,
- .is_idle = sdma_v5_0_is_idle,
.wait_for_idle = sdma_v5_0_wait_for_idle,
.soft_reset = sdma_v5_0_soft_reset,
.set_clockgating_state = sdma_v5_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index 81f1e9882177..5543e381dcca 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -1417,21 +1417,6 @@ static int sdma_v5_2_resume(struct amdgpu_ip_block *ip_block)
return sdma_v5_2_hw_init(ip_block);
}
-static bool sdma_v5_2_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 i;
-
- for (i = 0; i < adev->sdma.num_instances; i++) {
- u32 tmp = RREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_STATUS_REG));
-
- if (!(tmp & SDMA0_STATUS_REG__IDLE_MASK))
- return false;
- }
-
- return true;
-}
-
static int sdma_v5_2_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -1921,7 +1906,6 @@ static const struct amd_ip_funcs sdma_v5_2_ip_funcs = {
.hw_fini = sdma_v5_2_hw_fini,
.suspend = sdma_v5_2_suspend,
.resume = sdma_v5_2_resume,
- .is_idle = sdma_v5_2_is_idle,
.wait_for_idle = sdma_v5_2_wait_for_idle,
.soft_reset = sdma_v5_2_soft_reset,
.set_clockgating_state = sdma_v5_2_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
index cf3d2997fff8..3fd3e530c76b 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
@@ -1489,21 +1489,6 @@ static int sdma_v6_0_resume(struct amdgpu_ip_block *ip_block)
return sdma_v6_0_hw_init(ip_block);
}
-static bool sdma_v6_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 i;
-
- for (i = 0; i < adev->sdma.num_instances; i++) {
- u32 tmp = RREG32(sdma_v6_0_get_reg_offset(adev, i, regSDMA0_STATUS_REG));
-
- if (!(tmp & SDMA0_STATUS_REG__IDLE_MASK))
- return false;
- }
-
- return true;
-}
-
static int sdma_v6_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -1727,7 +1712,6 @@ const struct amd_ip_funcs sdma_v6_0_ip_funcs = {
.hw_fini = sdma_v6_0_hw_fini,
.suspend = sdma_v6_0_suspend,
.resume = sdma_v6_0_resume,
- .is_idle = sdma_v6_0_is_idle,
.wait_for_idle = sdma_v6_0_wait_for_idle,
.soft_reset = sdma_v6_0_soft_reset,
.set_clockgating_state = sdma_v6_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
index 69cb89298a3e..745ec8b67b59 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
@@ -1443,21 +1443,6 @@ static int sdma_v7_0_resume(struct amdgpu_ip_block *ip_block)
return sdma_v7_0_hw_init(ip_block);
}
-static bool sdma_v7_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 i;
-
- for (i = 0; i < adev->sdma.num_instances; i++) {
- u32 tmp = RREG32(sdma_v7_0_get_reg_offset(adev, i, regSDMA0_STATUS_REG));
-
- if (!(tmp & SDMA0_STATUS_REG__IDLE_MASK))
- return false;
- }
-
- return true;
-}
-
static int sdma_v7_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -1659,7 +1644,6 @@ const struct amd_ip_funcs sdma_v7_0_ip_funcs = {
.hw_fini = sdma_v7_0_hw_fini,
.suspend = sdma_v7_0_suspend,
.resume = sdma_v7_0_resume,
- .is_idle = sdma_v7_0_is_idle,
.wait_for_idle = sdma_v7_0_wait_for_idle,
.soft_reset = sdma_v7_0_soft_reset,
.set_clockgating_state = sdma_v7_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c
index 18366e16ef3f..e9a3bcfd7775 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c
@@ -1404,21 +1404,6 @@ static int sdma_v7_1_resume(struct amdgpu_ip_block *ip_block)
return sdma_v7_1_hw_init(ip_block);
}
-static bool sdma_v7_1_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 i;
-
- for (i = 0; i < adev->sdma.num_instances; i++) {
- u32 tmp = RREG32(sdma_v7_1_get_reg_offset(adev, i, regSDMA0_SDMA_STATUS_REG));
-
- if (!(tmp & SDMA0_SDMA_STATUS_REG__IDLE_MASK))
- return false;
- }
-
- return true;
-}
-
static int sdma_v7_1_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i, j;
@@ -1624,7 +1609,6 @@ const struct amd_ip_funcs sdma_v7_1_ip_funcs = {
.hw_fini = sdma_v7_1_hw_fini,
.suspend = sdma_v7_1_suspend,
.resume = sdma_v7_1_resume,
- .is_idle = sdma_v7_1_is_idle,
.wait_for_idle = sdma_v7_1_wait_for_idle,
.soft_reset = sdma_v7_1_soft_reset,
.set_clockgating_state = sdma_v7_1_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
index a3e883f6f099..d84c08698dff 100644
--- a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
@@ -363,17 +363,6 @@ static int tonga_ih_resume(struct amdgpu_ip_block *ip_block)
return tonga_ih_hw_init(ip_block);
}
-static bool tonga_ih_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- u32 tmp = RREG32(mmSRBM_STATUS);
-
- if (REG_GET_FIELD(tmp, SRBM_STATUS, IH_BUSY))
- return false;
-
- return true;
-}
-
static int tonga_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -442,7 +431,6 @@ static const struct amd_ip_funcs tonga_ih_ip_funcs = {
.hw_fini = tonga_ih_hw_fini,
.suspend = tonga_ih_suspend,
.resume = tonga_ih_resume,
- .is_idle = tonga_ih_is_idle,
.wait_for_idle = tonga_ih_wait_for_idle,
.soft_reset = tonga_ih_soft_reset,
.set_clockgating_state = tonga_ih_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
index efb3fde919ee..b72a0c34425a 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
@@ -789,13 +789,6 @@ static int uvd_v3_1_resume(struct amdgpu_ip_block *ip_block)
return uvd_v3_1_hw_init(ip_block);
}
-static bool uvd_v3_1_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
-
- return !(RREG32(mmSRBM_STATUS) & SRBM_STATUS__UVD_BUSY_MASK);
-}
-
static int uvd_v3_1_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -843,7 +836,6 @@ static const struct amd_ip_funcs uvd_v3_1_ip_funcs = {
.prepare_suspend = uvd_v3_1_prepare_suspend,
.suspend = uvd_v3_1_suspend,
.resume = uvd_v3_1_resume,
- .is_idle = uvd_v3_1_is_idle,
.wait_for_idle = uvd_v3_1_wait_for_idle,
.soft_reset = uvd_v3_1_soft_reset,
.set_clockgating_state = uvd_v3_1_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index 8a9ba2276275..cf304b489d87 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -664,13 +664,6 @@ static void uvd_v4_2_set_dcm(struct amdgpu_device *adev,
WREG32_UVD_CTX(ixUVD_CGC_CTRL2, tmp2);
}
-static bool uvd_v4_2_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
-
- return !(RREG32(mmSRBM_STATUS) & SRBM_STATUS__UVD_BUSY_MASK);
-}
-
static int uvd_v4_2_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -768,7 +761,6 @@ static const struct amd_ip_funcs uvd_v4_2_ip_funcs = {
.prepare_suspend = uvd_v4_2_prepare_suspend,
.suspend = uvd_v4_2_suspend,
.resume = uvd_v4_2_resume,
- .is_idle = uvd_v4_2_is_idle,
.wait_for_idle = uvd_v4_2_wait_for_idle,
.soft_reset = uvd_v4_2_soft_reset,
.set_clockgating_state = uvd_v4_2_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
index 454f109cbb2e..564d8fb58905 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
@@ -580,13 +580,6 @@ static void uvd_v5_0_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count)
}
}
-static bool uvd_v5_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
-
- return !(RREG32(mmSRBM_STATUS) & SRBM_STATUS__UVD_BUSY_MASK);
-}
-
static int uvd_v5_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
unsigned i;
@@ -869,7 +862,6 @@ static const struct amd_ip_funcs uvd_v5_0_ip_funcs = {
.prepare_suspend = uvd_v5_0_prepare_suspend,
.suspend = uvd_v5_0_suspend,
.resume = uvd_v5_0_resume,
- .is_idle = uvd_v5_0_is_idle,
.wait_for_idle = uvd_v5_0_wait_for_idle,
.soft_reset = uvd_v5_0_soft_reset,
.set_clockgating_state = uvd_v5_0_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
index 81bba3ec2a93..531643c3e32e 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -2212,21 +2212,6 @@ static int vcn_v3_0_reset(struct amdgpu_vcn_inst *vinst)
return vcn_v3_0_start(vinst);
}
-static bool vcn_v3_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int i, ret = 1;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
- if (adev->vcn.harvest_config & (1 << i))
- continue;
-
- ret &= (RREG32_SOC15(VCN, i, mmUVD_STATUS) == UVD_STATUS__IDLE);
- }
-
- return ret;
-}
-
static int vcn_v3_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = ip_block->adev;
@@ -2372,7 +2357,6 @@ static const struct amd_ip_funcs vcn_v3_0_ip_funcs = {
.hw_fini = vcn_v3_0_hw_fini,
.suspend = vcn_v3_0_suspend,
.resume = vcn_v3_0_resume,
- .is_idle = vcn_v3_0_is_idle,
.wait_for_idle = vcn_v3_0_wait_for_idle,
.set_clockgating_state = vcn_v3_0_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index 0cce78b205a8..fcfb48f017aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -2087,28 +2087,6 @@ static void vcn_v4_0_set_unified_ring_funcs(struct amdgpu_device *adev)
}
}
-/**
- * vcn_v4_0_is_idle - check VCN block is idle
- *
- * @ip_block: Pointer to the amdgpu_ip_block structure
- *
- * Check whether VCN block is idle
- */
-static bool vcn_v4_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int i, ret = 1;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
- if (adev->vcn.harvest_config & (1 << i))
- continue;
-
- ret &= (RREG32_SOC15(VCN, i, regUVD_STATUS) == UVD_STATUS__IDLE);
- }
-
- return ret;
-}
-
/**
* vcn_v4_0_wait_for_idle - wait for VCN block idle
*
@@ -2300,7 +2278,6 @@ static const struct amd_ip_funcs vcn_v4_0_ip_funcs = {
.hw_fini = vcn_v4_0_hw_fini,
.suspend = vcn_v4_0_suspend,
.resume = vcn_v4_0_resume,
- .is_idle = vcn_v4_0_is_idle,
.wait_for_idle = vcn_v4_0_wait_for_idle,
.set_clockgating_state = vcn_v4_0_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
index 179b892fb410..3d28289bc4f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
@@ -1840,26 +1840,6 @@ static void vcn_v4_0_3_set_unified_ring_funcs(struct amdgpu_device *adev)
}
}
-/**
- * vcn_v4_0_3_is_idle - check VCN block is idle
- *
- * @ip_block: Pointer to the amdgpu_ip_block structure
- *
- * Check whether VCN block is idle
- */
-static bool vcn_v4_0_3_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int i, ret = 1;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
- ret &= (RREG32_SOC15(VCN, GET_INST(VCN, i), regUVD_STATUS) ==
- UVD_STATUS__IDLE);
- }
-
- return ret;
-}
-
/**
* vcn_v4_0_3_wait_for_idle - wait for VCN block idle
*
@@ -2049,7 +2029,6 @@ static const struct amd_ip_funcs vcn_v4_0_3_ip_funcs = {
.hw_fini = vcn_v4_0_3_hw_fini,
.suspend = vcn_v4_0_3_suspend,
.resume = vcn_v4_0_3_resume,
- .is_idle = vcn_v4_0_3_is_idle,
.wait_for_idle = vcn_v4_0_3_wait_for_idle,
.set_clockgating_state = vcn_v4_0_3_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
index c8879a6e5297..660dab262dfb 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
@@ -1531,28 +1531,6 @@ static void vcn_v4_0_5_set_unified_ring_funcs(struct amdgpu_device *adev)
}
}
-/**
- * vcn_v4_0_5_is_idle - check VCN block is idle
- *
- * @ip_block: Pointer to the amdgpu_ip_block structure
- *
- * Check whether VCN block is idle
- */
-static bool vcn_v4_0_5_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int i, ret = 1;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
- if (adev->vcn.harvest_config & (1 << i))
- continue;
-
- ret &= (RREG32_SOC15(VCN, i, regUVD_STATUS) == UVD_STATUS__IDLE);
- }
-
- return ret;
-}
-
/**
* vcn_v4_0_5_wait_for_idle - wait for VCN block idle
*
@@ -1707,7 +1685,6 @@ static const struct amd_ip_funcs vcn_v4_0_5_ip_funcs = {
.hw_fini = vcn_v4_0_5_hw_fini,
.suspend = vcn_v4_0_5_suspend,
.resume = vcn_v4_0_5_resume,
- .is_idle = vcn_v4_0_5_is_idle,
.wait_for_idle = vcn_v4_0_5_wait_for_idle,
.set_clockgating_state = vcn_v4_0_5_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
index 886e2c2074a9..08fca20b2c99 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
@@ -1317,28 +1317,6 @@ static void vcn_v5_0_0_set_unified_ring_funcs(struct amdgpu_device *adev)
}
}
-/**
- * vcn_v5_0_0_is_idle - check VCN block is idle
- *
- * @ip_block: Pointer to the amdgpu_ip_block structure
- *
- * Check whether VCN block is idle
- */
-static bool vcn_v5_0_0_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int i, ret = 1;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
- if (adev->vcn.harvest_config & (1 << i))
- continue;
-
- ret &= (RREG32_SOC15(VCN, i, regUVD_STATUS) == UVD_STATUS__IDLE);
- }
-
- return ret;
-}
-
/**
* vcn_v5_0_0_wait_for_idle - wait for VCN block idle
*
@@ -1493,7 +1471,6 @@ static const struct amd_ip_funcs vcn_v5_0_0_ip_funcs = {
.hw_fini = vcn_v5_0_0_hw_fini,
.suspend = vcn_v5_0_0_suspend,
.resume = vcn_v5_0_0_resume,
- .is_idle = vcn_v5_0_0_is_idle,
.wait_for_idle = vcn_v5_0_0_wait_for_idle,
.set_clockgating_state = vcn_v5_0_0_set_clockgating_state,
.set_powergating_state = vcn_set_powergating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
index 1a07c3bf4425..b3b83ad20103 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
@@ -1483,24 +1483,6 @@ static void vcn_v5_0_1_set_unified_ring_funcs(struct amdgpu_device *adev)
}
}
-/**
- * vcn_v5_0_1_is_idle - check VCN block is idle
- *
- * @ip_block: Pointer to the amdgpu_ip_block structure
- *
- * Check whether VCN block is idle
- */
-static bool vcn_v5_0_1_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int i, ret = 1;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i)
- ret &= (RREG32_SOC15(VCN, GET_INST(VCN, i), regUVD_STATUS) == UVD_STATUS__IDLE);
-
- return ret;
-}
-
/**
* vcn_v5_0_1_wait_for_idle - wait for VCN block idle
*
@@ -1672,7 +1654,6 @@ static const struct amd_ip_funcs vcn_v5_0_1_ip_funcs = {
.hw_fini = vcn_v5_0_1_hw_fini,
.suspend = vcn_v5_0_1_suspend,
.resume = vcn_v5_0_1_resume,
- .is_idle = vcn_v5_0_1_is_idle,
.wait_for_idle = vcn_v5_0_1_wait_for_idle,
.soft_reset = NULL,
.set_clockgating_state = vcn_v5_0_1_set_clockgating_state,
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c
index b9f6ae75ea72..c4a64beacd32 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c
@@ -1040,24 +1040,6 @@ static void vcn_v5_0_2_set_unified_ring_funcs(struct amdgpu_device *adev)
}
}
-/**
- * vcn_v5_0_2_is_idle - check VCN block is idle
- *
- * @ip_block: Pointer to the amdgpu_ip_block structure
- *
- * Check whether VCN block is idle
- */
-static bool vcn_v5_0_2_is_idle(struct amdgpu_ip_block *ip_block)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int i, ret = 1;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i)
- ret &= (RREG32_SOC15(VCN, GET_INST(VCN, i), regUVD_STATUS) == UVD_STATUS__IDLE);
-
- return ret;
-}
-
/**
* vcn_v5_0_2_wait_for_idle - wait for VCN block idle
*
@@ -1201,7 +1183,6 @@ static const struct amd_ip_funcs vcn_v5_0_2_ip_funcs = {
.hw_fini = vcn_v5_0_2_hw_fini,
.suspend = vcn_v5_0_2_suspend,
.resume = vcn_v5_0_2_resume,
- .is_idle = vcn_v5_0_2_is_idle,
.wait_for_idle = vcn_v5_0_2_wait_for_idle,
.soft_reset = NULL,
.set_clockgating_state = vcn_v5_0_2_set_clockgating_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread