AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Add documentation power related sysfs interfaces
@ 2018-04-19 20:05 Alex Deucher
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Alex Deucher @ 2018-04-19 20:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Provide some initial documenation on how to use the power sysfs
APIs.

Alex Deucher (6):
  drm/amdgpu/pm: document power_dpm_force_performance_level
  drm/amdgpu/pm: document power_dpm_state
  drm/amdgpu/pm: document pp_table
  drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
  drm/amdgpu/pm: document pp_power_profile_mode
  drm/amdgpu/pm: document pp_od_clk_voltage

 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 156 +++++++++++++++++++++++++++++++++
 1 file changed, 156 insertions(+)

-- 
2.13.6

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/6] drm/amdgpu/pm: document power_dpm_force_performance_level
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2018-04-19 20:05   ` Alex Deucher
  2018-04-19 20:05   ` [PATCH 2/6] drm/amdgpu/pm: document power_dpm_state Alex Deucher
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2018-04-19 20:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Provide documentation for power_dpm_force_performance_level
which is used to adjust things related to GPU power states.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 53 ++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 744f105a2c75..ee11e92cc4d2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -131,6 +131,59 @@ static ssize_t amdgpu_set_dpm_state(struct device *dev,
 	return count;
 }
 
+
+/**
+ * DOC: power_dpm_force_performance_level
+ *
+ * The amdgpu driver provides a sysfs API for adjusting certain power
+ * related parameters.  The file power_dpm_force_performance_level is
+ * used for this.  It accepts the following arguments:
+ * - auto
+ * - low
+ * - high
+ * - manual
+ * - GPU fan
+ * - profile_standard
+ * - profile_min_sclk
+ * - profile_min_mclk
+ * - profile_peak
+ *
+ * auto
+ *
+ * When auto is selected, the driver will attempt to dynamically select
+ * the optimal power profile for current conditions in the driver.
+ *
+ * low
+ *
+ * When low is selected, the clocks are forced to the lowest power state.
+ *
+ * high
+ *
+ * When high is selected, the clocks are forced to the highest power state.
+ *
+ * manual
+ *
+ * When manual is selected, the user can manually adjust which power states
+ * are enabled for each clock domain via the sysfs pp_dpm_mclk, pp_dpm_sclk,
+ * and pp_dpm_pcie files and adjust the power state transition heuristics
+ * via the pp_power_profile_mode sysfs file.
+ *
+ * profile_standard
+ * profile_min_sclk
+ * profile_min_mclk
+ * profile_peak
+ *
+ * When the profiling modes are selected, clock and power gating are
+ * disabled and the clocks are set for different profiling cases. This
+ * mode is recommended for profiling specific work loads where you do
+ * not want clock or power gating for clock fluctuation to interfere
+ * with your results. profile_standard sets the clocks to a fixed clock
+ * level which varies from asic to asic.  profile_min_sclk forces the sclk
+ * to the lowest level.  profile_min_mclk forces the mclk to the lowest level.
+ * profile_peak sets all clocks (mclk, sclk, pcie) to the highest levels.
+ *
+ */
+
 static ssize_t amdgpu_get_dpm_forced_performance_level(struct device *dev,
 						struct device_attribute *attr,
 								char *buf)
