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:
Huang Rui
2017-01-05 18:44:41 +08:00
committed by Alex Deucher
parent c8394f38fa
commit 6cb2d4e4f3
4 changed files with 19 additions and 0 deletions

View File

@@ -1365,6 +1365,10 @@ static int amdgpu_debugfs_pm_info(struct seq_file *m, void *data)
struct drm_device *dev = node->minor->dev;
struct amdgpu_device *adev = dev->dev_private;
struct drm_device *ddev = adev->ddev;
u32 flags = 0;
amdgpu_get_clockgating_state(adev, &flags);
seq_printf(m, "Clock Gating Flags Mask: 0x%x\n", flags);
if (!adev->pm.dpm_enabled) {
seq_printf(m, "dpm not enabled\n");