drm/amd/display: enable idle optimizations for linux (MALL stutter)
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Thu, 30 Jul 2020 21:03:49 +0000 (17:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jan 2021 16:34:51 +0000 (11:34 -0500)
commit71338cb4a7c2b519227e9d103fbb6e42eebcb705
tree1d51ed459354b45b318dabdbae2b807823dbddca
parente74c8a461139b41075ede68f40c313a268445284
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h