Skip to content

Commit

Permalink
drm/amd/display: use a more lax vblank enable policy for DCN35+
Browse files Browse the repository at this point in the history
Ideally, we want to enable immediate vblank disable, when possible and
we should be able to do so on DCN35+, if PSR isn't supported by a given
CRTC.

Suggested-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240822161856.174600-3-hamza.mahfooz@amd.com
  • Loading branch information
Hamza Mahfooz committed Aug 23, 2024
1 parent 537ef0f commit e45b671
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -8246,7 +8246,8 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
IP_VERSION(3, 5, 0)) {
drm_crtc_vblank_on(&acrtc->base);
} else {
} else if (acrtc_state->stream->link->psr_settings.psr_version <
DC_PSR_VERSION_UNSUPPORTED) {
timing = &acrtc_state->stream->timing;

/* at least 2 frames */
Expand All @@ -8258,6 +8259,10 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
config.offdelay_ms = offdelay ?: 30;
drm_crtc_vblank_on_config(&acrtc->base,
&config);
} else {
config.disable_immediate = true;
drm_crtc_vblank_on_config(&acrtc->base,
&config);
}

amdgpu_irq_get(
Expand Down

0 comments on commit e45b671

Please sign in to comment.