Re: [PATCH] drm/amd/powerplay: no MGPU fan boost enablement on DPM disabled

2018-10-31 Thread Alex Deucher
On Wed, Oct 31, 2018 at 2:27 AM Evan Quan  wrote:
>
> As MGPU fan boost feature will be definitely not needed when
> DPM is disabled. So, there is no need to error out.
>
> Change-Id: Ia417ea3082f50a63f94c85d630f591027ff4c39c
> Signed-off-by: Evan Quan 

Reviewed-by: Alex Deucher 

> ---
>  drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c 
> b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index bf09735ea3ac..d6aa1d414320 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1318,12 +1318,12 @@ static int pp_enable_mgpu_fan_boost(void *handle)
>  {
> struct pp_hwmgr *hwmgr = handle;
>
> -   if (!hwmgr || !hwmgr->pm_en)
> +   if (!hwmgr)
> return -EINVAL;
>
> -   if (hwmgr->hwmgr_func->enable_mgpu_fan_boost == NULL) {
> +   if (!hwmgr->pm_en ||
> +hwmgr->hwmgr_func->enable_mgpu_fan_boost == NULL)
> return 0;
> -   }
>
> mutex_lock(>smu_lock);
> hwmgr->hwmgr_func->enable_mgpu_fan_boost(hwmgr);
> --
> 2.19.1
>
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amd/powerplay: no MGPU fan boost enablement on DPM disabled

2018-10-31 Thread Evan Quan
As MGPU fan boost feature will be definitely not needed when
DPM is disabled. So, there is no need to error out.

Change-Id: Ia417ea3082f50a63f94c85d630f591027ff4c39c
Signed-off-by: Evan Quan 
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c 
b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index bf09735ea3ac..d6aa1d414320 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1318,12 +1318,12 @@ static int pp_enable_mgpu_fan_boost(void *handle)
 {
struct pp_hwmgr *hwmgr = handle;
 
-   if (!hwmgr || !hwmgr->pm_en)
+   if (!hwmgr)
return -EINVAL;
 
-   if (hwmgr->hwmgr_func->enable_mgpu_fan_boost == NULL) {
+   if (!hwmgr->pm_en ||
+hwmgr->hwmgr_func->enable_mgpu_fan_boost == NULL)
return 0;
-   }
 
mutex_lock(>smu_lock);
hwmgr->hwmgr_func->enable_mgpu_fan_boost(hwmgr);
-- 
2.19.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx