drm/amdgpu: Remove is_idle method
cover drm/amdgpu: Remove is_idle method
From: "Dr. David Alan Gilbert" <[email protected]>
The is_idle method in amd_ip_funcs is never called, however there are some functions assigned to it.
Remove the bindings to it, and if the functions aren't called anywhere else remove the function as well.
Remove the kunit test hook for it.
In many cases the wait_for_idle code either calls the function which was wired to is_idle or duplicates the code (or curiously kind of duplicates it with changes).
Based on drm-next-7.3 0d710af8e4abdd1fa500bddbab7c0ee47fc98143. Booted on my Ryzen with RX560.
(That is spewing some warnings of the form:
[ 9.680879] [PLANE:44:plane-0] pixel format with alpha exposed but blend mode not setup [ 9.680881] WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0x3c2/0x4f0, CPU#4: (udev-worker)/538
but I don't *think* I've gone anywhere near anything to do with pixel formats etc)
Dr. David Alan Gilbert (4):
drm/amdgpu: Remove is_idle test case drm/amdgpu: Remove is_idle (trivial cases) drm/amdgpu: Remove is_idle (non trivial functions) drm/amdgpu: Remove is_idle
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_ih.c | 12 ---------- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 - drivers/gpu/drm/amd/amdgpu/cz_ih.c | 12 ---------- 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_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_v12_1.c | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 --------- 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_v8_0.c | 13 ----------- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ------ drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 12 ---------- 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/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/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/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/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/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 --------------- 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 ----- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 - .../display/amdgpu_dm/tests/amdgpu_dm_test.c | 10 -------- drivers/gpu/drm/amd/include/amd_shared.h | 2 -- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 6 ----- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 7 ------ .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 6 ----- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 - 87 files changed, 639 deletions(-)
Signature · 1 line
2.55.0
PATCH 1/4 drm/amdgpu: Remove is_idle test case
From: "Dr. David Alan Gilbert" <[email protected]>
Remove the kunit test case for the is_idle call we're about to remove.
--- .../drm/amd/display/amdgpu_dm/tests/amdgpu_dm_test.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_test.c +0 -10
@@ -23,15 +23,6 @@/* Tests for simple DM callbacks */ -/** -* dm_test_is_idle - Test placeholder idle callback returns true -* @test: The KUnit test context -*/ -static void dm_test_is_idle (struct kunit *test) -{ -KUNIT_EXPECT_TRUE (test,dm_is_idle (NULL )); -} -/** * dm_test_wait_for_idle - Test placeholder wait-for-idle callback returns success * @test: The KUnit test context
@@ -1152,7 +1143,6 @@ static void dm_test_apply_delay_nonzero_wait(struct kunit *test)static struct kunit_case amdgpu_dm_tests[] = {/* Simple DM callbacks */ -KUNIT_CASE (dm_test_is_idle),KUNIT_CASE (dm_test_wait_for_idle),KUNIT_CASE (dm_test_soft_reset),KUNIT_CASE (dm_test_set_clockgating_state),
Signature · 1 line
2.55.0
PATCH 2/4 drm/amdgpu: Remove is_idle (trivial cases)
In reply to [email protected]From: "Dr. David Alan Gilbert" <[email protected]>
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.
--- 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +0 -6
@@ -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,
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/amdgpu/cik.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/ih_v6_1.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/ih_v7_0.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c +0 -2
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_2.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/jpeg_v5_3_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/nv.c +0 -6
@@ -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,
drivers/gpu/drm/amd/amdgpu/si.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/amdgpu/si_dma.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/si_ih.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -6
@@ -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,
drivers/gpu/drm/amd/amdgpu/soc21.c +0 -6
@@ -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,
drivers/gpu/drm/amd/amdgpu/soc24.c +0 -6
@@ -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,
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +0 -6
@@ -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,
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/vce_v1_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -1
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +0 -2
@@ -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,
drivers/gpu/drm/amd/amdgpu/vega10_ih.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/vega20_ih.c +0 -7
@@ -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,
drivers/gpu/drm/amd/amdgpu/vi.c +0 -6
@@ -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,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -8
@@ -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,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +0 -1
@@ -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,
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +0 -7
@@ -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,
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +0 -6
@@ -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, };
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -1
@@ -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,
Signature · 1 line
2.55.0
PATCH 3/4 drm/amdgpu: Remove is_idle (non trivial functions)
In reply to [email protected]From: "Dr. David Alan Gilbert" <[email protected]>
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.
--- 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(-)
drivers/gpu/drm/amd/amdgpu/cik_ih.c +0 -12
@@ -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,
drivers/gpu/drm/amd/amdgpu/cz_ih.c +0 -12
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0 -12
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0 -12
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0 -12
@@ -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,
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +0 -11
@@ -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,
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +0 -13
@@ -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,
drivers/gpu/drm/amd/amdgpu/iceland_ih.c +0 -12
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +0 -13
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +0 -13
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/tonga_ih.c +0 -12
@@ -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,
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c +0 -8
@@ -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,
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +0 -8
@@ -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,
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +0 -8
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +0 -16
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +0 -23
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +0 -21
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +0 -23
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +0 -23
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +0 -19
@@ -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,
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_2.c +0 -19
@@ -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,
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH 3/4] drm/amdgpu: Remove is_idle (non trivial functions)
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Incomplete API cleanup: The `is_idle` function pointer remains defined in `struct amd_ip_funcs`. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incomplete API cleanup: The is_idle function pointer remains defined in struct amd_ip_funcs. --
--- Patch [3]: [PATCH 3/4] drm/amdgpu: Remove is_idle (non trivial functions) --- commit cf17e80a1ef9c0d7e6925465357af056c949e840
Author: Dr. David Alan Gilbert <[email protected]>
drm/amdgpu: Remove is_idle (non trivial functions)
This commit removes the various is_idle implementations across the amdgpu driver since the method is never called. The same logic is mostly duplicated in the wait_for_idle method which remains in use.
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/cik_ih.c +0
-0
[ ... ]
drivers/gpu/drm/amd/amdgpu/cik_ih.c static const struct amd_ip_funcs cik_ih_ip_funcs = { · line 427
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/cik_ih.c +0
-1@@ -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,
[Severity: Low]
Since we are removing the .is_idle assignments across the tree, is it also worth removing the is_idle function pointer from the struct amd_ip_funcs definition in drivers/gpu/drm/amd/include/amd_shared.h to complete the API cleanup?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Re: [PATCH 3/4] drm/amdgpu: Remove is_idle (non trivial functions)
Quoted 18 lines · * [email protected] ([email protected]) wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incomplete API cleanup: Theis_idlefunction pointer remains defined instruct amd_ip_funcs. ----- Patch [3]: [PATCH 3/4] drm/amdgpu: Remove
is_idle(non trivial functions) --- commitcf17e80a1ef9c0d7e6925465357af056c949e840
Author: Dr. David Alan Gilbert <[email protected]>drm/amdgpu: Remove
is_idle(non trivial functions)This commit removes the various
is_idleimplementations across the amdgpu driver since the method is never called. The same logic is mostly duplicated in thewait_for_idlemethod which remains in use.Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/cik_ih.c +0
-0[ ... ]
Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/cik_ih.c static const struct amd_ip_funcs cik_ih_ip_funcs = { · line 427
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/cik_ih.c +0
-1@@ -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,[Severity: Low]
Since we are removing the .is_idle assignments across the tree, is it also worth removing theis_idlefunction pointer from the structamd_ip_funcsdefinition indrivers/gpu/drm/amd/include/amd_shared.hto complete the API cleanup?
That's what I do in the next patch!
Dave
Quoted 3 lines
Signature · 2 lines
-- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/
PATCH 4/4 drm/amdgpu: Remove is_idle
In reply to [email protected]From: "Dr. David Alan Gilbert" <[email protected]>
Remove the actual is_idle member, since it's never read/called and the previous patches have remove all the assignments.
--- drivers/gpu/drm/amd/include/amd_shared.h | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/include/amd_shared.h +0 -2
@@ -437,7 +437,6 @@ enum amd_dpm_forced_level;* @suspend: handles IP specific hw/sw changes for suspend * @resume: handles IP specific hw/sw changes for resume * @complete: handles IP specific changes after resume -* @is_idle: returns current IP block idle status * @wait_for_idle: poll for idle * @soft_reset: soft reset the IP block * @set_clockgating_state: enable/disable cg for the IP block
@@ -466,7 +465,6 @@ struct amd_ip_funcs {int (*suspend)(struct amdgpu_ip_block *ip_block);int (*resume)(struct amdgpu_ip_block *ip_block);void (*complete)(struct amdgpu_ip_block *ip_block); -bool (*is_idle)(struct amdgpu_ip_block *ip_block);int (*wait_for_idle)(struct amdgpu_ip_block *ip_block);int (*soft_reset)(struct amdgpu_ip_block *ip_block); int (*set_clockgating_state)(struct amdgpu_ip_block *ip_block,
Signature · 1 line
2.55.0
Alex Deucher
AppliedApplied. Thanks.
Alex
Quoted 125 lines · On Sat, Aug 15, 2026 at 2:22 PM <[email protected]> wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
The
is_idlemethod inamd_ip_funcsis never called, however there are some functions assigned to it.Remove the bindings to it, and if the functions aren't called anywhere else remove the function as well.
Remove the kunit test hook for it.
In many cases the
wait_for_idlecode either calls the function which was wired tois_idleor duplicates the code (or curiously kind of duplicates it with changes).Based on drm-next-7.3
0d710af8e4abdd1fa500bddbab7c0ee47fc98143. Booted on my Ryzen with RX560.
(That is spewing some warnings of the form:[ 9.680879] [PLANE:44:plane-0] pixel format with alpha exposed but blend mode not setup [ 9.680881] WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0x3c2/0x4f0, CPU#4: (udev-worker)/538but I don't *think* I've gone anywhere near anything to do with pixel formats etc)
Signed-off-by Dr. David Alan Gilbert <[email protected]>Dr. David Alan Gilbert (4):
drm/amdgpu: Removeis_idletest case drm/amdgpu: Removeis_idle(trivial cases) drm/amdgpu: Removeis_idle(non trivial functions) drm/amdgpu: Removeis_idledrivers/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_ih.c | 12 ---------- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 - drivers/gpu/drm/amd/amdgpu/cz_ih.c | 12 ---------- 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_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_v12_1.c | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 11 --------- 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_v8_0.c | 13 ----------- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ------ drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 12 ---------- 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/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/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/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/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/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 --------------- 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 ----- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 - .../display/amdgpu_dm/tests/amdgpu_dm_test.c | 10 -------- drivers/gpu/drm/amd/include/amd_shared.h | 2 -- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 6 ----- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 7 ------ .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 6 ----- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 - 87 files changed, 639 deletions(-)--
2.55.0
Quoted 1 line · Alex Deucher
Applied. Thanks.
Any hints on where this was applied and if it will get to Linus "soon"?
thanks,
greg k-h
Quoted 5 lines · Greg KH
Quoted 1 line · Alex Deucher
Applied. Thanks.
Any hints on where this was applied and if it will get to Linus "soon"?
It will show up in drm-next after the merge window closes. 7.4 material.
Alex
Quoted 4 lines
thanks,
greg k-h
Quoted 8 lines · Alex Deucher
Quoted 5 lines · Greg KH
Quoted 1 line · Alex Deucher
Applied. Thanks.
Any hints on where this was applied and if it will get to Linus "soon"?
It will show up in drm-next after the merge window closes. 7.4 material.
Sorry, but this is hitting me now, pre 7.3-rc1. Booting and getting a zillion kernel warnings isn't ok, that's a regression. Please get this merged sooner than that.
greg k-h
Quoted 6 lines · * Greg KH ([email protected]) wrote:
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Greg KH
Quoted 1 line · Alex Deucher
Applied. Thanks.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Any hints on where this was applied and if it will get to Linus "soon"?
It will show up in drm-next after the merge window closes. 7.4 material.
Sorry, but this is hitting me now, pre 7.3-rc1. Booting and getting a zillion kernel warnings isn't ok, that's a regression. Please get this merged sooner than that.
Hey? This patch doesn't fix anything - it's purely dead code. My comment about the log errors I saw were about the head of drm-next I tested on, not about this patch.
Dave
Quoted 1 line
greg k-h
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/
Quoted 11 lines · Dr. David Alan Gilbert
Quoted 10 lines · * Greg KH ([email protected]) wrote:
Quoted 8 lines · Alex Deucher
Quoted 5 lines · Greg KH
Quoted 1 line · Alex Deucher
Applied. Thanks.
Any hints on where this was applied and if it will get to Linus "soon"?
It will show up in drm-next after the merge window closes. 7.4 material.
Quoted 7 lines
Quoted 3 lines
Sorry, but this is hitting me now, pre 7.3-rc1. Booting and getting a zillion kernel warnings isn't ok, that's a regression. Please get this merged sooner than that.
Hey? This patch doesn't fix anything - it's purely dead code. My comment about the log errors I saw were about the head of drm-next I tested on, not about this patch.
Ah, my fault, my search found that and assumed this thread was the fix for that. Nevermind :)
greg k-h
Quoted 7 lines · Greg KH
Quoted 5 lines · Alex Deucher
Quoted 4 lines · Greg KH
Quoted 1 line · Alex Deucher
Applied. Thanks.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Any hints on where this was applied and if it will get to Linus "soon"?
It will show up in drm-next after the merge window closes. 7.4 material.
Sorry, but this is hitting me now, pre 7.3-rc1. Booting and getting a zillion kernel warnings isn't ok, that's a regression. Please get this merged sooner than that.
I assume this is the series that fixes the warning you are seeing:
https://lore.kernel.org/all/[email protected]/
We are working on picking it up now.
Alex
Quoted 2 lines
greg k-h
Quoted 12 lines · Alex Deucher
Quoted 11 lines · Greg KH
Quoted 8 lines · Alex Deucher
Quoted 5 lines · Greg KH
Quoted 1 line · Alex Deucher
Applied. Thanks.
Any hints on where this was applied and if it will get to Linus "soon"?
It will show up in drm-next after the merge window closes. 7.4 material.
Quoted 7 lines
Quoted 3 lines
Sorry, but this is hitting me now, pre 7.3-rc1. Booting and getting a zillion kernel warnings isn't ok, that's a regression. Please get this merged sooner than that.
I assume this is the series that fixes the warning you are seeing:
https://lore.kernel.org/all/[email protected]/
We are working on picking it up now.
Ok, great, sorry for the confusion, my bad.
greg k-h