Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-07 Thread Alex Deucher
On Tue, Feb 7, 2017 at 4:48 AM, Zhu, Rex  wrote:
>
> Not set max fan speed in high performance level because of the fan noise.

Reviewed-by: Alex Deucher 

>
> Best Regards
> Rex
> 
> From: amd-gfx  on behalf of Zhu, Rex
> 
> Sent: Monday, February 6, 2017 10:09 PM
> To: Andy Furniss; Alex Deucher
> Cc: amd-gfx list
> Subject: RE: [PATCH 4/4] drm/amdgpu: extend profiling mode.
>
> Please see in line.
>
> Best Regards
> Rex
>
> -Original Message-
> From: Andy Furniss [mailto:adf.li...@gmail.com]
> Sent: Monday, February 06, 2017 8:32 PM
> To: Zhu, Rex; Alex Deucher
> Cc: amd-gfx list
> Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.
>
> Zhu, Rex wrote:
>> Sorry for the late response.
>>
>> Yes, I set the fan speed to max in this patch when user set high
>> performance.
>>
>> Considering that: 1. set fan speed to max is helpful to let GPU run under
>> highest clock as long as possible.
>>   2. avoid GPU rapid temperature rise in some case.
>
>>>OK, I guess you know if it's needed or not.
>>>It is somewhat annoying noise wise, maybe one day there will be a way for
>>> users to set fan back on auto?
>
> Rex: sure, you can echo "2"> /sys/class/drm/card0/device/hwmon/hwmon3(maybe
> not 3)/pwm1_enable
>
>>>Accepting I don't know how the h/w works your point 2 would imply that
>>> with perf on auto doing something like running a benchmark that pegs all the
>>> clocks high should also
>
> Rex: based on the thermal,  the fan speed.will be dynamically adjusted.
>
>>>I don't think that would be popular WRT noise.
>
> Rex: maybe I worried unnecessarily. I will change the code not to set fan
> speed to max. thanks.
>
>
>
>>
>> Best Regards
>> Rex
>>
>>
>>
>> -Original Message-
>> From: Andy Furniss [mailto:adf.li...@gmail.com]
>> Sent: Wednesday, February 01, 2017 11:37 PM
>> To: Alex Deucher
>> Cc: Zhu, Rex; amd-gfx list
>> Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.
>>
>> Alex Deucher wrote:
>>> On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss 
>>> wrote:
>>>> Andy Furniss wrote:
>>>>>
>>>>> Rex Zhu wrote:
>>>>>>
>>>>>> in profiling mode, powerplay will fix power state as stable as
>>>>>> possible.and disable gfx cg and LBPW feature.
>>>>>>
>>>>>> profile_standard: as a prerequisite, ensure power and thermal
>>>>>> sustainable, set clocks ratio as close to the highest clock ratio
>>>>>> as possible.
>>>>>> profile_min_sclk: fix mclk as profile_normal, set lowest sclk
>>>>>> profile_min_mclk: fix sclk as profile_normal, set lowest mclk
>>>>>> profile_peak: set highest sclk and mclk, power and thermal not
>>>>>> sustainable
>>>>>> profile_exit: exit profile mode. enable gfx cg/lbpw feature.
>>>>>
>>>>>
>>>>> Testing R9 285 Tonga on drm-next-4.11-wip
>>>>>
>>>>> This commit has the effect that doing
>>>>>
>>>>> echo high >
>>>>> /sys/class/drm/card0/device/power_dpm_force_performance_level
>>>>>
>>>>> instantly forces fan to (I guess) max, where normally it doesn't
>>>>> need anything like as fast with the clocks high when doing nothing
>>>>> else.
>>>>
>>>>
>>>> Ping - just in case this got missed, still the same on current
>>>> drm-next-4.11-wip
>>>
>>> Just a heads up, Rex was looking at this, but it's Chinese New Year this
>>> week.
>>
>> OK, thanks & Happy new year.
>>
>>
>
> ___
> 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


Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-07 Thread Andy Furniss

Zhu, Rex wrote:


