Skip to content

Commit 50f29ea

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amd/display: pause the workload setting in dm
Pause the workload setting in dm when doing idle optimization Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit b23f81c)
1 parent c81a3ce commit 50f29ea

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
246246
struct vblank_control_work *vblank_work =
247247
container_of(work, struct vblank_control_work, work);
248248
struct amdgpu_display_manager *dm = vblank_work->dm;
249+
struct amdgpu_device *adev = drm_to_adev(dm->ddev);
250+
int r;
249251

250252
mutex_lock(&dm->dc_lock);
251253

@@ -273,8 +275,15 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
273275
vblank_work->acrtc->dm_irq_params.allow_sr_entry);
274276
}
275277

276-
if (dm->active_vblank_irq_count == 0)
278+
if (dm->active_vblank_irq_count == 0) {
279+
r = amdgpu_dpm_pause_power_profile(adev, true);
280+
if (r)
281+
dev_warn(adev->dev, "failed to set default power profile mode\n");
277282
dc_allow_idle_optimizations(dm->dc, true);
283+
r = amdgpu_dpm_pause_power_profile(adev, false);
284+
if (r)
285+
dev_warn(adev->dev, "failed to restore the power profile mode\n");
286+
}
278287

279288
mutex_unlock(&dm->dc_lock);
280289

0 commit comments

Comments
 (0)