diff options
author | Rex Zhu | 2017-09-21 04:34:48 +0200 |
---|---|---|
committer | Alex Deucher | 2017-09-26 21:14:19 +0200 |
commit | 6042e8560ef448aa1a9ca16473f0a5a264462f41 (patch) | |
tree | 0b5fba67fc8bca3e230252f4629e0c578e31c0f7 /drivers/gpu/drm/amd/powerplay | |
parent | drm/amd/amdgpu: add vega10/raven mmhub/athub golden settings (diff) | |
download | kernel-qcow2-linux-6042e8560ef448aa1a9ca16473f0a5a264462f41.tar.gz kernel-qcow2-linux-6042e8560ef448aa1a9ca16473f0a5a264462f41.tar.xz kernel-qcow2-linux-6042e8560ef448aa1a9ca16473f0a5a264462f41.zip |
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 <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index f31d2cf91f1a..623cff90233d 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; } /** |