Not set max fan speed in high performance level because of the fan noise.


Thanks, I tested the patch and all seems OK again.



Best Regards
Rex

From: amd-gfx  on behalf of Zhu, Rex 

Sent: Monday, February 6, 2017 10:09 PM
To: Andy Furniss; Alex Deucher
Cc: amd-gfx list
Subject: RE: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Please see in line.

Best Regards
Rex

-Original Message-
From: Andy Furniss [mailto:adf.li...@gmail.com]
Sent: Monday, February 06, 2017 8:32 PM
To: Zhu, Rex; Alex Deucher
Cc: amd-gfx list
Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Zhu, Rex wrote:

Sorry for the late response.

Yes, I set the fan speed to max in this patch when user set high performance.

Considering that: 1. set fan speed to max is helpful to let GPU run under 
highest clock as long as possible.
   2. avoid GPU rapid temperature rise in some case.



OK, I guess you know if it's needed or not.
It is somewhat annoying noise wise, maybe one day there will be a way for users 
to set fan back on auto?


Rex: sure, you can echo "2"> /sys/class/drm/card0/device/hwmon/hwmon3(maybe not 
3)/pwm1_enable


Accepting I don't know how the h/w works your point 2 would imply that with 
perf on auto doing something like running a benchmark that pegs all the clocks 
high should also


Rex: based on the thermal,  the fan speed.will be dynamically adjusted.


I don't think that would be popular WRT noise.


Rex: maybe I worried unnecessarily. I will change the code not to set fan speed 
to max. thanks.





Best Regards
Rex



-Original Message-
From: Andy Furniss [mailto:adf.li...@gmail.com]
Sent: Wednesday, February 01, 2017 11:37 PM
To: Alex Deucher
Cc: Zhu, Rex; amd-gfx list
Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Alex Deucher wrote:

On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss  wrote:

Andy Furniss wrote:


Rex Zhu wrote:


in profiling mode, powerplay will fix power state as stable as
possible.and disable gfx cg and LBPW feature.

profile_standard: as a prerequisite, ensure power and thermal
sustainable, set clocks ratio as close to the highest clock ratio
as possible.
profile_min_sclk: fix mclk as profile_normal, set lowest sclk
profile_min_mclk: fix sclk as profile_normal, set lowest mclk
profile_peak: set highest sclk and mclk, power and thermal not
sustainable
profile_exit: exit profile mode. enable gfx cg/lbpw feature.



Testing R9 285 Tonga on drm-next-4.11-wip

This commit has the effect that doing

echo high >
/sys/class/drm/card0/device/power_dpm_force_performance_level

instantly forces fan to (I guess) max, where normally it doesn't
need anything like as fast with the clocks high when doing nothing else.



Ping - just in case this got missed, still the same on current
drm-next-4.11-wip


Just a heads up, Rex was looking at this, but it's Chinese New Year this week.


OK, thanks & Happy new year.




___
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


Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-07 Thread Zhu, Rex

Not set max fan speed in high performance level because of the fan noise.

Best Regards
Rex

From: amd-gfx  on behalf of Zhu, Rex 

Sent: Monday, February 6, 2017 10:09 PM
To: Andy Furniss; Alex Deucher
Cc: amd-gfx list
Subject: RE: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Please see in line.

Best Regards
Rex

-Original Message-
From: Andy Furniss [mailto:adf.li...@gmail.com]
Sent: Monday, February 06, 2017 8:32 PM
To: Zhu, Rex; Alex Deucher
Cc: amd-gfx list
Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Zhu, Rex wrote:
> Sorry for the late response.
>
> Yes, I set the fan speed to max in this patch when user set high performance.
>
> Considering that: 1. set fan speed to max is helpful to let GPU run under 
> highest clock as long as possible.
>   2. avoid GPU rapid temperature rise in some case.

>>OK, I guess you know if it's needed or not.
>>It is somewhat annoying noise wise, maybe one day there will be a way for 
>>users to set fan back on auto?

