drm/amd/display: Backup and restore only on full updates
authorAlvin Lee <alvin.lee2@amd.com>
Fri, 23 Feb 2024 20:06:39 +0000 (15:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Mar 2024 17:37:38 +0000 (13:37 -0400)
commitd62d5551dd615f9e488b13595d69b308cd019e16
tree2dd0f2719893197b21aa0cebf689b94dd4feaf5d
parent2d5bb791e24f43b6b4231b7973009987bbcc9b06
drm/amd/display: Backup and restore only on full updates

[WHY & HOW]
Since the backup and restore for plane and stream states has
a significant amount of data to copy, we will change the backup
and restore sequence to only take place during full updates.

We will also move the scratch memory to struct dc instead of dc_state
to avoid needing to allocate large amounts of memory every time
we create a new DC state.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/core/dc_state.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/inc/core_types.h