drm/amd/pp: Refine smu7/8 request_smu_load_fw callback function
authorRex Zhu <Rex.Zhu@amd.com>
Sat, 29 Sep 2018 05:54:33 +0000 (13:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Oct 2018 22:05:53 +0000 (17:05 -0500)
commit5e161e5442a8a209404542c91eb889487b1239f4
tree0e694ba58ffc685cb5c879106d1b85f16c3e80ca
parent0a821579a2ed44855d63d9a2d2acb61b38ce6354
drm/amd/pp: Refine smu7/8 request_smu_load_fw callback function

The request_smu_load_fw of VI is used to load gfx/sdma
ip's firmware.

Check whether the gfx/sdma firmware have been loaded successfully
in this callback function.
if failed, driver can exit to avoid gpu hard hung.
if successful, clean the flag reload_fw to avoid duplicated fw load.
when suspend/resume, driver need to reload fw.
so in suspend, reset the reload_fw flag to true to enable load fw when
resume.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c