drm/amd/display: enable idle optimizations for linux (MALL stutter)

[Why]
We can only use this feature when the display is idle. When active vblank
irq count is 0 we know all the displays are idle.

[How]
-Add a active vblank irq counter
-Update the counter when we enable/disable vblank irq
-if vblank irq count is 0 we can consider mall stutter

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Bhawanpreet Lakha
2020-07-30 17:03:49 -04:00
committed by Alex Deucher
parent e74c8a4611
commit 71338cb4a7
2 changed files with 27 additions and 1 deletions

View File

@@ -336,6 +336,13 @@ struct amdgpu_display_manager {
*/
const struct gpu_info_soc_bounding_box_v1_0 *soc_bounding_box;
/**
* @active_vblank_irq_count
*
* number of currently active vblank irqs
*/
uint32_t active_vblank_irq_count;
#ifdef CONFIG_DEBUG_FS
/**
* @crc_win_x_start_property: