mirror of
https://github.com/torvalds/linux.git
synced 2026-04-20 07:43:57 -04:00
drm/amdgpu: introduce an interface to get clock gating status dynamically
Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1131,6 +1131,18 @@ int amdgpu_set_powergating_state(struct amdgpu_device *adev,
|
||||
return r;
|
||||
}
|
||||
|
||||
void amdgpu_get_clockgating_state(struct amdgpu_device *adev, u32 *flags)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < adev->num_ip_blocks; i++) {
|
||||
if (!adev->ip_blocks[i].status.valid)
|
||||
continue;
|
||||
if (adev->ip_blocks[i].version->funcs->get_clockgating_state)
|
||||
adev->ip_blocks[i].version->funcs->get_clockgating_state((void *)adev, flags);
|
||||
}
|
||||
}
|
||||
|
||||
int amdgpu_wait_for_idle(struct amdgpu_device *adev,
|
||||
enum amd_ip_block_type block_type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user