-- 
2.13.6

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/6] drm/amdgpu/pm: document power_dpm_state
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2018-04-19 20:05   ` [PATCH 1/6] drm/amdgpu/pm: document power_dpm_force_performance_level Alex Deucher
@ 2018-04-19 20:05   ` Alex Deucher
  2018-04-19 20:05   ` [PATCH 3/6] drm/amdgpu/pm: document pp_table Alex Deucher
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2018-04-19 20:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

This is a legacy file and is only provided for
backwards compatibility.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index ee11e92cc4d2..e33e0f4c4a28 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -77,6 +77,37 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev)
 	}
 }
 
+/**
+ * DOC: power_dpm_state
+ *
+ * This is a legacy interface and is only provided for backwards compatibility.
+ * The amdgpu driver provides a sysfs API for adjusting certain power
+ * related parameters.  The file power_dpm_state is used for this.
+ * It accepts the following arguments:
+ * - battery
+ * - balanced
+ * - performance
+ *
+ * battery
+ *
+ * On older GPUs, the vbios provided a special power state for battery
+ * operation.  Selecting battery switched to this state.  This is no
+ * longer provided on newer GPUs so the option does nothing in that case.
+ *
+ * balanced
+ *
+ * On older GPUs, the vbios provided a special power state for balanced
+ * operation.  Selecting balanced switched to this state.  This is no
+ * longer provided on newer GPUs so the option does nothing in that case.
+ *
+ * performance
+ *
+ * On older GPUs, the vbios provided a special power state for performance
+ * operation.  Selecting performance switched to this state.  This is no
+ * longer provided on newer GPUs so the option does nothing in that case.
+ *
+ */
+
 static ssize_t amdgpu_get_dpm_state(struct device *dev,
 				    struct device_attribute *attr,
 				    char *buf)
-- 
2.13.6

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/6] drm/amdgpu/pm: document pp_table
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2018-04-19 20:05   ` [PATCH 1/6] drm/amdgpu/pm: document power_dpm_force_performance_level Alex Deucher
  2018-04-19 20:05   ` [PATCH 2/6] drm/amdgpu/pm: document power_dpm_state Alex Deucher
@ 2018-04-19 20:05   ` Alex Deucher
  2018-04-19 20:05   ` [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie Alex Deucher
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2018-04-19 20:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

This file is for uploading new powerplay tables.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index e33e0f4c4a28..9982f1b1f8c4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -408,6 +408,17 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
 	return count;
 }
 
+/**
+ * DOC: pp_table
+ *
+ * The amdgpu driver provides a sysfs API for uploading new powerplay
+ * tables.  The file pp_table is used for this.  Reading the file
+ * will dump the current power play table.  Writing to the file
+ * will attempt to upload a new powerplay table and re-initialize
+ * powerplay using that new table.
+ *
+ */
+
 static ssize_t amdgpu_get_pp_table(struct device *dev,
 		struct device_attribute *attr,
 		char *buf)
-- 
2.13.6

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
                     ` (2 preceding siblings ...)
  2018-04-19 20:05   ` [PATCH 3/6] drm/amdgpu/pm: document pp_table Alex Deucher
@ 2018-04-19 20:05   ` Alex Deucher
       [not found]     ` <20180419200514.29136-5-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2018-04-19 20:05   ` [PATCH 5/6] drm/amdgpu/pm: document pp_power_profile_mode Alex Deucher
                     ` (3 subsequent siblings)
  7 siblings, 1 reply; 11+ messages in thread
From: Alex Deucher @ 2018-04-19 20:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Used for manually masking dpm states.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 9982f1b1f8c4..3f1715b1a547 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -539,6 +539,24 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
 
 }
 
+/**
+ * DOC: pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
+ *
+ * The amdgpu driver provides a sysfs API for adjusting what power levels
+ * are enabled for a given power state.  The files pp_dpm_sclk, pp_dpm_mclk,
+ * and pp_dpm_pcie are used for this.
+ *
+ * Reading back the files will show you the available power levels within
+ * the power state and the clock information for those levels.  There
+ * will be a '*' next to the level that is currently active.
+ *
+ * To manually adjust these states, first select manual using
+ * power_dpm_force_performance_level.  Writing a string of the level
+ * numbers to the file will select which levels you want to enable.
+ * E.g., writing 456 to the file will enable levels 4, 5, and 6.
+ *
+ */
+
 static ssize_t amdgpu_get_pp_dpm_sclk(struct device *dev,
 		struct device_attribute *attr,
 		char *buf)
-- 
2.13.6

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/6] drm/amdgpu/pm: document pp_power_profile_mode
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
                     ` (3 preceding siblings ...)
  2018-04-19 20:05   ` [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie Alex Deucher
@ 2018-04-19 20:05   ` Alex Deucher
  2018-04-19 20:05   ` [PATCH 6/6] drm/amdgpu/pm: document pp_od_clk_voltage Alex Deucher
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2018-04-19 20:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

sysfs file for adjusting power level heuristics.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 3f1715b1a547..9d52618a5c4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -781,6 +781,26 @@ static ssize_t amdgpu_set_pp_mclk_od(struct device *dev,
 	return count;
 }
 
+/**
+ * DOC: pp_power_profile_mode
+ *
+ * The amdgpu driver provides a sysfs API for adjusting the heuristics
+ * related to switching between power levels in a power state.  The file
+ * pp_power_profile_mode is used for this.
+ *
+ * Reading this file outputs a list of all of the predefined power profiles
+ * and the relevant heuristics settings for that profile.
+ *
+ * To select a profile or create a custom profile, first select manual using
+ * power_dpm_force_performance_level.  Writing the number of a predefined
+ * profile to pp_power_profile_mode will enable those heuristics.  To
+ * create a custom set of heuristics, write a string of numbers to the file
+ * starting with the number of the custom profile along with a setting
+ * for each heuristic parameter.  Due to differences across asic families
+ * the heuristic parameters vary from family to family.
+ *
+ */
+
 static ssize_t amdgpu_get_pp_power_profile_mode(struct device *dev,
 		struct device_attribute *attr,
 		char *buf)
-- 
2.13.6

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/6] drm/amdgpu/pm: document pp_od_clk_voltage
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
                     ` (4 preceding siblings ...)
  2018-04-19 20:05   ` [PATCH 5/6] drm/amdgpu/pm: document pp_power_profile_mode Alex Deucher
@ 2018-04-19 20:05   ` Alex Deucher
  2018-04-19 21:45   ` [PATCH 0/6] Add documentation power related sysfs interfaces Felix Kuehling
  2018-04-20  5:09   ` Huang Rui
  7 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2018-04-19 20:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

