Skip to contentSkip to conversation

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

PATCH In review Rex Zhu 2 participants 2 messages Mar 20, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 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")'

Change-Id Ice0012e74ec3ef25cc561f8515ea6a553567d8a6
---
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c      | 3 +++
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +3 -0
index 43432e4..faef783 100644
@@ -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)
 {
+	if (!hwmgr->avfs_supported)
+		return 0;
+
 	PP_ASSERT_WITH_CODE(0 == fiji_setup_graphics_level_structure(hwmgr),
 			"[AVFS][fiji_avfs_event_mgr] Could not Copy Graphics Level"
 			" table over to SMU",
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +4 -2
index f6b1298..997a777 100644
@@ -172,11 +172,13 @@ static int polaris10_setup_graphics_level_structure(struct pp_hwmgr *hwmgr)
 }
 
 
-static int
-polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)
+static int polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)
 {
 	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),
 		"[AVFS][Polaris10_AVFSEventMgr] Could not Copy Graphics Level table over to SMU",
 		return -EINVAL);
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1521536723-5090-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Tuesday, March 20, 2018 5:05:23 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] 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")'

Change-Id Ice0012e74ec3ef25cc561f8515ea6a553567d8a6
---
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c      | 3 +++
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +3 -0
index 43432e4..faef783 100644
@@ -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)
 {
+       if (!hwmgr->avfs_supported)
+               return 0;
+
         PP_ASSERT_WITH_CODE(0 == fiji_setup_graphics_level_structure(hwmgr),
                         "[AVFS][fiji_avfs_event_mgr] Could not Copy Graphics Level"
                         " table over to SMU",
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +4 -2
index f6b1298..997a777 100644
@@ -172,11 +172,13 @@ static int polaris10_setup_graphics_level_structure(struct pp_hwmgr *hwmgr)
 }
 
 
-static int
-polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)
+static int polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)
 {
         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),
                 "[AVFS][Polaris10_AVFSEventMgr] Could not Copy Graphics Level table over to SMU",
                 return -EINVAL);

--
1.9.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx