Skip to contentSkip to conversation

drm/amd/powerplay: refine phm_register_thermal_interrupt interface

PATCH In review Rex Zhu 2 participants 2 messages Sep 21, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: refine phm_register_thermal_interrupt interface

currently, not all asics implement this callback function so not return error to avoid powerplay initialize failed in those asices

Change-Id I492b7ab54eebcc0d84c169edc0d5876c4529c619
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +3 -3
index f31d2cf..623cff9 100644
@@ -210,10 +210,10 @@ int phm_register_thermal_interrupt(struct pp_hwmgr *hwmgr, const void *info)
 {
 	PHM_FUNC_CHECK(hwmgr);
 
-	if (hwmgr->hwmgr_func->register_internal_thermal_interrupt == NULL)
-		return -EINVAL;
+	if (hwmgr->hwmgr_func->register_internal_thermal_interrupt != NULL)
+		return hwmgr->hwmgr_func->register_internal_thermal_interrupt(hwmgr, info);
 
-	return hwmgr->hwmgr_func->register_internal_thermal_interrupt(hwmgr, info);
+	return 0;
 }
 
 /**
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): 1505961652-11422-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Wednesday, September 20, 2017 10:41 PM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/powerplay: refine phm_register_thermal_interrupt interface

Quoted 6 lines

currently, not all asics implement this callback function so not return error to avoid powerplay initialize failed in those asices

Change-Id I492b7ab54eebcc0d84c169edc0d5876c4529c619
Quoted 31 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +2 -3
index f31d2cf..623cff9 100644
@@ -210,10 +210,10 @@ int phm_register_thermal_interrupt(struct
 pp_hwmgr *hwmgr, const void *info)
 {
 	PHM_FUNC_CHECK(hwmgr);
 
-	if (hwmgr->hwmgr_func->register_internal_thermal_interrupt ==
 NULL)
-		return -EINVAL;
+	if (hwmgr->hwmgr_func->register_internal_thermal_interrupt !=
 NULL)
+		return hwmgr->hwmgr_func-
 >register_internal_thermal_interrupt(hwmgr, info);
 
-	return hwmgr->hwmgr_func-
Quoted 1 line

register_internal_thermal_interrupt(hwmgr, info);

drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +1 -1
+	return 0;
 }
 
 /**
--

1.9.1

Quoted 4 lines

_______________________________________________
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