drm/amd/display: Copy WM values from set A to other sets in hw_init
authorJoshua Aberback <joshua.aberback@amd.com>
Wed, 23 Sep 2020 19:12:39 +0000 (15:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Oct 2020 19:16:36 +0000 (15:16 -0400)
commit7c4ed1df0a59541b0c40c468df52217c2e03c210
treeed39391f1c090ec938d590511ce6ceb9e0efca14
parent3e19095534caec6be8f8c1a7d8fd4879e23637ed
drm/amd/display: Copy WM values from set A to other sets in hw_init

[Why]
When we transfer the WM range table to SMU, they can perform a watermark
switch right away. This can be a problem if we're in not in accelerated mode
during hw_init as SMU may initiate a dummy p-state change before the rest
of the watermarks are programmed. Watermark set A is defined to be
sufficient for all cases, so we can copy the values from set A to all other
sets, avoiding any issues from SMU doing WM switches.

[How]
 - new hubbub func init_watermarks
 - copy register values from set A to all other sets
 - call init_watermarks before calling notify_wm_ranges

Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubbub.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubbub.h
drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h