Commit 5af50b0b authored by Bindu Ramamurthy's avatar Bindu Ramamurthy Committed by Alex Deucher
Browse files

drm/amd/display: Allow idle optimization based on vblank.

idle optimization was being disabled after commit.

check vblank count for display off and enable idle optimization based on this count.
Also,check added to ensure vblank count does not decrement, when count reaches 0.

Reviewed-by: default avatarKenneth Feng <>
Signed-off-by: default avatarBindu Ramamurthy <>
Signed-off-by: default avatarAlex Deucher <>
parent 5bf314ab
......@@ -1013,7 +1013,7 @@ static void event_mall_stutter(struct work_struct *work)
if (vblank_work->enable)
else if(dm->active_vblank_irq_count)
dc_allow_idle_optimizations(dm->dc, dm->active_vblank_irq_count == 0);
......@@ -8678,9 +8678,14 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
WARN_ON(!dc_commit_state(dm->dc, dc_state));
#if defined(CONFIG_DRM_AMD_DC_DCN)
/* Allow idle optimization when vblank count is 0 for display off */
if (dm->active_vblank_irq_count == 0)
for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment