From: Rex Zhu Date: Thu, 21 Sep 2017 02:34:48 +0000 (+0800) Subject: drm/amd/powerplay: refine phm_register_thermal_interrupt interface X-Git-Tag: v5.15~9897^2~60^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6042e8560ef448aa1a9ca16473f0a5a264462f41;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index f31d2cf..623cff9 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c @@ -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; } /**