drm/amd/display: Multi display cause system lag on mode change
authorAric Cyr <aric.cyr@amd.com>
Mon, 24 Aug 2020 02:32:14 +0000 (22:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Sep 2020 21:52:41 +0000 (17:52 -0400)
commite4863f118a7d58e080c16dc0cd354736691c2f66
tree3ef45ca4ffb1696a6d3384ed2ffa3e22f8872d4f
parent48e48e5984782171ac8d2ec09b7e688e141d7c86
drm/amd/display: Multi display cause system lag on mode change

[Why]
DCValidator is created/destroyed repeatedly for cofunctional validation
which causes a lot of memory thrashing, particularly when Driver Verifer
is enabled.

[How]
Implement a basic caching algorithm that will cache DCValidator with a
matching topology.  When a match is found, the DCValidator can be
reused.  If there is no match, a new one will be created and inserted
into the cache if there is space or an unreference entry can be evicted.

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c