Skip to content

Commit 7089784

Browse files
Nicholas Kazlauskasalexdeucher
authored andcommitted
drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled
[Why] PSR currently relies on the kernel's delayed vblank on/off mechanism as an implicit bufferring mechanism to prevent excessive entry/exit. Without this delay the user experience is impacted since it can take a few frames to enter/exit. [How] Only allow vblank disable immediate for DC when psr is not supported. Leave a TODO indicating that this support should be extended in the future to delay independent of the vblank interrupt. Fixes: 92020e8 ("drm/amdgpu/display: set vblank_disable_immediate for DC") Acked-by: Alex Deucher <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1f57925 commit 7089784

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,9 +1599,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
15991599
adev_to_drm(adev)->mode_config.cursor_width = adev->dm.dc->caps.max_cursor_size;
16001600
adev_to_drm(adev)->mode_config.cursor_height = adev->dm.dc->caps.max_cursor_size;
16011601

1602-
/* Disable vblank IRQs aggressively for power-saving */
1603-
adev_to_drm(adev)->vblank_disable_immediate = true;
1604-
16051602
if (drm_vblank_init(adev_to_drm(adev), adev->dm.display_indexes_num)) {
16061603
DRM_ERROR(
16071604
"amdgpu: failed to initialize sw for display support.\n");
@@ -4264,6 +4261,14 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
42644261

42654262
}
42664263

4264+
/*
4265+
* Disable vblank IRQs aggressively for power-saving.
4266+
*
4267+
* TODO: Fix vblank control helpers to delay PSR entry to allow this when PSR
4268+
* is also supported.
4269+
*/
4270+
adev_to_drm(adev)->vblank_disable_immediate = !psr_feature_enabled;
4271+
42674272
/* Software is initialized. Now we can register interrupt handlers. */
42684273
switch (adev->asic_type) {
42694274
#if defined(CONFIG_DRM_AMD_DC_SI)

0 commit comments

Comments
 (0)