Skip to content

Commit 5d7b36d

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amd/display: pause the workload setting in dm
v1: Pause the workload setting in dm when doinn idle optimization v2: Rebase patch to latest kernel code base (kernel 6.16) 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> Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit bc6d54ac7e7436721a19443265f971f890c13cc5)
1 parent 745bae7 commit 5d7b36d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
248248
struct vblank_control_work *vblank_work =
249249
container_of(work, struct vblank_control_work, work);
250250
struct amdgpu_display_manager *dm = vblank_work->dm;
251+
struct amdgpu_device *adev = drm_to_adev(dm->ddev);
252+
int r;
251253

252254
mutex_lock(&dm->dc_lock);
253255

@@ -277,7 +279,16 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
277279

278280
if (dm->active_vblank_irq_count == 0) {
279281
dc_post_update_surfaces_to_stream(dm->dc);
282+
283+
r = amdgpu_dpm_pause_power_profile(adev, true);
284+
if (r)
285+
dev_warn(adev->dev, "failed to set default power profile mode\n");
286+
280287
dc_allow_idle_optimizations(dm->dc, true);
288+
289+
r = amdgpu_dpm_pause_power_profile(adev, false);
290+
if (r)
291+
dev_warn(adev->dev, "failed to restore the power profile mode\n");
281292
}
282293

283294
mutex_unlock(&dm->dc_lock);

0 commit comments

Comments
 (0)