aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2024-12-10 14:25:46 -0500
committerAlex Deucher <alexander.deucher@amd.com>2025-02-27 15:52:32 -0500
commit31a37dfc8f0be35b3668a3e5092d8788b94b6607 (patch)
tree48652a1b11d8166a6501a902f877d25198433d80
parentdrm/amdgpu/vcn5.0.0: use generic set_power_gating_state helper (diff)
downloadwireguard-linux-31a37dfc8f0be35b3668a3e5092d8788b94b6607.tar.xz
wireguard-linux-31a37dfc8f0be35b3668a3e5092d8788b94b6607.zip
drm/amdgpu/vcn5.0.1: use generic set_power_gating_state helper
No need for an IP specific version. Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c27
1 files changed, 1 insertions, 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 da6cbb172f62..900702b1a3bb 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);
/**
@@ -1042,29 +1040,6 @@ static int vcn_v5_0_1_set_pg_state(struct amdgpu_vcn_inst *vinst,
}
/**
- * 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
*
* @adev: amdgpu_device pointer
@@ -1142,7 +1117,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,
};