Rex: sure, you can echo "2"> /sys/class/drm/card0/device/hwmon/hwmon3(maybe not 
3)/pwm1_enable

>>Accepting I don't know how the h/w works your point 2 would imply that with 
>>perf on auto doing something like running a benchmark that pegs all the 
>>clocks high should also

Rex: based on the thermal,  the fan speed.will be dynamically adjusted.

>>I don't think that would be popular WRT noise.

Rex: maybe I worried unnecessarily. I will change the code not to set fan speed 
to max. thanks.



>
> Best Regards
> Rex
>
>
>
> -Original Message-
> From: Andy Furniss [mailto:adf.li...@gmail.com]
> Sent: Wednesday, February 01, 2017 11:37 PM
> To: Alex Deucher
> Cc: Zhu, Rex; amd-gfx list
> Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.
>
> Alex Deucher wrote:
>> On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss  wrote:
>>> Andy Furniss wrote:
>>>>
>>>> Rex Zhu wrote:
>>>>>
>>>>> in profiling mode, powerplay will fix power state as stable as
>>>>> possible.and disable gfx cg and LBPW feature.
>>>>>
>>>>> profile_standard: as a prerequisite, ensure power and thermal
>>>>> sustainable, set clocks ratio as close to the highest clock ratio
>>>>> as possible.
>>>>> profile_min_sclk: fix mclk as profile_normal, set lowest sclk
>>>>> profile_min_mclk: fix sclk as profile_normal, set lowest mclk
>>>>> profile_peak: set highest sclk and mclk, power and thermal not
>>>>> sustainable
>>>>> profile_exit: exit profile mode. enable gfx cg/lbpw feature.
>>>>
>>>>
>>>> Testing R9 285 Tonga on drm-next-4.11-wip
>>>>
>>>> This commit has the effect that doing
>>>>
>>>> echo high >
>>>> /sys/class/drm/card0/device/power_dpm_force_performance_level
>>>>
>>>> instantly forces fan to (I guess) max, where normally it doesn't
>>>> need anything like as fast with the clocks high when doing nothing else.
>>>
>>>
>>> Ping - just in case this got missed, still the same on current
>>> drm-next-4.11-wip
>>
>> Just a heads up, Rex was looking at this, but it's Chinese New Year this 
>> week.
>
> OK, thanks & Happy new year.
>
>

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
From 4e3f4155fac060a4d86d8bff61d461278dd7ac02 Mon Sep 17 00:00:00 2001
From: Rex Zhu 
Date: Tue, 7 Feb 2017 17:34:11 +0800
Subject: [PATCH] drm/amd/powerplay: set fan speed to max in profile peak mode
 only.