sysfs interface for fine grained clock and voltage control.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 9d52618a5c4c..d7f322061de3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -455,6 +455,29 @@ static ssize_t amdgpu_set_pp_table(struct device *dev,
 	return count;
 }
 
+/**
+ * DOC: pp_od_clk_voltage
+ *
+ * The amdgpu driver provides a sysfs API for adjusting the clocks and voltages
+ * in each power level within a power state.  The pp_od_clk_voltage is used for
+ * this.
+ *
+ * Reading the file will display:
+ * - a list of engine clock levels and voltages labeled OD_SCLK
+ * - a list of memory clock levels and voltages labeled OD_MCLK
+ * - a list of valid ranges for sclk, mclk, and voltage labeled OD_RANGE
+ *
+ * To manually adjust these settings, first select manual using
+ * power_dpm_force_performance_level. Enter a new value for each
+ * level by writing a string that contains "s/m level clock voltage" to
+ * the file.  E.g., "s 1 500 820" will update sclk level 1 to be 500 MHz
+ * at 820 mV; "m 0 350 810" will update mclk level 0 to be 350 MHz at
+ * 810 mV.  When you have edited all of the states as needed, write
+ * "c" (commit) to the file to commit your changes.  If you want to reset to the
+ * default power levels, write "r" (reset) to the file to reset them.
+ *
+ */
+
 static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev,
 		struct device_attribute *attr,
 		const char *buf,
-- 
2.13.6

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/6] Add documentation power related sysfs interfaces
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
                     ` (5 preceding siblings ...)
  2018-04-19 20:05   ` [PATCH 6/6] drm/amdgpu/pm: document pp_od_clk_voltage Alex Deucher
@ 2018-04-19 21:45   ` Felix Kuehling
  2018-04-20  5:09   ` Huang Rui
  7 siblings, 0 replies; 11+ messages in thread
From: Felix Kuehling @ 2018-04-19 21:45 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Thanks. It's great to see this documented. I haven't confirmed that the
information is 100% accurate. Acked-by: Felix Kuehling
<Felix.Kuehling@amd.com>


