[PATCH] drm/amd/powerplay: refine phm_register_thermal_interrupt interface

Deucher, Alexander Alexander.Deucher at amd.com
Thu Sep 21 06:47:33 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Wednesday, September 20, 2017 10:41 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhu, Rex
> Subject: [PATCH] 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
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +++---
>  1 file 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 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;
>  }
> 
>  /**
> --
> 1.9.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list