From 71338cb4a7c2b519227e9d103fbb6e42eebcb705 Mon Sep 17 00:00:00 2001 From: Bhawanpreet Lakha Date: Thu, 30 Jul 2020 17:03:49 -0400 Subject: 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 Acked-by: Alex Deucher Reviewed-by: Nick Kazlauskas Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h') diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index 2ee6edb3df93..f084e2fc9569 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -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: -- cgit