From: Leo Li <sunpeng...@amd.com>

[Why]

The `vblank_config.offdelay` field follows the same semantics as the
`drm_vblank_offdelay` parameter. Setting it to 0 will never disable
vblank.

[How]

Set `offdelay` to a positive number.

Fixes: e45b6716de4b ("drm/amd/display: use a more lax vblank enable policy for 
DCN35+")

Reviewed-by: Harry Wentland <harry.wentl...@amd.com>
Signed-off-by: Leo Li <sunpeng...@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pil...@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)

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 684f131e5c4e..469d0039a54f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8733,6 +8733,8 @@ static void manage_dm_interrupts(struct amdgpu_device 
*adev,
 
                        config.offdelay_ms = offdelay ?: 30;
                } else {
+                       /* offdelay_ms = 0 will never disable vblank */
+                       config.offdelay_ms = 1;
                        config.disable_immediate = true;
                }
 
-- 
2.49.0

Reply via email to