diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c index e997ebbe43ea..def1010ac05e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | |||
@@ -115,6 +115,26 @@ void amdgpu_dpm_print_ps_status(struct amdgpu_device *adev, | |||
115 | pr_cont("\n"); | 115 | pr_cont("\n"); |
116 | } | 116 | } |
117 | 117 | ||
118 | void amdgpu_dpm_get_active_displays(struct amdgpu_device *adev) | ||
119 | { | ||
120 | struct drm_device *ddev = adev->ddev; | ||
121 | struct drm_crtc *crtc; | ||
122 | struct amdgpu_crtc *amdgpu_crtc; | ||
123 | |||
124 | adev->pm.dpm.new_active_crtcs = 0; | ||
125 | adev->pm.dpm.new_active_crtc_count = 0; | ||
126 | if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) { | ||
127 | list_for_each_entry(crtc, | ||
128 | &ddev->mode_config.crtc_list, head) { | ||
129 | amdgpu_crtc = to_amdgpu_crtc(crtc); | ||
130 | if (amdgpu_crtc->enabled) { | ||
131 | adev->pm.dpm.new_active_crtcs |= (1 << amdgpu_crtc->crtc_id); | ||
132 | adev->pm.dpm.new_active_crtc_count++; | ||
133 | } | ||
134 | } | ||
135 | } | ||
136 | } | ||
137 | |||
118 | 138 | ||
119 | u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev) | 139 | u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev) |
120 | { | 140 | { |