mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/amdgpu/vcn5.0.0: 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>
This commit is contained in:
parent
4bb5879322
commit
9b648fa54c
|
|
@ -80,8 +80,6 @@ static void vcn_v5_0_0_set_unified_ring_funcs(struct amdgpu_device *adev);
|
|||
static void vcn_v5_0_0_set_irq_funcs(struct amdgpu_device *adev);
|
||||
static int vcn_v5_0_0_set_pg_state(struct amdgpu_vcn_inst *vinst,
|
||||
enum amd_powergating_state state);
|
||||
static int vcn_v5_0_0_set_powergating_state(struct amdgpu_ip_block *ip_block,
|
||||
enum amd_powergating_state state);
|
||||
static int vcn_v5_0_0_pause_dpg_mode(struct amdgpu_vcn_inst *vinst,
|
||||
struct dpg_pause_state *new_state);
|
||||
static void vcn_v5_0_0_unified_ring_set_wptr(struct amdgpu_ring *ring);
|
||||
|
|
@ -1321,29 +1319,6 @@ static int vcn_v5_0_0_set_pg_state(struct amdgpu_vcn_inst *vinst,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* vcn_v5_0_0_set_powergating_state - set VCN block powergating state
|
||||
*
|
||||
* @ip_block: amdgpu_ip_block pointer
|
||||
* @state: power gating state
|
||||
*
|
||||
* Set VCN block powergating state
|
||||
*/
|
||||
static int vcn_v5_0_0_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_0_process_interrupt - process VCN block interrupt
|
||||
*
|
||||
|
|
@ -1485,7 +1460,7 @@ static const struct amd_ip_funcs vcn_v5_0_0_ip_funcs = {
|
|||
.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_v5_0_0_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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user