Commit d3472266 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/pp: Fix gfx ring test failed on Fiji without hw avfs support

caused by
'commit ca82cec868d1 ("drm/amd/pp: Simplified the avfs btc state on smu7")'
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent eb4900aa
...@@ -263,6 +263,9 @@ static int fiji_setup_graphics_level_structure(struct pp_hwmgr *hwmgr) ...@@ -263,6 +263,9 @@ static int fiji_setup_graphics_level_structure(struct pp_hwmgr *hwmgr)
static int fiji_avfs_event_mgr(struct pp_hwmgr *hwmgr) static int fiji_avfs_event_mgr(struct pp_hwmgr *hwmgr)
{ {
if (!hwmgr->avfs_supported)
return 0;
PP_ASSERT_WITH_CODE(0 == fiji_setup_graphics_level_structure(hwmgr), PP_ASSERT_WITH_CODE(0 == fiji_setup_graphics_level_structure(hwmgr),
"[AVFS][fiji_avfs_event_mgr] Could not Copy Graphics Level" "[AVFS][fiji_avfs_event_mgr] Could not Copy Graphics Level"
" table over to SMU", " table over to SMU",
......
...@@ -172,11 +172,13 @@ static int polaris10_setup_graphics_level_structure(struct pp_hwmgr *hwmgr) ...@@ -172,11 +172,13 @@ static int polaris10_setup_graphics_level_structure(struct pp_hwmgr *hwmgr)
} }
static int static int polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)
polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)
{ {
struct smu7_smumgr *smu_data = (struct smu7_smumgr *)(hwmgr->smu_backend); struct smu7_smumgr *smu_data = (struct smu7_smumgr *)(hwmgr->smu_backend);
if (!hwmgr->avfs_supported)
return 0;
PP_ASSERT_WITH_CODE(0 == polaris10_setup_graphics_level_structure(hwmgr), PP_ASSERT_WITH_CODE(0 == polaris10_setup_graphics_level_structure(hwmgr),
"[AVFS][Polaris10_AVFSEventMgr] Could not Copy Graphics Level table over to SMU", "[AVFS][Polaris10_AVFSEventMgr] Could not Copy Graphics Level table over to SMU",
return -EINVAL); return -EINVAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment