drm/amd/display: Fix null-deref on vega20 with xgmi
authorRoman Li <Roman.Li@amd.com>
Tue, 18 Jun 2019 15:25:25 +0000 (11:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 Jun 2019 16:34:32 +0000 (11:34 -0500)
commit496091fa041fe8e8a6b2da745ba4fbcb8caed2dd
tree45e25aeb6b21fd235917a57caf52fb07b23193e5
parentde9f26bbd3842a7e8fca4f88b448636cc56319ff
drm/amd/display: Fix null-deref on vega20 with xgmi

[Why]
After clkmgr rework it gets initialized after resource pool.
The clkmgr is used in resource pool init for xgmi path.
That causes driver crash on Vega20 with xgmi due to NULL deref.

[How]
Move xgmi compensation code to dce121_clk_mgr_construct()
That also allows to make dce121_clock_patch_xgmi_ss_info()
internal static function.

Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h