Skip to content

Commit

Permalink
drm/amd/display: pause the workload setting in dm
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Kenneth Feng authored and Alex Deucher committed Apr 9, 2025
1 parent c81a3ce commit 50f29ea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
struct vblank_control_work *vblank_work =
container_of(work, struct vblank_control_work, work);
struct amdgpu_display_manager *dm = vblank_work->dm;
struct amdgpu_device *adev = drm_to_adev(dm->ddev);
int r;

mutex_lock(&dm->dc_lock);

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

if (dm->active_vblank_irq_count == 0)
if (dm->active_vblank_irq_count == 0) {
r = amdgpu_dpm_pause_power_profile(adev, true);
if (r)
dev_warn(adev->dev, "failed to set default power profile mode\n");
dc_allow_idle_optimizations(dm->dc, true);
r = amdgpu_dpm_pause_power_profile(adev, false);
if (r)
dev_warn(adev->dev, "failed to restore the power profile mode\n");
}

mutex_unlock(&dm->dc_lock);

Expand Down

0 comments on commit 50f29ea

Please sign in to comment.