Change-Id: Ie9e789e6aad0f32841e0dd4229619bc103f702f8
Signed-off-by: Rex Zhu 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index c72ce85..b1de9e8 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -2624,6 +2624,7 @@ static int smu7_force_dpm_level(struct pp_hwmgr *hwmgr,
 		smu7_force_clock_level(hwmgr, PP_SCLK, 1<dpm_level = level;
@@ -2633,9 +2634,9 @@ static int smu7_force_dpm_level(struct pp_hwmgr *hwmgr,
 		break;
 	}
 
-	if (level & (AMD_DPM_FORCED_LEVEL_PROFILE_PEAK | AMD_DPM_FORCED_LEVEL_HIGH))
+	if (level == AMD_DPM_FORCED_LEVEL_PROFILE_PEAK && hwmgr->saved_dpm_level != AMD_DPM_FORCED_LEVEL_PROFILE_PEAK)
 		smu7_fan_ctrl_set_fan_speed_percent(hwmgr, 100);
-	else
+	else if (level != AMD_DPM_FORCED_LEVEL_PROFILE_PEAK && hwmgr->saved_dpm_level == AMD_DPM_FORCED_LEVEL_PROFILE_PEAK)
 		smu7_fan_ctrl_reset_fan_speed_to_default(hwmgr);
 
 	return 0;
-- 
1.9.1

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


RE: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-06 Thread Zhu, Rex
Please see in line.

Best Regards
Rex

-Original Message-
From: Andy Furniss [mailto:adf.li...@gmail.com] 
Sent: Monday, February 06, 2017 8:32 PM
To: Zhu, Rex; Alex Deucher
Cc: amd-gfx list
Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Zhu, Rex wrote:
> Sorry for the late response.
>
> Yes, I set the fan speed to max in this patch when user set high performance.
>
> Considering that: 1. set fan speed to max is helpful to let GPU run under 
> highest clock as long as possible.
>  2. avoid GPU rapid temperature rise in some case.

>>OK, I guess you know if it's needed or not.
>>It is somewhat annoying noise wise, maybe one day there will be a way for 
>>users to set fan back on auto?

Rex: sure, you can echo "2"> /sys/class/drm/card0/device/hwmon/hwmon3(maybe not 
3)/pwm1_enable 

>>Accepting I don't know how the h/w works your point 2 would imply that with 
>>perf on auto doing something like running a benchmark that pegs all the 
>>clocks high should also 

Rex: based on the thermal,  the fan speed.will be dynamically adjusted.

>>I don't think that would be popular WRT noise.

Rex: maybe I worried unnecessarily. I will change the code not to set fan speed 
to max. thanks.



>
> Best Regards
> Rex
>
>
>
> -Original Message-
> From: Andy Furniss [mailto:adf.li...@gmail.com]
> Sent: Wednesday, February 01, 2017 11:37 PM
> To: Alex Deucher
> Cc: Zhu, Rex; amd-gfx list
> Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.
>
> Alex Deucher wrote:
>> On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss  wrote:
>>> Andy Furniss wrote:
>>>>
>>>> Rex Zhu wrote:
>>>>>
>>>>> in profiling mode, powerplay will fix power state as stable as 
>>>>> possible.and disable gfx cg and LBPW feature.
>>>>>
>>>>> profile_standard: as a prerequisite, ensure power and thermal 
>>>>> sustainable, set clocks ratio as close to the highest clock ratio 
>>>>> as possible.
>>>>> profile_min_sclk: fix mclk as profile_normal, set lowest sclk
>>>>> profile_min_mclk: fix sclk as profile_normal, set lowest mclk
>>>>> profile_peak: set highest sclk and mclk, power and thermal not 
>>>>> sustainable
>>>>> profile_exit: exit profile mode. enable gfx cg/lbpw feature.
>>>>
>>>>
>>>> Testing R9 285 Tonga on drm-next-4.11-wip
>>>>
>>>> This commit has the effect that doing
>>>>
>>>> echo high >
>>>> /sys/class/drm/card0/device/power_dpm_force_performance_level
>>>>
>>>> instantly forces fan to (I guess) max, where normally it doesn't 
>>>> need anything like as fast with the clocks high when doing nothing else.
>>>
>>>
>>> Ping - just in case this got missed, still the same on current 
>>> drm-next-4.11-wip
>>
>> Just a heads up, Rex was looking at this, but it's Chinese New Year this 
>> week.
>
> OK, thanks & Happy new year.
>
>

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


Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-06 Thread Andy Furniss

Zhu, Rex wrote:

Sorry for the late response.

Yes, I set the fan speed to max in this patch when user set high performance.

Considering that: 1. set fan speed to max is helpful to let GPU run under 
highest clock as long as possible.
   2. avoid GPU rapid temperature rise in some case.


OK, I guess you know if it's needed or not.

It is somewhat annoying noise wise, maybe one day there will be a way 
for users to set fan back on auto?


Accepting I don't know how the h/w works your point 2 would imply that
with perf on auto doing something like running a benchmark that pegs
all the clocks high should also instantly force fan high?

I don't think that would be popular WRT noise.




Best Regards
Rex



-Original Message-
From: Andy Furniss [mailto:adf.li...@gmail.com]
Sent: Wednesday, February 01, 2017 11:37 PM
To: Alex Deucher
Cc: Zhu, Rex; amd-gfx list
Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Alex Deucher wrote:

On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss  wrote:

Andy Furniss wrote:


Rex Zhu wrote:


in profiling mode, powerplay will fix power state as stable as
possible.and disable gfx cg and LBPW feature.

profile_standard: as a prerequisite, ensure power and thermal
sustainable, set clocks ratio as close to the highest clock ratio
as possible.
profile_min_sclk: fix mclk as profile_normal, set lowest sclk
profile_min_mclk: fix sclk as profile_normal, set lowest mclk
profile_peak: set highest sclk and mclk, power and thermal not
sustainable
profile_exit: exit profile mode. enable gfx cg/lbpw feature.



Testing R9 285 Tonga on drm-next-4.11-wip

This commit has the effect that doing

echo high >
/sys/class/drm/card0/device/power_dpm_force_performance_level

instantly forces fan to (I guess) max, where normally it doesn't
need anything like as fast with the clocks high when doing nothing else.



Ping - just in case this got missed, still the same on current
drm-next-4.11-wip


Just a heads up, Rex was looking at this, but it's Chinese New Year this week.


OK, thanks & Happy new year.




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


RE: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-06 Thread Zhu, Rex
Sorry for the late response.

Yes, I set the fan speed to max in this patch when user set high performance.

Considering that: 1. set fan speed to max is helpful to let GPU run under 
highest clock as long as possible.
   2. avoid GPU rapid temperature rise in some case.


Best Regards
Rex
  


-Original Message-
From: Andy Furniss [mailto:adf.li...@gmail.com] 
Sent: Wednesday, February 01, 2017 11:37 PM
To: Alex Deucher
Cc: Zhu, Rex; amd-gfx list
Subject: Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

Alex Deucher wrote:
> On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss  wrote:
>> Andy Furniss wrote:
>>>
>>> Rex Zhu wrote:
>>>>
>>>> in profiling mode, powerplay will fix power state as stable as 
>>>> possible.and disable gfx cg and LBPW feature.
>>>>
>>>> profile_standard: as a prerequisite, ensure power and thermal 
>>>> sustainable, set clocks ratio as close to the highest clock ratio 
>>>> as possible.
>>>> profile_min_sclk: fix mclk as profile_normal, set lowest sclk
>>>> profile_min_mclk: fix sclk as profile_normal, set lowest mclk
>>>> profile_peak: set highest sclk and mclk, power and thermal not 
>>>> sustainable
>>>> profile_exit: exit profile mode. enable gfx cg/lbpw feature.
>>>
>>>
>>> Testing R9 285 Tonga on drm-next-4.11-wip
>>>
>>> This commit has the effect that doing
>>>
>>> echo high > 
>>> /sys/class/drm/card0/device/power_dpm_force_performance_level
>>>
>>> instantly forces fan to (I guess) max, where normally it doesn't 
>>> need anything like as fast with the clocks high when doing nothing else.
>>
>>
>> Ping - just in case this got missed, still the same on current 
>> drm-next-4.11-wip
>
> Just a heads up, Rex was looking at this, but it's Chinese New Year this week.

OK, thanks & Happy new year.


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


Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-01 Thread Andy Furniss

Alex Deucher wrote:

On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss  wrote:

Andy Furniss wrote:


Rex Zhu wrote:


in profiling mode, powerplay will fix power state
as stable as possible.and disable gfx cg and LBPW feature.

profile_standard: as a prerequisite, ensure power and thermal
sustainable, set clocks ratio as close to the highest clock
ratio as possible.
profile_min_sclk: fix mclk as profile_normal, set lowest sclk
profile_min_mclk: fix sclk as profile_normal, set lowest mclk
profile_peak: set highest sclk and mclk, power and thermal not
sustainable
profile_exit: exit profile mode. enable gfx cg/lbpw feature.



Testing R9 285 Tonga on drm-next-4.11-wip

This commit has the effect that doing

echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level

instantly forces fan to (I guess) max, where normally it doesn't
need anything like as fast with the clocks high when doing nothing else.



Ping - just in case this got missed, still the same on current
drm-next-4.11-wip


Just a heads up, Rex was looking at this, but it's Chinese New Year this week.


OK, thanks & Happy new year.


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


Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-02-01 Thread Alex Deucher
On Tue, Jan 31, 2017 at 6:19 PM, Andy Furniss  wrote:
> Andy Furniss wrote:
>>
>> Rex Zhu wrote:
>>>
>>> in profiling mode, powerplay will fix power state
>>> as stable as possible.and disable gfx cg and LBPW feature.
>>>
>>> profile_standard: as a prerequisite, ensure power and thermal
>>> sustainable, set clocks ratio as close to the highest clock
>>> ratio as possible.
>>> profile_min_sclk: fix mclk as profile_normal, set lowest sclk
>>> profile_min_mclk: fix sclk as profile_normal, set lowest mclk
>>> profile_peak: set highest sclk and mclk, power and thermal not
>>> sustainable
>>> profile_exit: exit profile mode. enable gfx cg/lbpw feature.
>>
>>
>> Testing R9 285 Tonga on drm-next-4.11-wip
>>
>> This commit has the effect that doing
>>
>> echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level
>>
>> instantly forces fan to (I guess) max, where normally it doesn't
>> need anything like as fast with the clocks high when doing nothing else.
>
>
> Ping - just in case this got missed, still the same on current
> drm-next-4.11-wip

Just a heads up, Rex was looking at this, but it's Chinese New Year this week.

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


Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-01-31 Thread Andy Furniss

Andy Furniss wrote:

Rex Zhu wrote:

in profiling mode, powerplay will fix power state
as stable as possible.and disable gfx cg and LBPW feature.

profile_standard: as a prerequisite, ensure power and thermal
sustainable, set clocks ratio as close to the highest clock
ratio as possible.
profile_min_sclk: fix mclk as profile_normal, set lowest sclk
profile_min_mclk: fix sclk as profile_normal, set lowest mclk
profile_peak: set highest sclk and mclk, power and thermal not
sustainable
profile_exit: exit profile mode. enable gfx cg/lbpw feature.


Testing R9 285 Tonga on drm-next-4.11-wip

This commit has the effect that doing

echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level

instantly forces fan to (I guess) max, where normally it doesn't
need anything like as fast with the clocks high when doing nothing else.


Ping - just in case this got missed, still the same on current 
drm-next-4.11-wip



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


Re: [PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-01-11 Thread Andy Furniss

Rex Zhu wrote:

in profiling mode, powerplay will fix power state
as stable as possible.and disable gfx cg and LBPW feature.

profile_standard: as a prerequisite, ensure power and thermal
sustainable, set clocks ratio as close to the highest clock
ratio as possible.
profile_min_sclk: fix mclk as profile_normal, set lowest sclk
profile_min_mclk: fix sclk as profile_normal, set lowest mclk
profile_peak: set highest sclk and mclk, power and thermal not
sustainable
profile_exit: exit profile mode. enable gfx cg/lbpw feature.


Testing R9 285 Tonga on drm-next-4.11-wip

This commit has the effect that doing

echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level

instantly forces fan to (I guess) max, where normally it doesn't
need anything like as fast with the clocks high when doing nothing else.

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


[PATCH 4/4] drm/amdgpu: extend profiling mode.

2017-01-08 Thread Rex Zhu
in profiling mode, powerplay will fix power state
as stable as possible.and disable gfx cg and LBPW feature.

profile_standard: as a prerequisite, ensure power and thermal
sustainable, set clocks ratio as close to the highest clock
ratio as possible.
profile_min_sclk: fix mclk as profile_normal, set lowest sclk
profile_min_mclk: fix sclk as profile_normal, set lowest mclk
profile_peak: set highest sclk and mclk, power and thermal not
sustainable
profile_exit: exit profile mode. enable gfx cg/lbpw feature.

Change-Id: I217b8cfb98b6a628a11091776debe039bad997a2
Signed-off-by: Rex Zhu 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c   |  38 ---
 drivers/gpu/drm/amd/amdgpu/ci_dpm.c  |   5 +-
 drivers/gpu/drm/amd/include/amd_shared.h |   6 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c   |   3 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 127 ++-
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h|   1 +
 6 files changed, 154 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 8438642..a6a4d36 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -120,12 +120,15 @@ static ssize_t 
amdgpu_get_dpm_forced_performance_level(struct device *dev,
 
level = amdgpu_dpm_get_performance_level(adev);
return snprintf(buf, PAGE_SIZE, "%s\n",
-   (level & (AMD_DPM_FORCED_LEVEL_AUTO) ? "auto" :
-   (level & AMD_DPM_FORCED_LEVEL_LOW) ? "low" :
-   (level & AMD_DPM_FORCED_LEVEL_HIGH) ? "high" :
-   (level & AMD_DPM_FORCED_LEVEL_MANUAL) ? "manual" :
-   (level & AMD_DPM_FORCED_LEVEL_PROFILING) ? "profiling" :
-   "unknown"));
+   (level == AMD_DPM_FORCED_LEVEL_AUTO) ? "auto" :
+   (level == AMD_DPM_FORCED_LEVEL_LOW) ? "low" :
+   (level == AMD_DPM_FORCED_LEVEL_HIGH) ? "high" :
+   (level == AMD_DPM_FORCED_LEVEL_MANUAL) ? "manual" :
+   (level == AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD) ? 
"profile_standard" :
+   (level == AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK) ? 
"profile_min_sclk" :
+   (level == AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK) ? 
"profile_min_mclk" :
+   (level == AMD_DPM_FORCED_LEVEL_PROFILE_PEAK) ? 
"profile_peak" :
+   "unknown");
 }
 
 static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
@@ -154,9 +157,17 @@ static ssize_t 
amdgpu_set_dpm_forced_performance_level(struct device *dev,
level = AMD_DPM_FORCED_LEVEL_AUTO;
} else if (strncmp("manual", buf, strlen("manual")) == 0) {
level = AMD_DPM_FORCED_LEVEL_MANUAL;
-   } else if (strncmp("profile", buf, strlen("profile")) == 0) {
-   level = AMD_DPM_FORCED_LEVEL_PROFILING;
-   } else {
+   } else if (strncmp("profile_exit", buf, strlen("profile_exit")) == 0) {
+   level = AMD_DPM_FORCED_LEVEL_PROFILE_EXIT;
+   } else if (strncmp("profile_standard", buf, strlen("profile_standard")) 
== 0) {
+   level = AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD;
+   } else if (strncmp("profile_min_sclk", buf, strlen("profile_min_sclk")) 
== 0) {
+   level = AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK;
+   } else if (strncmp("profile_min_mclk", buf, strlen("profile_min_mclk")) 
== 0) {
+   level = AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK;
+   } else if (strncmp("profile_peak", buf, strlen("profile_peak")) == 0) {
+   level = AMD_DPM_FORCED_LEVEL_PROFILE_PEAK;
+   }  else {
count = -EINVAL;
goto fail;
}
@@ -164,14 +175,6 @@ static ssize_t 
amdgpu_set_dpm_forced_performance_level(struct device *dev,
if (current_level == level)
return 0;
 
-   if (level == AMD_DPM_FORCED_LEVEL_PROFILING)
-   amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_GFX,
-   AMD_CG_STATE_UNGATE);
-   else if (level != AMD_DPM_FORCED_LEVEL_PROFILING &&
-   current_level == AMD_DPM_FORCED_LEVEL_PROFILING)
-   amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_GFX,
-   AMD_CG_STATE_GATE);
-
if (adev->pp_enabled)
amdgpu_dpm_force_performance_level(adev, level);
else {
@@ -188,6 +191,7 @@ static ssize_t 
amdgpu_set_dpm_forced_performance_level(struct device *dev,
adev->pm.dpm.forced_level = level;
mutex_unlock(&adev->pm.mutex);
}
+
 fail:
return count;
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index 9a544ad..ece94ee 100644
--- a/drivers/gpu/dr