[PATCH 42/48] drm/amdgpu/vcn5.0.1: use generic set_power_gating_state helper
Alex Deucher
alexander.deucher at amd.com
Tue Dec 10 22:53:31 UTC 2024
No need for an IP specific version.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 27 +------------------------
1 file changed, 1 insertion(+), 26 deletions(-)
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 586cdef6f663e..bd79d88c9ed36 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
@@ -42,8 +42,6 @@ static void vcn_v5_0_1_set_unified_ring_funcs(struct amdgpu_device *adev);
static void vcn_v5_0_1_set_irq_funcs(struct amdgpu_device *adev);
static int vcn_v5_0_1_set_pg_state(struct amdgpu_vcn_inst *vinst,
enum amd_powergating_state state);
-static int vcn_v5_0_1_set_powergating_state(struct amdgpu_ip_block *ip_block,
- enum amd_powergating_state state);
static void vcn_v5_0_1_unified_ring_set_wptr(struct amdgpu_ring *ring);
/**
@@ -1051,29 +1049,6 @@ static int vcn_v5_0_1_set_pg_state(struct amdgpu_vcn_inst *vinst,
return ret;
}
-/**
- * vcn_v5_0_1_set_powergating_state - set VCN block powergating state
- *
- * @ip_block: Pointer to the amdgpu_ip_block for this hw instance.
- * @state: power gating state
- *
- * Set VCN block powergating state
- */
-static int vcn_v5_0_1_set_powergating_state(struct amdgpu_ip_block *ip_block,
- enum amd_powergating_state state)
-{
- struct amdgpu_device *adev = ip_block->adev;
- int ret = 0, i;
-
- for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
- struct amdgpu_vcn_inst *vinst = &adev->vcn.inst[i];
-
- ret |= vinst->set_pg_state(vinst, state);
- }
-
- return ret;
-}
-
/**
* vcn_v5_0_1_process_interrupt - process VCN block interrupt
*
@@ -1152,7 +1127,7 @@ static const struct amd_ip_funcs vcn_v5_0_1_ip_funcs = {
.soft_reset = NULL,
.post_soft_reset = NULL,
.set_clockgating_state = vcn_v5_0_1_set_clockgating_state,
- .set_powergating_state = vcn_v5_0_1_set_powergating_state,
+ .set_powergating_state = vcn_set_powergating_state,
.dump_ip_state = vcn_v5_0_0_dump_ip_state,
.print_ip_state = vcn_v5_0_0_print_ip_state,
};
--
2.47.1
More information about the amd-gfx
mailing list