On 2018-04-19 04:05 PM, Alex Deucher wrote:
> Provide some initial documenation on how to use the power sysfs
> APIs.
>
> Alex Deucher (6):
>   drm/amdgpu/pm: document power_dpm_force_performance_level
>   drm/amdgpu/pm: document power_dpm_state
>   drm/amdgpu/pm: document pp_table
>   drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
>   drm/amdgpu/pm: document pp_power_profile_mode
>   drm/amdgpu/pm: document pp_od_clk_voltage
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 156 +++++++++++++++++++++++++++++++++
>  1 file changed, 156 insertions(+)
>

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/6] Add documentation power related sysfs interfaces
       [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
                     ` (6 preceding siblings ...)
  2018-04-19 21:45   ` [PATCH 0/6] Add documentation power related sysfs interfaces Felix Kuehling
@ 2018-04-20  5:09   ` Huang Rui
  7 siblings, 0 replies; 11+ messages in thread
From: Huang Rui @ 2018-04-20  5:09 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Thu, Apr 19, 2018 at 03:05:08PM -0500, Alex Deucher wrote:
> Provide some initial documenation on how to use the power sysfs
> APIs.
> 

Series are Reviewed-by: Huang Rui <ray.huang@amd.com>

> Alex Deucher (6):
>   drm/amdgpu/pm: document power_dpm_force_performance_level
>   drm/amdgpu/pm: document power_dpm_state
>   drm/amdgpu/pm: document pp_table
>   drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
>   drm/amdgpu/pm: document pp_power_profile_mode
>   drm/amdgpu/pm: document pp_od_clk_voltage
> 
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 156 +++++++++++++++++++++++++++++++++
>  1 file changed, 156 insertions(+)
> 
> -- 
> 2.13.6
> 
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
       [not found]     ` <20180419200514.29136-5-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2018-04-20  6:16       ` Zhu, Rex
       [not found]         ` <CY4PR12MB1687A0B523B78812CA764ECBFBB40-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Zhu, Rex @ 2018-04-20  6:16 UTC (permalink / raw)
  To: 'Alex Deucher',
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
  Cc: Deucher, Alexander

Hi Alex,

>  There  will be a '*' next to the level that is currently active.

We need to add a level for deep sleep state.
Otherwise, On Vega/Rv, when gpu in deepsleep, we can't set "*" for the current level.


Best Regards
Rex

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Alex Deucher
Sent: Friday, April 20, 2018 4:05 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander
Subject: [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie

Used for manually masking dpm states.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 9982f1b1f8c4..3f1715b1a547 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -539,6 +539,24 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
 
 }
 
+/**
+ * DOC: pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
+ *
+ * The amdgpu driver provides a sysfs API for adjusting what power levels
+ * are enabled for a given power state.  The files pp_dpm_sclk, pp_dpm_mclk,
+ * and pp_dpm_pcie are used for this.
+ *
+ * Reading back the files will show you the available power levels within
+ * the power state and the clock information for those levels.  There
+ * will be a '*' next to the level that is currently active.
+ *
+ * To manually adjust these states, first select manual using
+ * power_dpm_force_performance_level.  Writing a string of the level
+ * numbers to the file will select which levels you want to enable.
+ * E.g., writing 456 to the file will enable levels 4, 5, and 6.
+ *
+ */
+
 static ssize_t amdgpu_get_pp_dpm_sclk(struct device *dev,
 		struct device_attribute *attr,
 		char *buf)
-- 
2.13.6

_______________________________________________
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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
       [not found]         ` <CY4PR12MB1687A0B523B78812CA764ECBFBB40-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2018-04-20 19:35           ` Alex Deucher
  0 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2018-04-20 19:35 UTC (permalink / raw)
  To: Zhu, Rex
  Cc: Deucher, Alexander,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org

On Fri, Apr 20, 2018 at 2:16 AM, Zhu, Rex <Rex.Zhu@amd.com> wrote:
> Hi Alex,
>
>>  There  will be a '*' next to the level that is currently active.
>
> We need to add a level for deep sleep state.
> Otherwise, On Vega/Rv, when gpu in deepsleep, we can't set "*" for the current level.

I dropped that sentence for now.  We can revisit it later.  Thanks!

Alex

>
>
> Best Regards
> Rex
>
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Alex Deucher
> Sent: Friday, April 20, 2018 4:05 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander
> Subject: [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
>
> Used for manually masking dpm states.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index 9982f1b1f8c4..3f1715b1a547 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -539,6 +539,24 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
>
>  }
>
> +/**
> + * DOC: pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
> + *
> + * The amdgpu driver provides a sysfs API for adjusting what power levels
> + * are enabled for a given power state.  The files pp_dpm_sclk, pp_dpm_mclk,
> + * and pp_dpm_pcie are used for this.
> + *
> + * Reading back the files will show you the available power levels within
> + * the power state and the clock information for those levels.  There
> + * will be a '*' next to the level that is currently active.
> + *
> + * To manually adjust these states, first select manual using
> + * power_dpm_force_performance_level.  Writing a string of the level
> + * numbers to the file will select which levels you want to enable.
> + * E.g., writing 456 to the file will enable levels 4, 5, and 6.
> + *
> + */
> +
>  static ssize_t amdgpu_get_pp_dpm_sclk(struct device *dev,
>                 struct device_attribute *attr,
>                 char *buf)
> --
> 2.13.6
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-04-20 19:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 20:05 [PATCH 0/6] Add documentation power related sysfs interfaces Alex Deucher
     [not found] ` <20180419200514.29136-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-04-19 20:05   ` [PATCH 1/6] drm/amdgpu/pm: document power_dpm_force_performance_level Alex Deucher
2018-04-19 20:05   ` [PATCH 2/6] drm/amdgpu/pm: document power_dpm_state Alex Deucher
2018-04-19 20:05   ` [PATCH 3/6] drm/amdgpu/pm: document pp_table Alex Deucher
2018-04-19 20:05   ` [PATCH 4/6] drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie Alex Deucher
     [not found]     ` <20180419200514.29136-5-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-04-20  6:16       ` Zhu, Rex
     [not found]         ` <CY4PR12MB1687A0B523B78812CA764ECBFBB40-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-20 19:35           ` Alex Deucher
2018-04-19 20:05   ` [PATCH 5/6] drm/amdgpu/pm: document pp_power_profile_mode Alex Deucher
2018-04-19 20:05   ` [PATCH 6/6] drm/amdgpu/pm: document pp_od_clk_voltage Alex Deucher
2018-04-19 21:45   ` [PATCH 0/6] Add documentation power related sysfs interfaces Felix Kuehling
2018-04-20  5:09   ` Huang Rui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox