[PATCH v4 2/3] drm/amd/display: use a more lax vblank enable policy for DCN35+
Hamza Mahfooz
hamza.mahfooz at amd.com
Thu Aug 22 15:58:21 UTC 2024
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 at amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz at amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 00d4c97e8d26..68442cb857fc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -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 */
@@ -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(
--
2.46.0
More information about the amd-gfx
mailing list