linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU
@ 2020-11-26 13:42 Lee Jones
  2020-11-26 13:42 ` [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res' Lee Jones
                   ` (39 more replies)
  0 siblings, 40 replies; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, amd-gfx, Christian König,
	Daniel Vetter, David Airlie, dri-devel, Evan Quan, freedreno,
	Gustavo A. R. Silva, Harry Wentland, Huang Rui, Leo Li,
	linux-arm-msm, Rob Clark, Sean Paul, Shubhashree Dhar

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

500 out of 5000 left!

Lee Jones (40):
  drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused
    variable 'res'
  drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by
    reference static
  drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable
    'res'
  drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by
    reference static
  drm/amd/pm/powerplay/smumgr/vegam_smumgr: Make function called by
    reference static
  drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header
    containing our prototypes
  drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format
    abuse
  drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused
    'phm_set_*()' functions
  drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()'
    prototype to shared header
  drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as
    __maybe_unused
  drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under
    same clause as its use
  drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable
    'fPowerDPMx'
  drm/amd/pm/powerplay/hwmgr/hwmgr: Move
    'smu7_init_function_pointers()'s prototype to header
  drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting
    abuses
  drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting
    misuse
  drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable
    'res'
  drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header
    related formatting issues
  drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper
    kernel-doc format
  drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc
    issues
  drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function
    invoked by reference static
  drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical
    function doc issues
  drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Remove set but unused
    variable 'result'
  drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch
    of function docs
  drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated
    function doc formatting
  drm/amd/pm/powerplay/hwmgr/pp_psm: Remove unused variable 'result'
  drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s
    prototype to shared header
  drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s
    prototype to shared header
  drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc
    headers
  drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function
    documentation
  drm/amd/pm/powerplay/hwmgr/vega12_thermal: Fix some outdated function
    documentation
  drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret'
  drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as
    __maybe_unused
  drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' as
    __maybe_unused
  drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format
    notation
  drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix
    another kernel-doc header
  drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions
    invoked by reference as static
  drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function
    'pp_nv_set_pme_wa_enable()'
  drm/amd/display/dc/basics/conversion: Include header containing our
    prototypes
  drm/amd/display/dc/basics/fixpt31_32: Remove unused variable
    'dc_fixpt_pi'
  drm/amd/display/dc/basics/vector: Make local function
    'dal_vector_presized_costruct' static

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_color.c   |   4 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |   1 +
 .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  28 +--
 .../drm/amd/display/dc/basics/conversion.c    |   1 +
 .../drm/amd/display/dc/basics/fixpt31_32.c    |   1 -
 .../gpu/drm/amd/display/dc/basics/vector.c    |   2 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h   |   2 +-
 drivers/gpu/drm/amd/pm/inc/hwmgr.h            |   4 +
 drivers/gpu/drm/amd/pm/inc/pp_thermal.h       |   4 +-
 .../amd/pm/powerplay/hwmgr/hardwaremanager.c  |  56 ++----
 .../gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c    |   4 -
 .../gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c   |   3 +-
 .../drm/amd/pm/powerplay/hwmgr/ppatomctrl.c   |  84 +++++----
 .../drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c |  24 +--
 .../drm/amd/pm/powerplay/hwmgr/ppevvmath.h    |   6 +-
 .../powerplay/hwmgr/process_pptables_v1_0.c   |  81 ++++-----
 .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c   | 166 +++++++++---------
 .../drm/amd/pm/powerplay/hwmgr/smu7_thermal.c | 103 ++++++-----
 .../drm/amd/pm/powerplay/hwmgr/smu_helper.c   |   8 +-
 .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c |   3 +-
 .../powerplay/hwmgr/vega10_processpptables.c  |   2 +-
 .../amd/pm/powerplay/hwmgr/vega10_thermal.c   | 131 +++++++-------
 .../amd/pm/powerplay/hwmgr/vega12_thermal.c   |  82 ++++-----
 .../amd/pm/powerplay/hwmgr/vega20_thermal.c   |  54 +++---
 drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c     |  18 +-
 .../drm/amd/pm/powerplay/smumgr/ci_smumgr.c   |   3 +-
 .../drm/amd/pm/powerplay/smumgr/fiji_smumgr.c |   2 +-
 .../amd/pm/powerplay/smumgr/iceland_smumgr.c  |   5 +-
 .../pm/powerplay/smumgr/polaris10_smumgr.c    |   2 +-
 .../drm/amd/pm/powerplay/smumgr/smu9_smumgr.c |   1 +
 .../amd/pm/powerplay/smumgr/tonga_smumgr.c    |   9 +-
 .../amd/pm/powerplay/smumgr/vegam_smumgr.c    |   2 +-
 .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c |   4 +-
 34 files changed, 409 insertions(+), 493 deletions(-)

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Cc: Evan Quan <evan.quan@amd.com>
Cc: freedreno@lists.freedesktop.org
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Shubhashree Dhar <dhar@codeaurora.org>
-- 
2.25.1


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

* [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:09   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 02/40] drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static Lee Jones
                   ` (38 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c: In function ‘tonga_thermal_setup_fan_table’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2469:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
index 4bfadb49521bc..c28f3e1299701 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
@@ -2466,7 +2466,6 @@ static int tonga_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 	uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
 	uint16_t fdo_min, slope1, slope2;
 	uint32_t reference_clock;
-	int res;
 	uint64_t tmp64;
 
 	if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
@@ -2539,11 +2538,9 @@ static int tonga_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 
 	fan_table.FanControl_GL_Flag = 1;
 
-	res = smu7_copy_bytes_to_smc(hwmgr,
-					smu_data->smu7_data.fan_table_start,
-					(uint8_t *)&fan_table,
-					(uint32_t)sizeof(fan_table),
-					SMC_RAM_END);
+	smu7_copy_bytes_to_smc(hwmgr, smu_data->smu7_data.fan_table_start,
+			       (uint8_t *)&fan_table,
+			       (uint32_t)sizeof(fan_table), SMC_RAM_END);
 
 	return 0;
 }
-- 
2.25.1


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

* [PATCH 02/40] drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
  2020-11-26 13:42 ` [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:10   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 03/40] drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable 'res' Lee Jones
                   ` (37 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2145:5: warning: no previous prototype for ‘polaris10_thermal_avfs_enable’ [-Wmissing-prototypes]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
index 052bc88cf33c9..45214a364baa9 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
@@ -2142,7 +2142,7 @@ static int polaris10_program_mem_timing_parameters(struct pp_hwmgr *hwmgr)
 	return 0;
 }
 
-int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
+static int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
 
-- 
2.25.1


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

* [PATCH 03/40] drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable 'res'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
  2020-11-26 13:42 ` [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res' Lee Jones
  2020-11-26 13:42 ` [PATCH 02/40] drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:14   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 04/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static Lee Jones
                   ` (36 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/ci_smumgr.c: In function ‘ci_thermal_setup_fan_table’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/ci_smumgr.c:2132:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
index 329bf4d44bbce..c1d869b4c7a42 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
@@ -2129,7 +2129,6 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 	uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
 	uint16_t fdo_min, slope1, slope2;
 	uint32_t reference_clock;
-	int res;
 	uint64_t tmp64;
 
 	if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_MicrocodeFanControl))
@@ -2191,7 +2190,7 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 
 	fan_table.TempSrc = (uint8_t)PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, CG_MULT_THERMAL_CTRL, TEMP_SEL);
 
-	res = ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
+	ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
 
 	return 0;
 }
-- 
2.25.1


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

* [PATCH 04/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (2 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 03/40] drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable 'res' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:16   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 05/40] drm/amd/pm/powerplay/smumgr/vegam_smumgr: " Lee Jones
                   ` (35 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Huang Rui, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2085:5: warning: no previous prototype for ‘iceland_thermal_setup_fan_table’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c: In function ‘iceland_thermal_setup_fan_table’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2093:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Huang Rui <ray.huang@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
index 431ad2fd38df1..6a0f581de999b 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
@@ -2082,7 +2082,7 @@ static int iceland_init_smc_table(struct pp_hwmgr *hwmgr)
 	return 0;
 }
 
-int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
+static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_smumgr *smu7_data = (struct smu7_smumgr *)(hwmgr->smu_backend);
 	SMU71_Discrete_FanTable fan_table = { FDO_MODE_HARDWARE };
-- 
2.25.1


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

* [PATCH 05/40] drm/amd/pm/powerplay/smumgr/vegam_smumgr: Make function called by reference static
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (3 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 04/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:16   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 06/40] drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes Lee Jones
                   ` (34 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/vegam_smumgr.c:2249:5: warning: no previous prototype for ‘vegam_thermal_avfs_enable’ [-Wmissing-prototypes]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
index 38a5cdcf58967..7d024d3facef0 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
@@ -2246,7 +2246,7 @@ static int vegam_update_sclk_threshold(struct pp_hwmgr *hwmgr)
 	return result;
 }
 
-int vegam_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
+static int vegam_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
 	int ret;
-- 
2.25.1


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

* [PATCH 06/40] drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (4 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 05/40] drm/amd/pm/powerplay/smumgr/vegam_smumgr: " Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:17   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 07/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse Lee Jones
                   ` (33 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:38:6: warning: no previous prototype for ‘smu9_is_smc_ram_running’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:112:5: warning: no previous prototype for ‘smu9_send_msg_to_smc’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:140:5: warning: no previous prototype for ‘smu9_send_msg_to_smc_with_parameter’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:165:10: warning: no previous prototype for ‘smu9_get_argument’ [-Wmissing-prototypes]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
index 8a9aee85043ec..23e5de3c4ec16 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
@@ -22,6 +22,7 @@
  */
 
 #include "smumgr.h"
+#include "smu9_smumgr.h"
 #include "vega10_inc.h"
 #include "soc15_common.h"
 #include "pp_debug.h"
-- 
2.25.1


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

* [PATCH 07/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (5 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 06/40] drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:18   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions Lee Jones
                   ` (32 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1107: warning: Function parameter or member 'mem_clock' not described in 'fiji_get_mclk_frequency_ratio'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
index fea008cc1f254..02c094a06605d 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
@@ -1090,7 +1090,7 @@ static int fiji_populate_all_graphic_levels(struct pp_hwmgr *hwmgr)
 }
 
 
-/**
+/*
  * MCLK Frequency Ratio
  * SEQ_CG_RESP  Bit[31:24] - 0x0
  * Bit[27:24] \96 DDR3 Frequency ratio
-- 
2.25.1


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

* [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (6 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 07/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:20   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header Lee Jones
                   ` (31 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:518:5: warning: no previous prototype for ‘phm_set_min_deep_sleep_dcefclk’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:528:5: warning: no previous prototype for ‘phm_set_hard_min_dcefclk_by_freq’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:538:5: warning: no previous prototype for ‘phm_set_hard_min_fclk_by_freq’ [-Wmissing-prototypes]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../amd/pm/powerplay/hwmgr/hardwaremanager.c  | 31 -------------------
 1 file changed, 31 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
index 1f9b9facdf1f4..45dde3e74b578 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
@@ -514,34 +514,3 @@ int phm_set_active_display_count(struct pp_hwmgr *hwmgr, uint32_t count)
 
 	return hwmgr->hwmgr_func->set_active_display_count(hwmgr, count);
 }
-
-int phm_set_min_deep_sleep_dcefclk(struct pp_hwmgr *hwmgr, uint32_t clock)
-{
-	PHM_FUNC_CHECK(hwmgr);
-
-	if (!hwmgr->hwmgr_func->set_min_deep_sleep_dcefclk)
-		return -EINVAL;
-
-	return hwmgr->hwmgr_func->set_min_deep_sleep_dcefclk(hwmgr, clock);
-}
-
-int phm_set_hard_min_dcefclk_by_freq(struct pp_hwmgr *hwmgr, uint32_t clock)
-{
-	PHM_FUNC_CHECK(hwmgr);
-
-	if (!hwmgr->hwmgr_func->set_hard_min_dcefclk_by_freq)
-		return -EINVAL;
-
-	return hwmgr->hwmgr_func->set_hard_min_dcefclk_by_freq(hwmgr, clock);
-}
-
-int phm_set_hard_min_fclk_by_freq(struct pp_hwmgr *hwmgr, uint32_t clock)
-{
-	PHM_FUNC_CHECK(hwmgr);
-
-	if (!hwmgr->hwmgr_func->set_hard_min_fclk_by_freq)
-		return -EINVAL;
-
-	return hwmgr->hwmgr_func->set_hard_min_fclk_by_freq(hwmgr, clock);
-}
-
-- 
2.25.1


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

* [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (7 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:28   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 10/40] drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused Lee Jones
                   ` (30 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
index 1bb379498a121..0e22cba3ce3a6 100644
--- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
@@ -828,5 +828,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
 
 #define PHM_ENTIRE_REGISTER_MASK 0xFFFFFFFFU
 
+int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
 
 #endif /* _HWMGR_H_ */
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
index 739e215ec8b7f..ec17a3e63ea02 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
@@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
 extern const struct pp_smumgr_func vega20_smu_funcs;
 
 extern int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
-extern int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
 extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
 extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
 extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
-- 
2.25.1


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

* [PATCH 10/40] drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (8 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:29   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use Lee Jones
                   ` (29 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Alex Deucher, Christian König, David Airlie,
	Daniel Vetter, Evan Quan, amd-gfx, dri-devel

They are used by some source files which include pp_thermal.h, but not all.

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
 drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Evan Quan <evan.quan@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/inc/pp_thermal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/pp_thermal.h b/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
index 3e30768f9e1cc..f7c41185097e4 100644
--- a/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
+++ b/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
@@ -25,13 +25,13 @@
 
 #include "power_state.h"
 
-static const struct PP_TemperatureRange SMU7ThermalWithDelayPolicy[] =
+static const struct PP_TemperatureRange __maybe_unused SMU7ThermalWithDelayPolicy[] =
 {
 	{-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
 	{ 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000},
 };
 
-static const struct PP_TemperatureRange SMU7ThermalPolicy[] =
+static const struct PP_TemperatureRange __maybe_unused SMU7ThermalPolicy[] =
 {
 	{-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
 	{ 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000},
-- 
2.25.1


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

* [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (9 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 10/40] drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:31   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx' Lee Jones
                   ` (28 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h: In function ‘fMultiply’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:22: warning: variable ‘Y_LessThanOne’ set but not used [-Wunused-but-set-variable]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:7: warning: variable ‘X_LessThanOne’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
index 8f50a038396ce..dac29fe6cfc6f 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
@@ -333,14 +333,14 @@ static fInt fMultiply (fInt X, fInt Y) /* Uses 64-bit integers (int64_t) */
 {
 	fInt Product;
 	int64_t tempProduct;
+
+	/*The following is for a very specific common case: Non-zero number with ONLY fractional portion*/
+	/* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION
 	bool X_LessThanOne, Y_LessThanOne;
 
 	X_LessThanOne = (X.partial.real == 0 && X.partial.decimal != 0 && X.full >= 0);
 	Y_LessThanOne = (Y.partial.real == 0 && Y.partial.decimal != 0 && Y.full >= 0);
 
-	/*The following is for a very specific common case: Non-zero number with ONLY fractional portion*/
-	/* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION
-
 	if (X_LessThanOne && Y_LessThanOne) {
 		Product.full = X.full * Y.full;
 		return Product
-- 
2.25.1


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

* [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (10 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:33   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 13/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header Lee Jones
                   ` (27 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:31:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c: In function ‘atomctrl_calculate_voltage_evv_on_sclk’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:702:22: warning: variable ‘fPowerDPMx’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
index c2fee6796bd93..2cb913ab77f26 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
@@ -699,7 +699,7 @@ int atomctrl_calculate_voltage_evv_on_sclk(
 	fInt fMargin_RO_a, fMargin_RO_b, fMargin_RO_c, fMargin_fixed, fMargin_FMAX_mean, fMargin_Plat_mean, fMargin_FMAX_sigma, fMargin_Plat_sigma, fMargin_DC_sigma;
 	fInt fLkg_FT, repeat;
 	fInt fMicro_FMAX, fMicro_CR, fSigma_FMAX, fSigma_CR, fSigma_DC, fDC_SCLK, fSquared_Sigma_DC, fSquared_Sigma_CR, fSquared_Sigma_FMAX;
-	fInt fRLL_LoadLine, fPowerDPMx, fDerateTDP, fVDDC_base, fA_Term, fC_Term, fB_Term, fRO_DC_margin;
+	fInt fRLL_LoadLine, fDerateTDP, fVDDC_base, fA_Term, fC_Term, fB_Term, fRO_DC_margin;
 	fInt fRO_fused, fCACm_fused, fCACb_fused, fKv_m_fused, fKv_b_fused, fKt_Beta_fused, fFT_Lkg_V0NORM;
 	fInt fSclk_margin, fSclk, fEVV_V;
 	fInt fV_min, fV_max, fT_prod, fLKG_Factor, fT_FT, fV_FT, fV_x, fTDP_Power, fTDP_Power_right, fTDP_Power_left, fTDP_Current, fV_NL;
@@ -731,36 +731,28 @@ int atomctrl_calculate_voltage_evv_on_sclk(
 
 	switch (dpm_level) {
 	case 1:
-		fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm1));
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM1), 1000);
 		break;
 	case 2:
-		fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm2));
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM2), 1000);
 		break;
 	case 3:
-		fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm3));
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM3), 1000);
 		break;
 	case 4:
-		fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm4));
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM4), 1000);
 		break;
 	case 5:
-		fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm5));
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM5), 1000);
 		break;
 	case 6:
-		fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm6));
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM6), 1000);
 		break;
 	case 7:
-		fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm7));
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM7), 1000);
 		break;
 	default:
 		pr_err("DPM Level not supported\n");
-		fPowerDPMx = Convert_ULONG_ToFraction(1);
 		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM0), 1000);
 	}
 
-- 
2.25.1


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

* [PATCH 13/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (11 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:33   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 14/40] drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses Lee Jones
                   ` (26 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5696:5: warning: no previous prototype for ‘smu7_init_function_pointers’ [-Wmissing-prototypes]
 5696 | int smu7_init_function_pointers(struct pp_hwmgr *hwmgr)
 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
index 0e22cba3ce3a6..393e4e76a8961 100644
--- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
@@ -828,6 +828,7 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
 
 #define PHM_ENTIRE_REGISTER_MASK 0xFFFFFFFFU
 
+int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
 int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
 
 #endif /* _HWMGR_H_ */
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
index ec17a3e63ea02..7999091cca16e 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
@@ -46,7 +46,6 @@ extern const struct pp_smumgr_func vega12_smu_funcs;
 extern const struct pp_smumgr_func smu10_smu_funcs;
 extern const struct pp_smumgr_func vega20_smu_funcs;
 
-extern int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
 extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
 extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
 extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
-- 
2.25.1


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

* [PATCH 14/40] drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (12 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 13/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:34   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 15/40] drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting misuse Lee Jones
                   ` (25 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'voltage_type' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'voltage_mode' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_get_pp_assign_pin'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'pin_id' not described in 'pp_atomfwctrl_get_pp_assign_pin'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'gpio_pin_assignment' not described in 'pp_atomfwctrl_get_pp_assign_pin'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:232: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_enter_self_refresh'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
index 615cf2c09e54e..a47a47238e2b9 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
@@ -68,11 +68,11 @@ static struct atom_voltage_objects_info_v4_1 *pp_atomfwctrl_get_voltage_info_tab
 	return (struct atom_voltage_objects_info_v4_1 *)table_address;
 }
 
-/**
-* Returns TRUE if the given voltage type is controlled by GPIO pins.
-* voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC, SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
-* voltage_mode is one of ATOM_SET_VOLTAGE, ATOM_SET_VOLTAGE_PHASE
-*/
+/*
+ * Returns TRUE if the given voltage type is controlled by GPIO pins.
+ * voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC, SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
+ * voltage_mode is one of ATOM_SET_VOLTAGE, ATOM_SET_VOLTAGE_PHASE
+ */
 bool pp_atomfwctrl_is_voltage_controlled_by_gpio_v4(struct pp_hwmgr *hwmgr,
 		uint8_t voltage_type, uint8_t voltage_mode)
 {
@@ -202,9 +202,9 @@ static bool pp_atomfwctrl_lookup_gpio_pin(
 	return false;
 }
 
-/**
-* Returns TRUE if the given pin id find in lookup table.
-*/
+/*
+ * Returns TRUE if the given pin id find in lookup table.
+ */
 bool pp_atomfwctrl_get_pp_assign_pin(struct pp_hwmgr *hwmgr,
 		const uint32_t pin_id,
 		struct pp_atomfwctrl_gpio_pin_assignment *gpio_pin_assignment)
@@ -224,10 +224,10 @@ bool pp_atomfwctrl_get_pp_assign_pin(struct pp_hwmgr *hwmgr,
 	return ret;
 }
 
-/**
-* Enter to SelfRefresh mode.
-* @param hwmgr
-*/
+/*
+ * Enter to SelfRefresh mode.
+ * @param hwmgr
+ */
 int pp_atomfwctrl_enter_self_refresh(struct pp_hwmgr *hwmgr)
 {
 	/* 0 - no action
-- 
2.25.1


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

* [PATCH 15/40] drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting misuse
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (13 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 14/40] drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 21:23   ` abhinavk
  2020-11-26 13:42 ` [PATCH 16/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable 'res' Lee Jones
                   ` (24 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Rob Clark, Sean Paul, David Airlie, Daniel Vetter,
	Shubhashree Dhar, linux-arm-msm, dri-devel, freedreno

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:246: error: Cannot parse struct or union!
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:756: error: Cannot parse struct or union!

Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Shubhashree Dhar <dhar@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
index 38482b1047745..5c521de715670 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
@@ -189,7 +189,7 @@ struct dpu_irq_type {
 	u32 reg_idx;
 };
 
-/**
+/*
  * struct dpu_intr_reg -  List of DPU interrupt registers
  */
 static const struct dpu_intr_reg dpu_intr_set[] = {
@@ -245,7 +245,7 @@ static const struct dpu_intr_reg dpu_intr_set[] = {
 	}
 };
 
-/**
+/*
  * struct dpu_irq_type - IRQ mapping table use for lookup an irq_idx in this
  *			 table that have a matching interface type and
  *			 instance index.
-- 
2.25.1


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

* [PATCH 16/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable 'res'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (14 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 15/40] drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting misuse Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:39   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 17/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues Lee Jones
                   ` (23 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Huang Rui, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c: In function ‘iceland_thermal_setup_fan_table’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2093:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Huang Rui <ray.huang@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
index 6a0f581de999b..2da5225eafbb8 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
@@ -2090,7 +2090,6 @@ static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 	uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
 	uint16_t fdo_min, slope1, slope2;
 	uint32_t reference_clock;
-	int res;
 	uint64_t tmp64;
 
 	if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_MicrocodeFanControl))
@@ -2154,7 +2153,7 @@ static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 
 	/* fan_table.FanControl_GL_Flag = 1; */
 
-	res = smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
+	smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
 
 	return 0;
 }
-- 
2.25.1


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

* [PATCH 17/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (15 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 16/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable 'res' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:40   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 18/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format Lee Jones
                   ` (22 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:232: warning: Function parameter or member 'hwmgr' not described in 'phm_start_thermal_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'hwmgr' not described in 'phm_get_clock_info'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'state' not described in 'phm_get_clock_info'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'pclock_info' not described in 'phm_get_clock_info'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'designation' not described in 'phm_get_clock_info'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../amd/pm/powerplay/hwmgr/hardwaremanager.c  | 25 ++++++++++---------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
index 45dde3e74b578..25b5831a15cd2 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
@@ -223,11 +223,11 @@ int phm_register_irq_handlers(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Initializes the thermal controller subsystem.
-*
-* @param    pHwMgr  the address of the powerplay hardware manager.
-* @exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the dispatcher.
-*/
+ * phm_start_thermal_controller - Initializes the thermal controller subsystem.
+ *
+ * @hwmgr:   the address of the powerplay hardware manager.
+ * Exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the dispatcher.
+ */
 int phm_start_thermal_controller(struct pp_hwmgr *hwmgr)
 {
 	int ret = 0;
@@ -371,13 +371,14 @@ int phm_get_performance_level(struct pp_hwmgr *hwmgr, const struct pp_hw_power_s
 
 
 /**
-* Gets Clock Info.
-*
-* @param    pHwMgr  the address of the powerplay hardware manager.
-* @param    pPowerState the address of the Power State structure.
-* @param    pClockInfo the address of PP_ClockInfo structure where the result will be returned.
-* @exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the back-end.
-*/
+ * phm_get_clock_info
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @state: the address of the Power State structure.
+ * @pclock_info: the address of PP_ClockInfo structure where the result will be returned.
+ * @designation: PHM performance level designation
+ * Exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the back-end.
+ */
 int phm_get_clock_info(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *state, struct pp_clock_info *pclock_info,
 			PHM_PerformanceLevelDesignation designation)
 {
-- 
2.25.1


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

* [PATCH 18/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (16 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 17/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:41   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 19/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues Lee Jones
                   ` (21 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'hwmgr' not described in 'set_hw_cap'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'setIt' not described in 'set_hw_cap'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'cap' not described in 'set_hw_cap'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: warning: Function parameter or member 'hwmgr' not described in 'set_platform_caps'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: warning: Function parameter or member 'powerplay_caps' not described in 'set_platform_caps'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:135: warning: Function parameter or member 'hwmgr' not described in 'get_powerplay_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: warning: Function parameter or member 'hwmgr' not described in 'get_platform_power_management_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: warning: Function parameter or member 'atom_ppm_table' not described in 'get_platform_power_management_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: warning: Function parameter or member 'hwmgr' not described in 'init_dpm_2_parameters'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: warning: Function parameter or member 'powerplay_table' not described in 'init_dpm_2_parameters'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: warning: Function parameter or member 'hwmgr' not described in 'init_clock_voltage_dependency'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: warning: Function parameter or member 'powerplay_table' not described in 'init_clock_voltage_dependency'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: warning: Function parameter or member 'hwmgr' not described in 'init_thermal_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: warning: Function parameter or member 'powerplay_table' not described in 'init_thermal_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121: warning: Function parameter or member 'hwmgr' not described in 'check_powerplay_tables'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121: warning: Function parameter or member 'powerplay_table' not described in 'check_powerplay_tables'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'hwmgr' not described in 'make_classification_flags'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'classification' not described in 'make_classification_flags'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'classification2' not described in 'make_classification_flags'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'hwmgr' not described in 'get_powerplay_table_entry_v1_0'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'entry_index' not described in 'get_powerplay_table_entry_v1_0'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'power_state' not described in 'get_powerplay_table_entry_v1_0'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'call_back_func' not described in 'get_powerplay_table_entry_v1_0'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../powerplay/hwmgr/process_pptables_v1_0.c   | 81 ++++++++++---------
 1 file changed, 41 insertions(+), 40 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
index 801a565026703..741e03ad5311f 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
@@ -32,10 +32,10 @@
 #include "pptable_v1_0.h"
 
 /**
- * Private Function used during initialization.
- * @param hwmgr Pointer to the hardware manager.
- * @param setIt A flag indication if the capability should be set (TRUE) or reset (FALSE).
- * @param cap Which capability to set/reset.
+ * set_hw_cap - Private Function used during initialization.
+ * @hwmgr: Pointer to the hardware manager.
+ * @setIt: A flag indication if the capability should be set (TRUE) or reset (FALSE).
+ * @cap: Which capability to set/reset.
  */
 static void set_hw_cap(struct pp_hwmgr *hwmgr, bool setIt, enum phm_platform_caps cap)
 {
@@ -47,10 +47,10 @@ static void set_hw_cap(struct pp_hwmgr *hwmgr, bool setIt, enum phm_platform_cap
 
 
 /**
- * Private Function used during initialization.
- * @param hwmgr Pointer to the hardware manager.
- * @param powerplay_caps the bit array (from BIOS) of capability bits.
- * @exception the current implementation always returns 1.
+ * set_platform_caps - Private Function used during initialization.
+ * @hwmgr: Pointer to the hardware manager.
+ * @powerplay_caps: the bit array (from BIOS) of capability bits.
+ * Exception:  the current implementation always returns 1.
  */
 static int set_platform_caps(struct pp_hwmgr *hwmgr, uint32_t powerplay_caps)
 {
@@ -128,7 +128,7 @@ static int set_platform_caps(struct pp_hwmgr *hwmgr, uint32_t powerplay_caps)
 	return 0;
 }
 
-/**
+/*
  * Private Function to get the PowerPlay Table Address.
  */
 static const void *get_powerplay_table(struct pp_hwmgr *hwmgr)
@@ -191,10 +191,10 @@ static int get_vddc_lookup_table(
 }
 
 /**
- * Private Function used during initialization.
+ * get_platform_power_management_table - Private Function used during initialization.
  * Initialize Platform Power Management Parameter table
- * @param hwmgr Pointer to the hardware manager.
- * @param atom_ppm_table Pointer to PPM table in VBIOS
+ * @hwmgr: Pointer to the hardware manager.
+ * @atom_ppm_table: Pointer to PPM table in VBIOS
  */
 static int get_platform_power_management_table(
 		struct pp_hwmgr *hwmgr,
@@ -234,10 +234,10 @@ static int get_platform_power_management_table(
 }
 
 /**
- * Private Function used during initialization.
+ * init_dpm_2_parameters - Private Function used during initialization.
  * Initialize TDP limits for DPM2
- * @param hwmgr Pointer to the hardware manager.
- * @param powerplay_table Pointer to the PowerPlay Table.
+ * @hwmgr: Pointer to the hardware manager.
+ * @powerplay_table: Pointer to the PowerPlay Table.
  */
 static int init_dpm_2_parameters(
 		struct pp_hwmgr *hwmgr,
@@ -779,10 +779,10 @@ static int get_gpio_table(struct pp_hwmgr *hwmgr,
 	return 0;
 }
 /**
- * Private Function used during initialization.
+ * init_clock_voltage_dependency - Private Function used during initialization.
  * Initialize clock voltage dependency
- * @param hwmgr Pointer to the hardware manager.
- * @param powerplay_table Pointer to the PowerPlay Table.
+ * @hwmgr: Pointer to the hardware manager.
+ * @powerplay_table: Pointer to the PowerPlay Table.
  */
 static int init_clock_voltage_dependency(
 		struct pp_hwmgr *hwmgr,
@@ -871,15 +871,16 @@ static int init_clock_voltage_dependency(
 	return result;
 }
 
-/** Retrieves the (signed) Overdrive limits from VBIOS.
+/**
+ * init_over_drive_limits - Retrieves the (signed) Overdrive limits from VBIOS.
  * The max engine clock, memory clock and max temperature come from the firmware info table.
  *
  * The information is placed into the platform descriptor.
  *
- * @param hwmgr source of the VBIOS table and owner of the platform descriptor to be updated.
- * @param powerplay_table the address of the PowerPlay table.
+ * @hwmgr: source of the VBIOS table and owner of the platform descriptor to be updated.
+ * @powerplay_table: the address of the PowerPlay table.
  *
- * @return 1 as long as the firmware info table was present and of a supported version.
+ * Return: 1 as long as the firmware info table was present and of a supported version.
  */
 static int init_over_drive_limits(
 		struct pp_hwmgr *hwmgr,
@@ -898,11 +899,11 @@ static int init_over_drive_limits(
 }
 
 /**
- * Private Function used during initialization.
+ * init_thermal_controller - Private Function used during initialization.
  * Inspect the PowerPlay table for obvious signs of corruption.
- * @param hwmgr Pointer to the hardware manager.
- * @param powerplay_table Pointer to the PowerPlay Table.
- * @exception This implementation always returns 1.
+ * @hwmgr: Pointer to the hardware manager.
+ * @powerplay_table: Pointer to the PowerPlay Table.
+ * Exception:  This implementation always returns 1.
  */
 static int init_thermal_controller(
 		struct pp_hwmgr *hwmgr,
@@ -1108,11 +1109,11 @@ static int init_thermal_controller(
 }
 
 /**
- * Private Function used during initialization.
+ * check_powerplay_tables - Private Function used during initialization.
  * Inspect the PowerPlay table for obvious signs of corruption.
- * @param hwmgr Pointer to the hardware manager.
- * @param powerplay_table Pointer to the PowerPlay Table.
- * @exception 2 if the powerplay table is incorrect.
+ * @hwmgr: Pointer to the hardware manager.
+ * @powerplay_table: Pointer to the PowerPlay Table.
+ * Exception:  2 if the powerplay table is incorrect.
  */
 static int check_powerplay_tables(
 		struct pp_hwmgr *hwmgr,
@@ -1255,9 +1256,9 @@ int get_number_of_powerplay_table_entries_v1_0(struct pp_hwmgr *hwmgr)
 	return (uint32_t)(state_arrays->ucNumEntries);
 }
 
-/**
-* Private function to convert flags stored in the BIOS to software flags in PowerPlay.
-*/
+/*
+ * Private function to convert flags stored in the BIOS to software flags in PowerPlay.
+ */
 static uint32_t make_classification_flags(struct pp_hwmgr *hwmgr,
 		uint16_t classification, uint16_t classification2)
 {
@@ -1356,13 +1357,13 @@ static int ppt_get_vce_state_table_entry_v1_0(struct pp_hwmgr *hwmgr, uint32_t i
 }
 
 /**
-* Create a Power State out of an entry in the PowerPlay table.
-* This function is called by the hardware back-end.
-* @param hwmgr Pointer to the hardware manager.
-* @param entry_index The index of the entry to be extracted from the table.
-* @param power_state The address of the PowerState instance being created.
-* @return -1 if the entry cannot be retrieved.
-*/
+ * get_powerplay_table_entry_v1_0 - Create a Power State out of an entry in the PowerPlay table.
+ * This function is called by the hardware back-end.
+ * @hwmgr: Pointer to the hardware manager.
+ * @entry_index: The index of the entry to be extracted from the table.
+ * @power_state: The address of the PowerState instance being created.
+ * Return: -1 if the entry cannot be retrieved.
+ */
 int get_powerplay_table_entry_v1_0(struct pp_hwmgr *hwmgr,
 		uint32_t entry_index, struct pp_power_state *power_state,
 		int (*call_back_func)(struct pp_hwmgr *, void *,
-- 
2.25.1


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

* [PATCH 19/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (17 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 18/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:43   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 20/40] drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static Lee Jones
                   ` (20 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: Function parameter or member 'reg_block' not described in 'atomctrl_set_mc_reg_address_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: Function parameter or member 'table' not described in 'atomctrl_set_mc_reg_address_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_set_engine_dram_timings_rv770'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'engine_clock' not described in 'atomctrl_set_engine_dram_timings_rv770'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'memory_clock' not described in 'atomctrl_set_engine_dram_timings_rv770'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:239: warning: Function parameter or member 'device' not described in 'get_voltage_info_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:519: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_reference_clock'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'voltage_type' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'voltage_mode' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:640: warning: Function parameter or member 'device' not described in 'get_gpio_lookup_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_pp_assign_pin'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'pinId' not described in 'atomctrl_get_pp_assign_pin'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'gpio_pin_assignment' not described in 'atomctrl_get_pp_assign_pin'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_voltage_evv'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'virtual_voltage_id' not described in 'atomctrl_get_voltage_evv'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'voltage' not described in 'atomctrl_get_voltage_evv'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1194: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_mpll_reference_clock'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1227: warning: Function parameter or member 'device' not described in 'asic_internal_ss_get_ss_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'hwmgr' not described in 'asic_internal_ss_get_ss_asignment'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'clockSource' not described in 'asic_internal_ss_get_ss_asignment'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'clockSpeed' not described in 'asic_internal_ss_get_ss_asignment'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'ssEntry' not described in 'asic_internal_ss_get_ss_asignment'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_memory_clock_spread_spectrum'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'memory_clock' not described in 'atomctrl_get_memory_clock_spread_spectrum'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'ssInfo' not described in 'atomctrl_get_memory_clock_spread_spectrum'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_engine_clock_spread_spectrum'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'engine_clock' not described in 'atomctrl_get_engine_clock_spread_spectrum'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'ssInfo' not described in 'atomctrl_get_engine_clock_spread_spectrum'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../drm/amd/pm/powerplay/hwmgr/ppatomctrl.c   | 74 ++++++++++---------
 1 file changed, 39 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
index 2cb913ab77f26..83a6504e093cb 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
@@ -92,11 +92,11 @@ static int atomctrl_retrieve_ac_timing(
 }
 
 /**
- * Get memory clock AC timing registers index from VBIOS table
+ * atomctrl_set_mc_reg_address_table - Get memory clock AC timing registers index from VBIOS table
  * VBIOS set end of memory clock AC timing registers by ucPreRegDataLength bit6 = 1
- * @param    reg_block the address ATOM_INIT_REG_BLOCK
- * @param    table the address of MCRegTable
- * @return   0
+ * @reg_block: the address ATOM_INIT_REG_BLOCK
+ * @table: the address of MCRegTable
+ * Return:   0
  */
 static int atomctrl_set_mc_reg_address_table(
 		ATOM_INIT_REG_BLOCK *reg_block,
@@ -203,7 +203,7 @@ int atomctrl_initialize_mc_reg_table_v2_2(
 	return result;
 }
 
-/**
+/*
  * Set DRAM timings based on engine clock and memory clock.
  */
 int atomctrl_set_engine_dram_timings_rv770(
@@ -229,7 +229,7 @@ int atomctrl_set_engine_dram_timings_rv770(
 			(uint32_t *)&engine_clock_parameters);
 }
 
-/**
+/*
  * Private Function to get the PowerPlay Table Address.
  * WARNING: The tabled returned by this function is in
  * dynamically allocated memory.
@@ -274,12 +274,13 @@ static const ATOM_VOLTAGE_OBJECT_V3 *atomctrl_lookup_voltage_type_v3(
 	return NULL;
 }
 
-/** atomctrl_get_memory_pll_dividers_si().
+/**
+ * atomctrl_get_memory_pll_dividers_si().
  *
- * @param hwmgr                 input parameter: pointer to HwMgr
- * @param clock_value             input parameter: memory clock
- * @param dividers                 output parameter: memory PLL dividers
- * @param strobe_mode            input parameter: 1 for strobe mode,  0 for performance mode
+ * @hwmgr:           input parameter: pointer to HwMgr
+ * @clock_value:     input parameter: memory clock
+ * @dividers:        output parameter: memory PLL dividers
+ * @strobe_mode:     input parameter: 1 for strobe mode,  0 for performance mode
  */
 int atomctrl_get_memory_pll_dividers_si(
 		struct pp_hwmgr *hwmgr,
@@ -326,11 +327,12 @@ int atomctrl_get_memory_pll_dividers_si(
 	return result;
 }
 
-/** atomctrl_get_memory_pll_dividers_vi().
+/**
+ * atomctrl_get_memory_pll_dividers_vi().
  *
- * @param hwmgr                 input parameter: pointer to HwMgr
- * @param clock_value             input parameter: memory clock
- * @param dividers               output parameter: memory PLL dividers
+ * @hwmgr:                 input parameter: pointer to HwMgr
+ * @clock_value:           input parameter: memory clock
+ * @dividers:              output parameter: memory PLL dividers
  */
 int atomctrl_get_memory_pll_dividers_vi(struct pp_hwmgr *hwmgr,
 		uint32_t clock_value, pp_atomctrl_memory_clock_param *mpll_param)
@@ -512,7 +514,7 @@ int atomctrl_get_dfs_pll_dividers_vi(
 	return result;
 }
 
-/**
+/*
  * Get the reference clock in 10KHz
  */
 uint32_t atomctrl_get_reference_clock(struct pp_hwmgr *hwmgr)
@@ -535,7 +537,7 @@ uint32_t atomctrl_get_reference_clock(struct pp_hwmgr *hwmgr)
 	return clock;
 }
 
-/**
+/*
  * Returns true if the given voltage type is controlled by GPIO pins.
  * voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC,
  * SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
@@ -630,7 +632,7 @@ static bool atomctrl_lookup_gpio_pin(
 	return false;
 }
 
-/**
+/*
  * Private Function to get the PowerPlay Table Address.
  * WARNING: The tabled returned by this function is in
  * dynamically allocated memory.
@@ -653,7 +655,7 @@ static ATOM_GPIO_PIN_LUT *get_gpio_lookup_table(void *device)
 	return (ATOM_GPIO_PIN_LUT *)table_address;
 }
 
-/**
+/*
  * Returns 1 if the given pin id find in lookup table.
  */
 bool atomctrl_get_pp_assign_pin(
@@ -1101,14 +1103,15 @@ int atomctrl_calculate_voltage_evv_on_sclk(
 	return result;
 }
 
-/** atomctrl_get_voltage_evv_on_sclk gets voltage via call to ATOM COMMAND table.
- * @param hwmgr	input: pointer to hwManager
- * @param voltage_type            input: type of EVV voltage VDDC or VDDGFX
- * @param sclk                        input: in 10Khz unit. DPM state SCLK frequency
- *		which is define in PPTable SCLK/VDDC dependence
- *				table associated with this virtual_voltage_Id
- * @param virtual_voltage_Id      input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
- * @param voltage		       output: real voltage level in unit of mv
+/**
+ * atomctrl_get_voltage_evv_on_sclk gets voltage via call to ATOM COMMAND table.
+ * @hwmgr:              input: pointer to hwManager
+ * @voltage_type:       input: type of EVV voltage VDDC or VDDGFX
+ * @sclk:               input: in 10Khz unit. DPM state SCLK frequency
+ *		         which is define in PPTable SCLK/VDDC dependence
+ *			 table associated with this virtual_voltage_Id
+ * @virtual_voltage_Id: input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
+ * @voltage: 	        output: real voltage level in unit of mv
  */
 int atomctrl_get_voltage_evv_on_sclk(
 		struct pp_hwmgr *hwmgr,
@@ -1142,9 +1145,9 @@ int atomctrl_get_voltage_evv_on_sclk(
 
 /**
  * atomctrl_get_voltage_evv gets voltage via call to ATOM COMMAND table.
- * @param hwmgr	input: pointer to hwManager
- * @param virtual_voltage_id      input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
- * @param voltage		       output: real voltage level in unit of mv
+ * @hwmgr:              input: pointer to hwManager
+ * @virtual_voltage_id: input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
+ * @voltage: 	       output: real voltage level in unit of mv
  */
 int atomctrl_get_voltage_evv(struct pp_hwmgr *hwmgr,
 			     uint16_t virtual_voltage_id,
@@ -1187,7 +1190,7 @@ int atomctrl_get_voltage_evv(struct pp_hwmgr *hwmgr,
 	return result;
 }
 
-/**
+/*
  * Get the mpll reference clock in 10KHz
  */
 uint32_t atomctrl_get_mpll_reference_clock(struct pp_hwmgr *hwmgr)
@@ -1220,7 +1223,7 @@ uint32_t atomctrl_get_mpll_reference_clock(struct pp_hwmgr *hwmgr)
 	return clock;
 }
 
-/**
+/*
  * Get the asic internal spread spectrum table
  */
 static ATOM_ASIC_INTERNAL_SS_INFO *asic_internal_ss_get_ss_table(void *device)
@@ -1248,7 +1251,7 @@ bool atomctrl_is_asic_internal_ss_supported(struct pp_hwmgr *hwmgr)
 		return false;
 }
 
-/**
+/*
  * Get the asic internal spread spectrum assignment
  */
 static int asic_internal_ss_get_ss_asignment(struct pp_hwmgr *hwmgr,
@@ -1311,7 +1314,7 @@ static int asic_internal_ss_get_ss_asignment(struct pp_hwmgr *hwmgr,
 	return entry_found ? 0 : 1;
 }
 
-/**
+/*
  * Get the memory clock spread spectrum info
  */
 int atomctrl_get_memory_clock_spread_spectrum(
@@ -1322,7 +1325,8 @@ int atomctrl_get_memory_clock_spread_spectrum(
 	return asic_internal_ss_get_ss_asignment(hwmgr,
 			ASIC_INTERNAL_MEMORY_SS, memory_clock, ssInfo);
 }
-/**
+
+/*
  * Get the engine clock spread spectrum info
  */
 int atomctrl_get_engine_clock_spread_spectrum(
-- 
2.25.1


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

* [PATCH 20/40] drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (18 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 19/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:43   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 21/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues Lee Jones
                   ` (19 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, Gustavo A. R. Silva, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:1148:5: warning: no previous prototype for ‘vega10_pp_tables_initialize’ [-Wmissing-prototypes]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
index 535404de78a20..95b988823f50f 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
@@ -1145,7 +1145,7 @@ static int init_dpm_2_parameters(
 	return result;
 }
 
-int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
+static int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
 {
 	int result = 0;
 	const ATOM_Vega10_POWERPLAYTABLE *powerplay_table;
-- 
2.25.1


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

* [PATCH 21/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (19 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 20/40] drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:44   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 22/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Remove set but unused variable 'result' Lee Jones
                   ` (18 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:202: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_mc_microcode_version'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:242: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_smc_voltage_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:263: warning: Function parameter or member 'hwmgr' not described in 'smu7_voltage_control'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:277: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_voltage_control'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:315: warning: Function parameter or member 'hwmgr' not described in 'smu7_construct_voltage_tables'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:428: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_static_screen_threshold_parameters'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:450: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_display_gap'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:474: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_voting_clients'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:570: warning: Function parameter or member 'hwmgr' not described in 'smu7_initial_switch_from_arbf0_to_f1'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1926: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_evv_voltages'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_ppt_v1_with_vdd_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'voltage' not described in 'smu7_patch_ppt_v1_with_vdd_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_ppt_v1_with_vdd_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_lookup_table_with_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'lookup_table' not described in 'smu7_patch_lookup_table_with_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_lookup_table_with_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_ppt_v0_with_vdd_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'voltage' not described in 'smu7_patch_ppt_v0_with_vdd_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_ppt_v0_with_vdd_leakage'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4449: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_display_gap'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Function parameter or member 'hwmgr' not described in 'smu7_set_max_fan_rpm_output'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Function parameter or member 'us_max_fan_rpm' not described in 'smu7_set_max_fan_rpm_output'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4707: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_memory_type'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4723: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_acpi_power_management'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4737: warning: Function parameter or member 'hwmgr' not described in 'smu7_init_power_gate_state'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c   | 166 +++++++++---------
 1 file changed, 83 insertions(+), 83 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
index 53111c6bbcc91..82676c086ce46 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
@@ -193,10 +193,10 @@ static const struct smu7_power_state *cast_const_phw_smu7_power_state(
 }
 
 /**
- * Find the MC microcode version and store it in the HwMgr struct
+ * smu7_get_mc_microcode_version - Find the MC microcode version and store it in the HwMgr struct
  *
- * @param    hwmgr  the address of the powerplay hardware manager.
- * @return   always 0
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
  */
 static int smu7_get_mc_microcode_version(struct pp_hwmgr *hwmgr)
 {
@@ -233,11 +233,11 @@ static int smu7_get_current_pcie_lane_number(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Enable voltage control
-*
-* @param    pHwMgr  the address of the powerplay hardware manager.
-* @return   always PP_Result_OK
-*/
+ * smu7_enable_smc_voltage_controller - Enable voltage control
+ *
+ * @hwmgr  the address of the powerplay hardware manager.
+ * Return:   always PP_Result_OK
+ */
 static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr)
 {
 	if (hwmgr->chip_id >= CHIP_POLARIS10 &&
@@ -255,10 +255,10 @@ static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Checks if we want to support voltage control
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-*/
+ * smu7_voltage_control - Checks if we want to support voltage control
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ */
 static bool smu7_voltage_control(const struct pp_hwmgr *hwmgr)
 {
 	const struct smu7_hwmgr *data =
@@ -268,11 +268,11 @@ static bool smu7_voltage_control(const struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Enable voltage control
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always 0
-*/
+ * smu7_enable_voltage_control - Enable voltage control
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
+ */
 static int smu7_enable_voltage_control(struct pp_hwmgr *hwmgr)
 {
 	/* enable voltage control */
@@ -306,11 +306,11 @@ static int phm_get_svi2_voltage_table_v0(pp_atomctrl_voltage_table *voltage_tabl
 
 
 /**
-* Create Voltage Tables.
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always 0
-*/
+ * smu7_construct_voltage_tables - Create Voltage Tables.
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
+ */
 static int smu7_construct_voltage_tables(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -418,11 +418,11 @@ static int smu7_construct_voltage_tables(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Programs static screed detection parameters
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always 0
-*/
+ * smu7_program_static_screen_threshold_parameters - Programs static screed detection parameters
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
+ */
 static int smu7_program_static_screen_threshold_parameters(
 							struct pp_hwmgr *hwmgr)
 {
@@ -441,11 +441,11 @@ static int smu7_program_static_screen_threshold_parameters(
 }
 
 /**
-* Setup display gap for glitch free memory clock switching.
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always  0
-*/
+ * smu7_enable_display_gap - Setup display gap for glitch free memory clock switching.
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always  0
+ */
 static int smu7_enable_display_gap(struct pp_hwmgr *hwmgr)
 {
 	uint32_t display_gap =
@@ -465,11 +465,11 @@ static int smu7_enable_display_gap(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Programs activity state transition voting clients
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always  0
-*/
+ * smu7_program_voting_clients - Programs activity state transition voting clients
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always  0
+ */
 static int smu7_program_voting_clients(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -560,12 +560,12 @@ static int smu7_reset_to_default(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Initial switch from ARB F0->F1
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always 0
-* This function is to be called from the SetPowerState table.
-*/
+ * smu7_initial_switch_from_arbf0_to_f1 - Initial switch from ARB F0->F1
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
+ * This function is to be called from the SetPowerState table.
+ */
 static int smu7_initial_switch_from_arbf0_to_f1(struct pp_hwmgr *hwmgr)
 {
 	return smu7_copy_and_switch_arb_sets(hwmgr,
@@ -1917,11 +1917,11 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Get Leakage VDDC based on leakage ID.
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always 0
-*/
+ * smu7_get_evv_voltages - Get Leakage VDDC based on leakage ID.
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
+ */
 static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -2017,11 +2017,11 @@ static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Change virtual leakage voltage to actual value.
+ * smu7_patch_ppt_v1_with_vdd_leakage - Change virtual leakage voltage to actual value.
  *
- * @param     hwmgr  the address of the powerplay hardware manager.
- * @param     pointer to changing voltage
- * @param     pointer to leakage table
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @voltage: pointer to changing voltage
+ * @leakage_table: pointer to leakage table
  */
 static void smu7_patch_ppt_v1_with_vdd_leakage(struct pp_hwmgr *hwmgr,
 		uint16_t *voltage, struct smu7_leakage_voltage *leakage_table)
@@ -2043,13 +2043,13 @@ static void smu7_patch_ppt_v1_with_vdd_leakage(struct pp_hwmgr *hwmgr,
 }
 
 /**
-* Patch voltage lookup table by EVV leakages.
-*
-* @param     hwmgr  the address of the powerplay hardware manager.
-* @param     pointer to voltage lookup table
-* @param     pointer to leakage table
-* @return     always 0
-*/
+ * smu7_patch_lookup_table_with_leakage - Patch voltage lookup table by EVV leakages.
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @lookup_table: pointer to voltage lookup table
+ * @leakage_table: pointer to leakage table
+ * Return:     always 0
+ */
 static int smu7_patch_lookup_table_with_leakage(struct pp_hwmgr *hwmgr,
 		phm_ppt_v1_voltage_lookup_table *lookup_table,
 		struct smu7_leakage_voltage *leakage_table)
@@ -2500,11 +2500,11 @@ static int smu7_thermal_parameter_init(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Change virtual leakage voltage to actual value.
+ * smu7_patch_ppt_v0_with_vdd_leakage - Change virtual leakage voltage to actual value.
  *
- * @param     hwmgr  the address of the powerplay hardware manager.
- * @param     pointer to changing voltage
- * @param     pointer to leakage table
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @voltage: pointer to changing voltage
+ * @leakage_table: pointer to leakage table
  */
 static void smu7_patch_ppt_v0_with_vdd_leakage(struct pp_hwmgr *hwmgr,
 		uint32_t *voltage, struct smu7_leakage_voltage *leakage_table)
@@ -4440,11 +4440,11 @@ smu7_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Programs the display gap
-*
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @return   always OK
-*/
+ * smu7_program_display_gap - Programs the display gap
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always OK
+ */
 static int smu7_program_display_gap(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
@@ -4498,12 +4498,12 @@ static int smu7_display_configuration_changed_task(struct pp_hwmgr *hwmgr)
 }
 
 /**
-*  Set maximum target operating fan output RPM
-*
-* @param    hwmgr:  the address of the powerplay hardware manager.
-* @param    usMaxFanRpm:  max operating fan RPM value.
-* @return   The response that came from the SMC.
-*/
+ * smu7_set_max_fan_rpm_output - Set maximum target operating fan output RPM
+ *
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @usMaxFanRpm:  max operating fan RPM value.
+ * Return:   The response that came from the SMC.
+ */
 static int smu7_set_max_fan_rpm_output(struct pp_hwmgr *hwmgr, uint16_t us_max_fan_rpm)
 {
 	hwmgr->thermal_controller.
@@ -4698,10 +4698,10 @@ static int smu7_read_clock_registers(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Find out if memory is GDDR5.
+ * smu7_get_memory_type - Find out if memory is GDDR5.
  *
- * @param    hwmgr  the address of the powerplay hardware manager.
- * @return   always 0
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
  */
 static int smu7_get_memory_type(struct pp_hwmgr *hwmgr)
 {
@@ -4714,10 +4714,10 @@ static int smu7_get_memory_type(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Enables Dynamic Power Management by SMC
+ * smu7_enable_acpi_power_management - Enables Dynamic Power Management by SMC
  *
- * @param    hwmgr  the address of the powerplay hardware manager.
- * @return   always 0
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
  */
 static int smu7_enable_acpi_power_management(struct pp_hwmgr *hwmgr)
 {
@@ -4728,10 +4728,10 @@ static int smu7_enable_acpi_power_management(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * Initialize PowerGating States for different engines
+ * smu7_init_power_gate_state - Initialize PowerGating States for different engines
  *
- * @param    hwmgr  the address of the powerplay hardware manager.
- * @return   always 0
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   always 0
  */
 static int smu7_init_power_gate_state(struct pp_hwmgr *hwmgr)
 {
-- 
2.25.1


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

* [PATCH 22/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Remove set but unused variable 'result'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (20 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 21/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-26 13:42 ` [PATCH 23/40] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs Lee Jones
                   ` (17 subsequent siblings)
  39 siblings, 0 replies; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c: In function ‘vega10_get_pp_table_entry’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:3135:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
index 7eada3098ffcc..ac88f5483ef70 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
@@ -3132,14 +3132,13 @@ static int vega10_get_pp_table_entry_callback_func(struct pp_hwmgr *hwmgr,
 static int vega10_get_pp_table_entry(struct pp_hwmgr *hwmgr,
 		unsigned long entry_index, struct pp_power_state *state)
 {
-	int result;
 	struct vega10_power_state *ps;
 
 	state->hardware.magic = PhwVega10_Magic;
 
 	ps = cast_phw_vega10_power_state(&state->hardware);
 
-	result = vega10_get_powerplay_table_entry(hwmgr, entry_index, state,
+	vega10_get_powerplay_table_entry(hwmgr, entry_index, state,
 			vega10_get_pp_table_entry_callback_func);
 
 	/*
-- 
2.25.1


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

* [PATCH 23/40] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (21 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 22/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Remove set but unused variable 'result' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:48   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 24/40] drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting Lee Jones
                   ` (16 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_static_mode'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: warning: Function parameter or member 'mode' not described in 'smu7_fan_ctrl_set_static_mode'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:137: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_default_mode'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_fan_speed_percent'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: warning: Function parameter or member 'speed' not described in 'smu7_fan_ctrl_set_fan_speed_percent'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:245: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_reset_fan_speed_to_default'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_fan_speed_rpm'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: warning: Function parameter or member 'speed' not described in 'smu7_fan_ctrl_set_fan_speed_rpm'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:299: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_get_temperature'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'low_temp' not described in 'smu7_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'high_temp' not described in 'smu7_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:358: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_initialize'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:377: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_enable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:395: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_disable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:414: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_stop_thermal_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:433: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_start_smc_fan_control'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../drm/amd/pm/powerplay/hwmgr/smu7_thermal.c | 103 +++++++++---------
 1 file changed, 50 insertions(+), 53 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
index e3d9d969d86ac..0d38d4206848a 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
@@ -103,11 +103,11 @@ int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
 }
 
 /**
-* Set Fan Speed Control to static mode, so that the user can decide what speed to use.
-* @param    hwmgr  the address of the powerplay hardware manager.
-*           mode    the fan control mode, 0 default, 1 by percent, 5, by RPM
-* @exception Should always succeed.
-*/
+ * smu7_fan_ctrl_set_static_mode - Set Fan Speed Control to static mode, so that the user can decide what speed to use.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @mode:   the fan control mode, 0 default, 1 by percent, 5, by RPM
+ * Exception: Should always succeed.
+ */
 int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
 {
 	if (hwmgr->fan_ctrl_is_in_default_mode) {
@@ -130,8 +130,8 @@ int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
 
 /**
 * Reset Fan Speed Control to default mode.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @exception Should always succeed.
+* @hwmgr:  the address of the powerplay hardware manager.
+* Exception: Should always succeed.
 */
 int smu7_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
 {
@@ -199,11 +199,11 @@ int smu7_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set Fan Speed in percent.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    speed is the percentage value (0% - 100%) to be set.
-* @exception Fails is the 100% setting appears to be 0.
-*/
+ * smu7_fan_ctrl_set_fan_speed_percent - Set Fan Speed in percent.
+ * @hwmgr: the address of the powerplay hardware manager.
+ * @speed: is the percentage value (0% - 100%) to be set.
+ * Exception: Fails is the 100% setting appears to be 0.
+ */
 int smu7_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
 		uint32_t speed)
 {
@@ -237,9 +237,9 @@ int smu7_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
 }
 
 /**
-* Reset Fan Speed to default.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @exception Always succeeds.
+* smu7_fan_ctrl_reset_fan_speed_to_default - Reset Fan Speed to default.
+* @hwmgr:  the address of the powerplay hardware manager.
+* Exception: Always succeeds.
 */
 int smu7_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
 {
@@ -259,11 +259,11 @@ int smu7_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set Fan Speed in RPM.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    speed is the percentage value (min - max) to be set.
-* @exception Fails is the speed not lie between min and max.
-*/
+ * smu7_fan_ctrl_set_fan_speed_rpm - Set Fan Speed in RPM.
+ * @hwmgr: the address of the powerplay hardware manager.
+ * @speed: is the percentage value (min - max) to be set.
+ * Exception: Fails is the speed not lie between min and max.
+ */
 int smu7_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
 {
 	uint32_t tach_period;
@@ -291,10 +291,10 @@ int smu7_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
 }
 
 /**
-* Reads the remote temperature from the SIslands thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * smu7_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 int smu7_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 {
 	int temp;
@@ -314,12 +314,13 @@ int smu7_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set the requested temperature range for high and low alert signals
-*
-* @param    hwmgr The address of the hardware manager.
-* @param    range Temperature range to be programmed for high and low alert signals
-* @exception PP_Result_BadInput if the input data is not valid.
-*/
+ * smu7_thermal_set_temperature_range - Set the requested temperature range for high and low alert signals
+ *
+ * @hwmgr: The address of the hardware manager.
+ * @low_temp: Temperature to be programmed for high alert signals
+ * @high_temp: Temperature to be programmed for low alert signals
+ * Exception: PP_Result_BadInput if the input data is not valid.
+ */
 static int smu7_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 		int low_temp, int high_temp)
 {
@@ -350,10 +351,10 @@ static int smu7_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 }
 
 /**
-* Programs thermal controller one-time setting registers
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * smu7_thermal_initialize - Programs thermal controller one-time setting registers
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 static int smu7_thermal_initialize(struct pp_hwmgr *hwmgr)
 {
 	if (hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution)
@@ -369,10 +370,10 @@ static int smu7_thermal_initialize(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Enable thermal alerts on the RV770 thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * smu7_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 static void smu7_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 {
 	uint32_t alert;
@@ -388,9 +389,9 @@ static void smu7_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Disable thermal alerts on the RV770 thermal controller.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * smu7_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
+ * @hwmgr: The address of the hardware manager.
+ */
 int smu7_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 {
 	uint32_t alert;
@@ -406,10 +407,10 @@ int smu7_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Uninitialize the thermal controller.
-* Currently just disables alerts.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * smu7_thermal_stop_thermal_controller - Uninitialize the thermal controller.
+ * Currently just disables alerts.
+ * @hwmgr: The address of the hardware manager.
+ */
 int smu7_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 {
 	int result = smu7_thermal_disable_alert(hwmgr);
@@ -421,14 +422,10 @@ int smu7_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Start the fan control on the SMC.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    pInput the pointer to input data
-* @param    pOutput the pointer to output data
-* @param    pStorage the pointer to temporary storage
-* @param    Result the last failure code
-* @return   result from set temperature range routine
-*/
+ * smu7_thermal_start_smc_fan_control - Start the fan control on the SMC.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   result from set temperature range routine
+ */
 static int smu7_thermal_start_smc_fan_control(struct pp_hwmgr *hwmgr)
 {
 /* If the fantable setup has failed we could have disabled
-- 
2.25.1


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

* [PATCH 24/40] drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (22 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 23/40] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:49   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 25/40] drm/amd/pm/powerplay/hwmgr/pp_psm: Remove unused variable 'result' Lee Jones
                   ` (15 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_static_mode'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: warning: Function parameter or member 'mode' not described in 'vega10_fan_ctrl_set_static_mode'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:157: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_default_mode'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:176: warning: Cannot understand  * @fn vega10_enable_fan_control_feature
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_fan_speed_percent'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: warning: Function parameter or member 'speed' not described in 'vega10_fan_ctrl_set_fan_speed_percent'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:290: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_reset_fan_speed_to_default'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_fan_speed_rpm'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: warning: Function parameter or member 'speed' not described in 'vega10_fan_ctrl_set_fan_speed_rpm'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:339: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_get_temperature'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: warning: Function parameter or member 'range' not described in 'vega10_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:414: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_initialize'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:437: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_enable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:468: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_disable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:496: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_stop_thermal_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:515: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_setup_fan_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:618: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_start_smc_fan_control'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../amd/pm/powerplay/hwmgr/vega10_thermal.c   | 131 ++++++++----------
 1 file changed, 61 insertions(+), 70 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
index 952cd3d7240e3..9b46b27bd30c4 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
@@ -118,12 +118,12 @@ int vega10_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
 }
 
 /**
-* Set Fan Speed Control to static mode,
-* so that the user can decide what speed to use.
-* @param    hwmgr  the address of the powerplay hardware manager.
-*           mode the fan control mode, 0 default, 1 by percent, 5, by RPM
-* @exception Should always succeed.
-*/
+ * vega10_fan_ctrl_set_static_mode - Set Fan Speed Control to static mode,
+ * so that the user can decide what speed to use.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @mode: the fan control mode, 0 default, 1 by percent, 5, by RPM
+ * Exception: Should always succeed.
+ */
 int vega10_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -149,10 +149,10 @@ int vega10_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
 }
 
 /**
-* Reset Fan Speed Control to default mode.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @exception Should always succeed.
-*/
+ * vega10_fan_ctrl_set_default_mode - Reset Fan Speed Control to default mode.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Exception: Should always succeed.
+ */
 int vega10_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -173,11 +173,10 @@ int vega10_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
 }
 
 /**
- * @fn vega10_enable_fan_control_feature
- * @brief Enables the SMC Fan Control Feature.
+ * vega10_enable_fan_control_feature - Enables the SMC Fan Control Feature.
  *
- * @param    hwmgr - the address of the powerplay hardware manager.
- * @return   0 on success. -1 otherwise.
+ * @hwmgr: the address of the powerplay hardware manager.
+ * Return:   0 on success. -1 otherwise.
  */
 static int vega10_enable_fan_control_feature(struct pp_hwmgr *hwmgr)
 {
@@ -242,11 +241,11 @@ int vega10_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set Fan Speed in percent.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    speed is the percentage value (0% - 100%) to be set.
-* @exception Fails is the 100% setting appears to be 0.
-*/
+ * vega10_fan_ctrl_set_fan_speed_percent - Set Fan Speed in percent.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @speed: is the percentage value (0% - 100%) to be set.
+ * Exception: Fails is the 100% setting appears to be 0.
+ */
 int vega10_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
 		uint32_t speed)
 {
@@ -282,10 +281,10 @@ int vega10_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
 }
 
 /**
-* Reset Fan Speed to default.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @exception Always succeeds.
-*/
+ * vega10_fan_ctrl_reset_fan_speed_to_default - Reset Fan Speed to default.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Exception: Always succeeds.
+ */
 int vega10_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
 {
 	if (hwmgr->thermal_controller.fanInfo.bNoFan)
@@ -298,11 +297,11 @@ int vega10_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set Fan Speed in RPM.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    speed is the percentage value (min - max) to be set.
-* @exception Fails is the speed not lie between min and max.
-*/
+ * vega10_fan_ctrl_set_fan_speed_rpm - Set Fan Speed in RPM.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * @speed: is the percentage value (min - max) to be set.
+ * Exception: Fails is the speed not lie between min and max.
+ */
 int vega10_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -331,10 +330,10 @@ int vega10_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
 }
 
 /**
-* Reads the remote temperature from the SIslands thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega10_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -353,13 +352,13 @@ int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set the requested temperature range for high and low alert signals
-*
-* @param    hwmgr The address of the hardware manager.
-* @param    range Temperature range to be programmed for
-*           high and low alert signals
-* @exception PP_Result_BadInput if the input data is not valid.
-*/
+ * vega10_thermal_set_temperature_range - Set the requested temperature range for high and low alert signals
+ *
+ * @hwmgr: The address of the hardware manager.
+ * @range: Temperature range to be programmed for
+ *           high and low alert signals
+ * Exception: PP_Result_BadInput if the input data is not valid.
+ */
 static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 		struct PP_TemperatureRange *range)
 {
@@ -406,10 +405,10 @@ static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 }
 
 /**
-* Programs thermal controller one-time setting registers
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega10_thermal_initialize - Programs thermal controller one-time setting registers
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 static int vega10_thermal_initialize(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -429,10 +428,10 @@ static int vega10_thermal_initialize(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Enable thermal alerts on the RV770 thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega10_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 static int vega10_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -461,9 +460,9 @@ static int vega10_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Disable thermal alerts on the RV770 thermal controller.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega10_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -488,10 +487,10 @@ int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Uninitialize the thermal controller.
-* Currently just disables alerts.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega10_thermal_stop_thermal_controller - Uninitialize the thermal controller.
+ * Currently just disables alerts.
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega10_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 {
 	int result = vega10_thermal_disable_alert(hwmgr);
@@ -503,14 +502,10 @@ int vega10_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set up the fan table to control the fan using the SMC.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    pInput the pointer to input data
-* @param    pOutput the pointer to output data
-* @param    pStorage the pointer to temporary storage
-* @param    Result the last failure code
-* @return   result from set temperature range routine
-*/
+ * vega10_thermal_setup_fan_table - Set up the fan table to control the fan using the SMC.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   result from set temperature range routine
+ */
 static int vega10_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 {
 	int ret;
@@ -606,14 +601,10 @@ int vega10_enable_mgpu_fan_boost(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Start the fan control on the SMC.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    pInput the pointer to input data
-* @param    pOutput the pointer to output data
-* @param    pStorage the pointer to temporary storage
-* @param    Result the last failure code
-* @return   result from set temperature range routine
-*/
+ * vega10_thermal_start_smc_fan_control - Start the fan control on the SMC.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:   result from set temperature range routine
+ */
 static int vega10_thermal_start_smc_fan_control(struct pp_hwmgr *hwmgr)
 {
 /* If the fantable setup has failed we could have disabled
-- 
2.25.1


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

* [PATCH 25/40] drm/amd/pm/powerplay/hwmgr/pp_psm: Remove unused variable 'result'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (23 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 24/40] drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-26 13:42 ` [PATCH 26/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header Lee Jones
                   ` (14 subsequent siblings)
  39 siblings, 0 replies; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/pp_psm.c: In function ‘psm_init_power_state_table’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/pp_psm.c:31:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
index 31a32a79cfc20..328e87f6c9bcd 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
@@ -28,7 +28,6 @@
 
 int psm_init_power_state_table(struct pp_hwmgr *hwmgr)
 {
-	int result;
 	unsigned int i;
 	unsigned int table_entries;
 	struct pp_power_state *state;
@@ -73,7 +72,7 @@ int psm_init_power_state_table(struct pp_hwmgr *hwmgr)
 	state = hwmgr->ps;
 
 	for (i = 0; i < table_entries; i++) {
-		result = hwmgr->hwmgr_func->get_pp_table_entry(hwmgr, i, state);
+		hwmgr->hwmgr_func->get_pp_table_entry(hwmgr, i, state);
 
 		if (state->classification.flags & PP_StateClassificationFlag_Boot) {
 			hwmgr->boot_ps = state;
-- 
2.25.1


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

* [PATCH 26/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (24 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 25/40] drm/amd/pm/powerplay/hwmgr/pp_psm: Remove unused variable 'result' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:50   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s " Lee Jones
                   ` (13 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:2862:5: warning: no previous prototype for ‘vega12_hwmgr_init’ [-Wmissing-prototypes]
 2862 | int vega12_hwmgr_init(struct pp_hwmgr *hwmgr)
 | ^~~~~~~~~~~~~~~~~

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
index 393e4e76a8961..499f2520b1aa3 100644
--- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
@@ -830,5 +830,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
 
 int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
 int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
+int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
 
 #endif /* _HWMGR_H_ */
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
index 7999091cca16e..49f8a331eb02e 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
@@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
 extern const struct pp_smumgr_func vega20_smu_funcs;
 
 extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
-extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
 extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
 extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr);
 
-- 
2.25.1


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

* [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s prototype to shared header
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (25 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 26/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:51   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 28/40] drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers Lee Jones
                   ` (12 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:4403:5: warning: no previous prototype for ‘vega20_hwmgr_init’ [-Wmissing-prototypes]
 4403 | int vega20_hwmgr_init(struct pp_hwmgr *hwmgr)
 | ^~~~~~~~~~~~~~~~~

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
index 499f2520b1aa3..490371bd25201 100644
--- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
@@ -831,5 +831,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
 int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
 int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
 int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
+int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
 
 #endif /* _HWMGR_H_ */
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
index 49f8a331eb02e..6a7de8b898faf 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
@@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
 extern const struct pp_smumgr_func vega20_smu_funcs;
 
 extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
-extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
 extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr);
 
 static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr);
-- 
2.25.1


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

* [PATCH 28/40] drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (26 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s " Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:52   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 29/40] drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation Lee Jones
                   ` (11 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'hwmgr' not described in 'phm_wait_on_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'index' not described in 'phm_wait_on_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'value' not described in 'phm_wait_on_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'mask' not described in 'phm_wait_on_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'hwmgr' not described in 'phm_wait_on_indirect_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'indirect_port' not described in 'phm_wait_on_indirect_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'index' not described in 'phm_wait_on_indirect_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'value' not described in 'phm_wait_on_indirect_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'mask' not described in 'phm_wait_on_indirect_register'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:494: warning: Function parameter or member 'hwmgr' not described in 'phm_initializa_dynamic_state_adjustment_rule_settings'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
index 2a0ca5194bbe9..bfe80ac0ad8c8 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
@@ -103,7 +103,7 @@ uint32_t phm_set_field_to_u32(u32 offset, u32 original_data, u32 field, u32 size
 	return original_data;
 }
 
-/**
+/*
  * Returns once the part of the register indicated by the mask has
  * reached the given value.
  */
@@ -132,7 +132,7 @@ int phm_wait_on_register(struct pp_hwmgr *hwmgr, uint32_t index,
 }
 
 
-/**
+/*
  * Returns once the part of the register indicated by the mask has
  * reached the given value.The indirect space is described by giving
  * the memory-mapped index of the indirect index register.
@@ -486,9 +486,9 @@ int phm_get_sclk_for_voltage_evv(struct pp_hwmgr *hwmgr,
 }
 
 /**
- * Initialize Dynamic State Adjustment Rule Settings
+ * phm_initializa_dynamic_state_adjustment_rule_settings - Initialize Dynamic State Adjustment Rule Settings
  *
- * @param    hwmgr  the address of the powerplay hardware manager.
+ * @hwmgr:  the address of the powerplay hardware manager.
  */
 int phm_initializa_dynamic_state_adjustment_rule_settings(struct pp_hwmgr *hwmgr)
 {
-- 
2.25.1


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

* [PATCH 29/40] drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (27 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 28/40] drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:53   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 30/40] drm/amd/pm/powerplay/hwmgr/vega12_thermal: " Lee Jones
                   ` (10 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:217: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_get_temperature'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'range' not described in 'vega20_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:278: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_enable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:296: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_disable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:310: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_stop_thermal_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:326: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_setup_fan_table'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../amd/pm/powerplay/hwmgr/vega20_thermal.c   | 54 +++++++++----------
 1 file changed, 24 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
index 364162ddaa9c6..269dd7e95a445 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
@@ -209,10 +209,10 @@ int vega20_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
 }
 
 /**
-* Reads the remote temperature from the SIslands thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega20_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega20_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -230,13 +230,12 @@ int vega20_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set the requested temperature range for high and low alert signals
-*
-* @param    hwmgr The address of the hardware manager.
-* @param    range Temperature range to be programmed for
-*           high and low alert signals
-* @exception PP_Result_BadInput if the input data is not valid.
-*/
+ * vega20_thermal_set_temperature_range - Set the requested temperature range for high and low alert signals
+ *
+ * @hwmgr: The address of the hardware manager.
+ * @range: Temperature range to be programmed for high and low alert signals
+ * Exception: PP_Result_BadInput if the input data is not valid.
+ */
 static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 		struct PP_TemperatureRange *range)
 {
@@ -270,10 +269,10 @@ static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 }
 
 /**
-* Enable thermal alerts on the RV770 thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega20_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 static int vega20_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -289,9 +288,9 @@ static int vega20_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Disable thermal alerts on the RV770 thermal controller.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega20_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega20_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -302,10 +301,10 @@ int vega20_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Uninitialize the thermal controller.
-* Currently just disables alerts.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega20_thermal_stop_thermal_controller - Uninitialize the thermal controller.
+ * Currently just disables alerts.
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega20_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 {
 	int result = vega20_thermal_disable_alert(hwmgr);
@@ -314,14 +313,9 @@ int vega20_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set up the fan table to control the fan using the SMC.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    pInput the pointer to input data
-* @param    pOutput the pointer to output data
-* @param    pStorage the pointer to temporary storage
-* @param    Result the last failure code
-* @return   result from set temperature range routine
-*/
+ * vega20_thermal_setup_fan_table - Set up the fan table to control the fan using the SMC.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ */
 static int vega20_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 {
 	int ret;
-- 
2.25.1


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

* [PATCH 30/40] drm/amd/pm/powerplay/hwmgr/vega12_thermal: Fix some outdated function documentation
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (28 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 29/40] drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:54   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 31/40] drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret' Lee Jones
                   ` (9 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:63: warning: Cannot understand  * @fn vega12_enable_fan_control_feature
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:137: warning: Function parameter or member 'hwmgr' not described in 'vega12_fan_ctrl_reset_fan_speed_to_default'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:147: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_get_temperature'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: warning: Function parameter or member 'range' not described in 'vega12_thermal_set_temperature_range'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:208: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_enable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:226: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_disable_alert'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:240: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_stop_thermal_controller'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:256: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_setup_fan_table'
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:279: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_start_smc_fan_control'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../amd/pm/powerplay/hwmgr/vega12_thermal.c   | 82 ++++++++-----------
 1 file changed, 36 insertions(+), 46 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
index 7ace439dcde7a..0dc16f25a463b 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
@@ -60,11 +60,10 @@ int vega12_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
 }
 
 /**
- * @fn vega12_enable_fan_control_feature
- * @brief Enables the SMC Fan Control Feature.
+ * vega12_enable_fan_control_feature -Enables the SMC Fan Control Feature.
  *
- * @param    hwmgr - the address of the powerplay hardware manager.
- * @return   0 on success. -1 otherwise.
+ * @hwmgr: the address of the powerplay hardware manager.
+ * Return:   0 on success. -1 otherwise.
  */
 static int vega12_enable_fan_control_feature(struct pp_hwmgr *hwmgr)
 {
@@ -129,20 +128,20 @@ int vega12_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Reset Fan Speed to default.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @exception Always succeeds.
-*/
+ * vega12_fan_ctrl_reset_fan_speed_to_default - Reset Fan Speed to default.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Exception Always succeeds.
+ */
 int vega12_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
 {
 	return vega12_fan_ctrl_start_smc_fan_control(hwmgr);
 }
 
 /**
-* Reads the remote temperature from the SIslands thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega12_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega12_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -160,13 +159,13 @@ int vega12_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set the requested temperature range for high and low alert signals
-*
-* @param    hwmgr The address of the hardware manager.
-* @param    range Temperature range to be programmed for
-*           high and low alert signals
-* @exception PP_Result_BadInput if the input data is not valid.
-*/
+ * Set the requested temperature range for high and low alert signals
+ *
+ * @hwmgr: The address of the hardware manager.
+ * @range: Temperature range to be programmed for
+ *           high and low alert signals
+ * Exception: PP_Result_BadInput if the input data is not valid.
+ */
 static int vega12_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 		struct PP_TemperatureRange *range)
 {
@@ -200,10 +199,10 @@ static int vega12_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
 }
 
 /**
-* Enable thermal alerts on the RV770 thermal controller.
-*
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega12_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
+ *
+ * @hwmgr: The address of the hardware manager.
+ */
 static int vega12_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -219,9 +218,9 @@ static int vega12_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Disable thermal alerts on the RV770 thermal controller.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega12_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega12_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct amdgpu_device *adev = hwmgr->adev;
@@ -232,10 +231,10 @@ int vega12_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Uninitialize the thermal controller.
-* Currently just disables alerts.
-* @param    hwmgr The address of the hardware manager.
-*/
+ * vega12_thermal_stop_thermal_controller - Uninitialize the thermal controller.
+ * Currently just disables alerts.
+ * @hwmgr: The address of the hardware manager.
+ */
 int vega12_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 {
 	int result = vega12_thermal_disable_alert(hwmgr);
@@ -244,14 +243,9 @@ int vega12_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Set up the fan table to control the fan using the SMC.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    pInput the pointer to input data
-* @param    pOutput the pointer to output data
-* @param    pStorage the pointer to temporary storage
-* @param    Result the last failure code
-* @return   result from set temperature range routine
-*/
+ * vega12_thermal_setup_fan_table - Set up the fan table to control the fan using the SMC.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ */
 static int vega12_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 {
 	int ret;
@@ -267,14 +261,10 @@ static int vega12_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 }
 
 /**
-* Start the fan control on the SMC.
-* @param    hwmgr  the address of the powerplay hardware manager.
-* @param    pInput the pointer to input data
-* @param    pOutput the pointer to output data
-* @param    pStorage the pointer to temporary storage
-* @param    Result the last failure code
-* @return   result from set temperature range routine
-*/
+ * vega12_thermal_start_smc_fan_control - Start the fan control on the SMC.
+ * @hwmgr:  the address of the powerplay hardware manager.
+ * Return:  result from set temperature range routine
+ */
 static int vega12_thermal_start_smc_fan_control(struct pp_hwmgr *hwmgr)
 {
 	/* If the fantable setup has failed we could have disabled
-- 
2.25.1


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

* [PATCH 31/40] drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (29 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 30/40] drm/amd/pm/powerplay/hwmgr/vega12_thermal: " Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01 14:00   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused Lee Jones
                   ` (8 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Evan Quan, Alex Deucher, Christian König,
	David Airlie, Daniel Vetter, amd-gfx, dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c: In function ‘kv_dpm_powergate_uvd’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c:1678:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c: In function ‘kv_dpm_powergate_vce’:
 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c:1706:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c b/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c
index 4b3faaccecb94..66daabebee358 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c
@@ -1675,14 +1675,13 @@ static void kv_dpm_powergate_uvd(void *handle, bool gate)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	struct kv_power_info *pi = kv_get_pi(adev);
-	int ret;
 
 	pi->uvd_power_gated = gate;
 
 	if (gate) {
 		/* stop the UVD block */
-		ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
-							     AMD_PG_STATE_GATE);
+		amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
+						       AMD_PG_STATE_GATE);
 		kv_update_uvd_dpm(adev, gate);
 		if (pi->caps_uvd_pg)
 			/* power off the UVD block */
@@ -1694,8 +1693,8 @@ static void kv_dpm_powergate_uvd(void *handle, bool gate)
 			/* re-init the UVD block */
 		kv_update_uvd_dpm(adev, gate);
 
-		ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
-							     AMD_PG_STATE_UNGATE);
+		amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
+						       AMD_PG_STATE_UNGATE);
 	}
 }
 
@@ -1703,14 +1702,13 @@ static void kv_dpm_powergate_vce(void *handle, bool gate)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	struct kv_power_info *pi = kv_get_pi(adev);
-	int ret;
 
 	pi->vce_power_gated = gate;
 
 	if (gate) {
 		/* stop the VCE block */
-		ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
-							     AMD_PG_STATE_GATE);
+		amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+						       AMD_PG_STATE_GATE);
 		kv_enable_vce_dpm(adev, false);
 		if (pi->caps_vce_pg) /* power off the VCE block */
 			amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerOFF);
@@ -1719,8 +1717,8 @@ static void kv_dpm_powergate_vce(void *handle, bool gate)
 			amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
 		kv_enable_vce_dpm(adev, true);
 		/* re-init the VCE block */
-		ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
-							     AMD_PG_STATE_UNGATE);
+		amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+						       AMD_PG_STATE_UNGATE);
 	}
 }
 
-- 
2.25.1


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

* [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (30 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 31/40] drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-11-30 23:57   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 33/40] drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' " Lee Jones
                   ` (7 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

'link_bandwidth_kbps' is always obtained, but only used if
CONFIG_DRM_AMD_DC_DCN is defined.

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘create_stream_for_sink’:
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5080:11: warning: variable ‘link_bandwidth_kbps’ set but not used [-Wunused-but-set-variable]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 08539f4315864..ac7643d73bc68 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5077,7 +5077,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	struct dsc_dec_dpcd_caps dsc_caps;
 #endif
-	uint32_t link_bandwidth_kbps;
+	uint32_t __maybe_unused link_bandwidth_kbps;
 
 	struct dc_sink *sink = NULL;
 	if (aconnector == NULL) {
-- 
2.25.1


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

* [PATCH 33/40] drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' as __maybe_unused
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (31 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01  0:00   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation Lee Jones
                   ` (6 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

'dpp_input_csc_matrix' is used by some, but not all source files which
include dpp.h.

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dpp.h:50:42: warning: ‘dpp_input_csc_matrix’ defined but not used [-Wunused-const-variable=]

NB: Snipped lots of these for brevity

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
index 6751186f6f904..ddbe4bb52724a 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
@@ -47,7 +47,7 @@ struct dpp_input_csc_matrix {
 	uint16_t regval[12];
 };
 
-static const struct dpp_input_csc_matrix dpp_input_csc_matrix[] = {
+static const struct dpp_input_csc_matrix __maybe_unused dpp_input_csc_matrix[] = {
 	{COLOR_SPACE_SRGB,
 		{0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} },
 	{COLOR_SPACE_SRGB_LIMITED,
-- 
2.25.1


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

* [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (32 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 33/40] drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' " Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01 18:42   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 35/40] drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header Lee Jones
                   ` (5 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c: In function ‘dm_dtn_log_append_v’:
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:345:2: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:375:3: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index b7d7ec3ba00d7..24a81642baa26 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -318,6 +318,7 @@ void dm_dtn_log_begin(struct dc_context *ctx,
 	dm_dtn_log_append_v(ctx, log_ctx, "%s", msg);
 }
 
+__printf(3, 4)
 void dm_dtn_log_append_v(struct dc_context *ctx,
 	struct dc_log_buffer_ctx *log_ctx,
 	const char *msg, ...)
-- 
2.25.1


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

* [PATCH 35/40] drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (33 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01  0:02   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 36/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static Lee Jones
                   ` (4 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'lut' not described in '__drm_lut_to_dc_gamma'
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'gamma' not described in '__drm_lut_to_dc_gamma'
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'is_legacy' not described in '__drm_lut_to_dc_gamma'
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:426: warning: Function parameter or member 'dc_plane_state' not described in 'amdgpu_dm_update_plane_color_mgmt'

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
index 5df05f0d18bc9..157fe4efbb599 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
@@ -119,7 +119,7 @@ static bool __is_lut_linear(const struct drm_color_lut *lut, uint32_t size)
 	return true;
 }
 
-/**
+/*
  * Convert the drm_color_lut to dc_gamma. The conversion depends on the size
  * of the lut - whether or not it's legacy.
  */
@@ -413,7 +413,7 @@ int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state *crtc)
 /**
  * amdgpu_dm_update_plane_color_mgmt: Maps DRM color management to DC plane.
  * @crtc: amdgpu_dm crtc state
- * @ dc_plane_state: target DC surface
+ * @dc_plane_state: target DC surface
  *
  * Update the underlying dc_stream_state's input transfer function (ITF) in
  * preparation for hardware commit. The transfer function used depends on
-- 
2.25.1


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

* [PATCH 36/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (34 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 35/40] drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01  0:04   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 37/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()' Lee Jones
                   ` (3 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:538:6: warning: no previous prototype for ‘pp_rv_set_wm_ranges’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:590:6: warning: no previous prototype for ‘pp_rv_set_pme_wa_enable’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:601:6: warning: no previous prototype for ‘pp_rv_set_active_display_count’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:614:6: warning: no previous prototype for ‘pp_rv_set_min_deep_sleep_dcfclk’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:627:6: warning: no previous prototype for ‘pp_rv_set_hard_min_dcefclk_by_freq’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:640:6: warning: no previous prototype for ‘pp_rv_set_hard_min_fclk_by_freq’ [-Wmissing-prototypes]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
index 84065c12d4b85..ac0a0539854ef 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
@@ -535,7 +535,7 @@ bool dm_pp_get_static_clocks(
 	return true;
 }
 
-void pp_rv_set_wm_ranges(struct pp_smu *pp,
+static void pp_rv_set_wm_ranges(struct pp_smu *pp,
 		struct pp_smu_wm_range_sets *ranges)
 {
 	const struct dc_context *ctx = pp->dm;
@@ -587,7 +587,7 @@ void pp_rv_set_wm_ranges(struct pp_smu *pp,
 							   &wm_with_clock_ranges);
 }
 
-void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
+static void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
@@ -598,7 +598,7 @@ void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
 		pp_funcs->notify_smu_enable_pwe(pp_handle);
 }
 
-void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
+static void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
@@ -611,7 +611,7 @@ void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
 	pp_funcs->set_active_display_count(pp_handle, count);
 }
 
-void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
+static void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
@@ -624,7 +624,7 @@ void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
 	pp_funcs->set_min_deep_sleep_dcefclk(pp_handle, clock);
 }
 
-void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
+static void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
@@ -637,7 +637,7 @@ void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
 	pp_funcs->set_hard_min_dcefclk_by_freq(pp_handle, clock);
 }
 
-void pp_rv_set_hard_min_fclk_by_freq(struct pp_smu *pp, int mhz)
+static void pp_rv_set_hard_min_fclk_by_freq(struct pp_smu *pp, int mhz)
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
@@ -661,7 +661,7 @@ static enum pp_smu_status pp_nv_set_wm_ranges(struct pp_smu *pp,
 	return PP_SMU_RESULT_OK;
 }
 
-enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
+static enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
-- 
2.25.1


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

* [PATCH 37/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (35 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 36/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01  0:05   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 38/40] drm/amd/display/dc/basics/conversion: Include header containing our prototypes Lee Jones
                   ` (2 subsequent siblings)
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:664:20: warning: no previous prototype for ‘pp_nv_set_pme_wa_enable’ [-Wmissing-prototypes]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
index ac0a0539854ef..607ec09994456 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
@@ -661,22 +661,6 @@ static enum pp_smu_status pp_nv_set_wm_ranges(struct pp_smu *pp,
 	return PP_SMU_RESULT_OK;
 }
 
-static enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
-{
-	const struct dc_context *ctx = pp->dm;
-	struct amdgpu_device *adev = ctx->driver_context;
-	struct smu_context *smu = &adev->smu;
-
-	if (!smu->ppt_funcs)
-		return PP_SMU_RESULT_UNSUPPORTED;
-
-	/* 0: successful or smu.ppt_funcs->set_azalia_d3_pme = NULL;  1: fail */
-	if (smu_set_azalia_d3_pme(smu))
-		return PP_SMU_RESULT_FAIL;
-
-	return PP_SMU_RESULT_OK;
-}
-
 static enum pp_smu_status pp_nv_set_display_count(struct pp_smu *pp, int count)
 {
 	const struct dc_context *ctx = pp->dm;
-- 
2.25.1


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

* [PATCH 38/40] drm/amd/display/dc/basics/conversion: Include header containing our prototypes
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (36 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 37/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01  0:05   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 39/40] drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi' Lee Jones
  2020-11-26 13:42 ` [PATCH 40/40] drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static Lee Jones
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:34:10: warning: no previous prototype for ‘fixed_point_to_int_frac’ [-Wmissing-prototypes]
 drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:81:6: warning: no previous prototype for ‘convert_float_matrix’ [-Wmissing-prototypes]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/dc/basics/conversion.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
index 50b47f11875c9..24ed03d8cda74 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
@@ -24,6 +24,7 @@
  */
 
 #include "dm_services.h"
+#include "conversion.h"
 
 #define DIVIDER 10000
 
-- 
2.25.1


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

* [PATCH 39/40] drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi'
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (37 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 38/40] drm/amd/display/dc/basics/conversion: Include header containing our prototypes Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01  0:06   ` Alex Deucher
  2020-11-26 13:42 ` [PATCH 40/40] drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static Lee Jones
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/basics/fixpt31_32.c:29:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
index 59f37563704ad..1726bdf89bae8 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
@@ -26,7 +26,6 @@
 #include "dm_services.h"
 #include "include/fixed31_32.h"
 
-static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
 static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
 static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
 static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
-- 
2.25.1


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

* [PATCH 40/40] drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static
  2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
                   ` (38 preceding siblings ...)
  2020-11-26 13:42 ` [PATCH 39/40] drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi' Lee Jones
@ 2020-11-26 13:42 ` Lee Jones
  2020-12-01  0:07   ` Alex Deucher
  39 siblings, 1 reply; 82+ messages in thread
From: Lee Jones @ 2020-11-26 13:42 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-kernel, Harry Wentland, Leo Li, Alex Deucher,
	Christian König, David Airlie, Daniel Vetter, amd-gfx,
	dri-devel

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/basics/vector.c:55:6: warning: no previous prototype for ‘dal_vector_presized_costruct’ [-Wmissing-prototypes]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/dc/basics/vector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/basics/vector.c b/drivers/gpu/drm/amd/display/dc/basics/vector.c
index 8f93d25f91ee2..706c803c4d3b0 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/vector.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/vector.c
@@ -52,7 +52,7 @@ bool dal_vector_construct(
 	return true;
 }
 
-bool dal_vector_presized_costruct(
+static bool dal_vector_presized_costruct(
 	struct vector *vector,
 	struct dc_context *ctx,
 	uint32_t count,
-- 
2.25.1


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

* Re: [PATCH 15/40] drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting misuse
  2020-11-26 13:42 ` [PATCH 15/40] drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting misuse Lee Jones
@ 2020-11-30 21:23   ` abhinavk
  0 siblings, 0 replies; 82+ messages in thread
From: abhinavk @ 2020-11-30 21:23 UTC (permalink / raw)
  To: Lee Jones
  Cc: freedreno, Shubhashree Dhar, David Airlie, linux-arm-msm,
	linux-kernel, dri-devel, Sean Paul

On 2020-11-26 05:42, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:246: error: Cannot
> parse struct or union!
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c:756: error: Cannot
> parse struct or union!
> 
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Shubhashree Dhar <dhar@codeaurora.org>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: freedreno@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> index 38482b1047745..5c521de715670 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
> @@ -189,7 +189,7 @@ struct dpu_irq_type {
>  	u32 reg_idx;
>  };
> 
> -/**
> +/*
>   * struct dpu_intr_reg -  List of DPU interrupt registers
>   */
>  static const struct dpu_intr_reg dpu_intr_set[] = {
> @@ -245,7 +245,7 @@ static const struct dpu_intr_reg dpu_intr_set[] = {
>  	}
>  };
> 
> -/**
> +/*
>   * struct dpu_irq_type - IRQ mapping table use for lookup an irq_idx 
> in this
>   *			 table that have a matching interface type and
>   *			 instance index.

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

* Re: [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res'
  2020-11-26 13:42 ` [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res' Lee Jones
@ 2020-11-30 23:09   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:09 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:42 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c: In function ‘tonga_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/tonga_smumgr.c:2469:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
> index 4bfadb49521bc..c28f3e1299701 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c
> @@ -2466,7 +2466,6 @@ static int tonga_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>         uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
>         uint16_t fdo_min, slope1, slope2;
>         uint32_t reference_clock;
> -       int res;
>         uint64_t tmp64;
>
>         if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
> @@ -2539,11 +2538,9 @@ static int tonga_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>
>         fan_table.FanControl_GL_Flag = 1;
>
> -       res = smu7_copy_bytes_to_smc(hwmgr,
> -                                       smu_data->smu7_data.fan_table_start,
> -                                       (uint8_t *)&fan_table,
> -                                       (uint32_t)sizeof(fan_table),
> -                                       SMC_RAM_END);
> +       smu7_copy_bytes_to_smc(hwmgr, smu_data->smu7_data.fan_table_start,
> +                              (uint8_t *)&fan_table,
> +                              (uint32_t)sizeof(fan_table), SMC_RAM_END);
>

We should probably return the error here rather than dropping it.
I'll send out a patch.

Thanks,

Alex


>         return 0;
>  }
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 02/40] drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static
  2020-11-26 13:42 ` [PATCH 02/40] drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static Lee Jones
@ 2020-11-30 23:10   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:10 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:42 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:2145:5: warning: no previous prototype for ‘polaris10_thermal_avfs_enable’ [-Wmissing-prototypes]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> index 052bc88cf33c9..45214a364baa9 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
> @@ -2142,7 +2142,7 @@ static int polaris10_program_mem_timing_parameters(struct pp_hwmgr *hwmgr)
>         return 0;
>  }
>
> -int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
> +static int polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
>  {
>         struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 03/40] drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable 'res'
  2020-11-26 13:42 ` [PATCH 03/40] drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable 'res' Lee Jones
@ 2020-11-30 23:14   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:14 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:42 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/ci_smumgr.c: In function ‘ci_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/ci_smumgr.c:2132:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> index 329bf4d44bbce..c1d869b4c7a42 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c
> @@ -2129,7 +2129,6 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>         uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
>         uint16_t fdo_min, slope1, slope2;
>         uint32_t reference_clock;
> -       int res;
>         uint64_t tmp64;
>
>         if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_MicrocodeFanControl))
> @@ -2191,7 +2190,7 @@ static int ci_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>
>         fan_table.TempSrc = (uint8_t)PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, CG_MULT_THERMAL_CTRL, TEMP_SEL);
>
> -       res = ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
> +       ci_copy_bytes_to_smc(hwmgr, ci_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
>

Should probably just return the error here.  I'll fix it up.  Thanks!

Alex

>         return 0;
>  }
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 04/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static
  2020-11-26 13:42 ` [PATCH 04/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static Lee Jones
@ 2020-11-30 23:16   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:16 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Huang Rui,
	Maling list - DRI developers, Alex Deucher, Evan Quan,
	Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2085:5: warning: no previous prototype for ‘iceland_thermal_setup_fan_table’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c: In function ‘iceland_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2093:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Huang Rui <ray.huang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> index 431ad2fd38df1..6a0f581de999b 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> @@ -2082,7 +2082,7 @@ static int iceland_init_smc_table(struct pp_hwmgr *hwmgr)
>         return 0;
>  }
>
> -int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
> +static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>  {
>         struct smu7_smumgr *smu7_data = (struct smu7_smumgr *)(hwmgr->smu_backend);
>         SMU71_Discrete_FanTable fan_table = { FDO_MODE_HARDWARE };
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 05/40] drm/amd/pm/powerplay/smumgr/vegam_smumgr: Make function called by reference static
  2020-11-26 13:42 ` [PATCH 05/40] drm/amd/pm/powerplay/smumgr/vegam_smumgr: " Lee Jones
@ 2020-11-30 23:16   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:16 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/vegam_smumgr.c:2249:5: warning: no previous prototype for ‘vegam_thermal_avfs_enable’ [-Wmissing-prototypes]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
> index 38a5cdcf58967..7d024d3facef0 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
> @@ -2246,7 +2246,7 @@ static int vegam_update_sclk_threshold(struct pp_hwmgr *hwmgr)
>         return result;
>  }
>
> -int vegam_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
> +static int vegam_thermal_avfs_enable(struct pp_hwmgr *hwmgr)
>  {
>         struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
>         int ret;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 06/40] drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes
  2020-11-26 13:42 ` [PATCH 06/40] drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes Lee Jones
@ 2020-11-30 23:17   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:17 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:38:6: warning: no previous prototype for ‘smu9_is_smc_ram_running’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:112:5: warning: no previous prototype for ‘smu9_send_msg_to_smc’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:140:5: warning: no previous prototype for ‘smu9_send_msg_to_smc_with_parameter’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu9_smumgr.c:165:10: warning: no previous prototype for ‘smu9_get_argument’ [-Wmissing-prototypes]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
> index 8a9aee85043ec..23e5de3c4ec16 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/smu9_smumgr.c
> @@ -22,6 +22,7 @@
>   */
>
>  #include "smumgr.h"
> +#include "smu9_smumgr.h"
>  #include "vega10_inc.h"
>  #include "soc15_common.h"
>  #include "pp_debug.h"
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 07/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse
  2020-11-26 13:42 ` [PATCH 07/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse Lee Jones
@ 2020-11-30 23:18   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:18 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/fiji_smumgr.c:1107: warning: Function parameter or member 'mem_clock' not described in 'fiji_get_mclk_frequency_ratio'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> index fea008cc1f254..02c094a06605d 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c
> @@ -1090,7 +1090,7 @@ static int fiji_populate_all_graphic_levels(struct pp_hwmgr *hwmgr)
>  }
>
>
> -/**
> +/*
>   * MCLK Frequency Ratio
>   * SEQ_CG_RESP  Bit[31:24] - 0x0
>   * Bit[27:24] \96 DDR3 Frequency ratio
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions
  2020-11-26 13:42 ` [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions Lee Jones
@ 2020-11-30 23:20   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:20 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:518:5: warning: no previous prototype for ‘phm_set_min_deep_sleep_dcefclk’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:528:5: warning: no previous prototype for ‘phm_set_hard_min_dcefclk_by_freq’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:538:5: warning: no previous prototype for ‘phm_set_hard_min_fclk_by_freq’ [-Wmissing-prototypes]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/hardwaremanager.c  | 31 -------------------
>  1 file changed, 31 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> index 1f9b9facdf1f4..45dde3e74b578 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> @@ -514,34 +514,3 @@ int phm_set_active_display_count(struct pp_hwmgr *hwmgr, uint32_t count)
>
>         return hwmgr->hwmgr_func->set_active_display_count(hwmgr, count);
>  }
> -
> -int phm_set_min_deep_sleep_dcefclk(struct pp_hwmgr *hwmgr, uint32_t clock)
> -{
> -       PHM_FUNC_CHECK(hwmgr);
> -
> -       if (!hwmgr->hwmgr_func->set_min_deep_sleep_dcefclk)
> -               return -EINVAL;
> -
> -       return hwmgr->hwmgr_func->set_min_deep_sleep_dcefclk(hwmgr, clock);
> -}
> -
> -int phm_set_hard_min_dcefclk_by_freq(struct pp_hwmgr *hwmgr, uint32_t clock)
> -{
> -       PHM_FUNC_CHECK(hwmgr);
> -
> -       if (!hwmgr->hwmgr_func->set_hard_min_dcefclk_by_freq)
> -               return -EINVAL;
> -
> -       return hwmgr->hwmgr_func->set_hard_min_dcefclk_by_freq(hwmgr, clock);
> -}
> -
> -int phm_set_hard_min_fclk_by_freq(struct pp_hwmgr *hwmgr, uint32_t clock)
> -{
> -       PHM_FUNC_CHECK(hwmgr);
> -
> -       if (!hwmgr->hwmgr_func->set_hard_min_fclk_by_freq)
> -               return -EINVAL;
> -
> -       return hwmgr->hwmgr_func->set_hard_min_fclk_by_freq(hwmgr, clock);
> -}
> -
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header
  2020-11-26 13:42 ` [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header Lee Jones
@ 2020-11-30 23:28   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:28 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 1bb379498a121..0e22cba3ce3a6 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -828,5 +828,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>
>  #define PHM_ENTIRE_REGISTER_MASK 0xFFFFFFFFU
>
> +int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index 739e215ec8b7f..ec17a3e63ea02 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
>  extern int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
> -extern int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 10/40] drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused
  2020-11-26 13:42 ` [PATCH 10/40] drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused Lee Jones
@ 2020-11-30 23:29   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:29 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> They are used by some source files which include pp_thermal.h, but not all.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:28:41: warning: ‘SMU7ThermalWithDelayPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
>  drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_thermal.h:34:41: warning: ‘SMU7ThermalPolicy’ defined but not used [-Wunused-const-variable=]
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/inc/pp_thermal.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/pp_thermal.h b/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
> index 3e30768f9e1cc..f7c41185097e4 100644
> --- a/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
> +++ b/drivers/gpu/drm/amd/pm/inc/pp_thermal.h
> @@ -25,13 +25,13 @@
>
>  #include "power_state.h"
>
> -static const struct PP_TemperatureRange SMU7ThermalWithDelayPolicy[] =
> +static const struct PP_TemperatureRange __maybe_unused SMU7ThermalWithDelayPolicy[] =
>  {
>         {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
>         { 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000},
>  };
>
> -static const struct PP_TemperatureRange SMU7ThermalPolicy[] =
> +static const struct PP_TemperatureRange __maybe_unused SMU7ThermalPolicy[] =
>  {
>         {-273150,  99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000},
>         { 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000},
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use
  2020-11-26 13:42 ` [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use Lee Jones
@ 2020-11-30 23:31   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:31 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h: In function ‘fMultiply’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:22: warning: variable ‘Y_LessThanOne’ set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:7: warning: variable ‘X_LessThanOne’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
> index 8f50a038396ce..dac29fe6cfc6f 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h
> @@ -333,14 +333,14 @@ static fInt fMultiply (fInt X, fInt Y) /* Uses 64-bit integers (int64_t) */
>  {
>         fInt Product;
>         int64_t tempProduct;
> +
> +       /*The following is for a very specific common case: Non-zero number with ONLY fractional portion*/
> +       /* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION
>         bool X_LessThanOne, Y_LessThanOne;
>
>         X_LessThanOne = (X.partial.real == 0 && X.partial.decimal != 0 && X.full >= 0);
>         Y_LessThanOne = (Y.partial.real == 0 && Y.partial.decimal != 0 && Y.full >= 0);
>
> -       /*The following is for a very specific common case: Non-zero number with ONLY fractional portion*/
> -       /* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION
> -
>         if (X_LessThanOne && Y_LessThanOne) {
>                 Product.full = X.full * Y.full;
>                 return Product
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx'
  2020-11-26 13:42 ` [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx' Lee Jones
@ 2020-11-30 23:33   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:33 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:31:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c: In function ‘atomctrl_calculate_voltage_evv_on_sclk’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:702:22: warning: variable ‘fPowerDPMx’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> index c2fee6796bd93..2cb913ab77f26 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> @@ -699,7 +699,7 @@ int atomctrl_calculate_voltage_evv_on_sclk(
>         fInt fMargin_RO_a, fMargin_RO_b, fMargin_RO_c, fMargin_fixed, fMargin_FMAX_mean, fMargin_Plat_mean, fMargin_FMAX_sigma, fMargin_Plat_sigma, fMargin_DC_sigma;
>         fInt fLkg_FT, repeat;
>         fInt fMicro_FMAX, fMicro_CR, fSigma_FMAX, fSigma_CR, fSigma_DC, fDC_SCLK, fSquared_Sigma_DC, fSquared_Sigma_CR, fSquared_Sigma_FMAX;
> -       fInt fRLL_LoadLine, fPowerDPMx, fDerateTDP, fVDDC_base, fA_Term, fC_Term, fB_Term, fRO_DC_margin;
> +       fInt fRLL_LoadLine, fDerateTDP, fVDDC_base, fA_Term, fC_Term, fB_Term, fRO_DC_margin;
>         fInt fRO_fused, fCACm_fused, fCACb_fused, fKv_m_fused, fKv_b_fused, fKt_Beta_fused, fFT_Lkg_V0NORM;
>         fInt fSclk_margin, fSclk, fEVV_V;
>         fInt fV_min, fV_max, fT_prod, fLKG_Factor, fT_FT, fV_FT, fV_x, fTDP_Power, fTDP_Power_right, fTDP_Power_left, fTDP_Current, fV_NL;
> @@ -731,36 +731,28 @@ int atomctrl_calculate_voltage_evv_on_sclk(
>
>         switch (dpm_level) {
>         case 1:
> -               fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm1));
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM1), 1000);
>                 break;
>         case 2:
> -               fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm2));
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM2), 1000);
>                 break;
>         case 3:
> -               fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm3));
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM3), 1000);
>                 break;
>         case 4:
> -               fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm4));
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM4), 1000);
>                 break;
>         case 5:
> -               fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm5));
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM5), 1000);
>                 break;
>         case 6:
> -               fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm6));
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM6), 1000);
>                 break;
>         case 7:
> -               fPowerDPMx = Convert_ULONG_ToFraction(le16_to_cpu(getASICProfilingInfo->usPowerDpm7));
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM7), 1000);
>                 break;
>         default:
>                 pr_err("DPM Level not supported\n");
> -               fPowerDPMx = Convert_ULONG_ToFraction(1);
>                 fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM0), 1000);
>         }
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 13/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header
  2020-11-26 13:42 ` [PATCH 13/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header Lee Jones
@ 2020-11-30 23:33   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:33 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5696:5: warning: no previous prototype for ‘smu7_init_function_pointers’ [-Wmissing-prototypes]
>  5696 | int smu7_init_function_pointers(struct pp_hwmgr *hwmgr)
>  | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 0e22cba3ce3a6..393e4e76a8961 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -828,6 +828,7 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>
>  #define PHM_ENTIRE_REGISTER_MASK 0xFFFFFFFFU
>
> +int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index ec17a3e63ea02..7999091cca16e 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -46,7 +46,6 @@ extern const struct pp_smumgr_func vega12_smu_funcs;
>  extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
> -extern int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 14/40] drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses
  2020-11-26 13:42 ` [PATCH 14/40] drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses Lee Jones
@ 2020-11-30 23:34   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:34 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'voltage_type' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:78: warning: Function parameter or member 'voltage_mode' not described in 'pp_atomfwctrl_is_voltage_controlled_by_gpio_v4'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'pin_id' not described in 'pp_atomfwctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:211: warning: Function parameter or member 'gpio_pin_assignment' not described in 'pp_atomfwctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:232: warning: Function parameter or member 'hwmgr' not described in 'pp_atomfwctrl_enter_self_refresh'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c | 24 +++++++++----------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
> index 615cf2c09e54e..a47a47238e2b9 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomfwctrl.c
> @@ -68,11 +68,11 @@ static struct atom_voltage_objects_info_v4_1 *pp_atomfwctrl_get_voltage_info_tab
>         return (struct atom_voltage_objects_info_v4_1 *)table_address;
>  }
>
> -/**
> -* Returns TRUE if the given voltage type is controlled by GPIO pins.
> -* voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC, SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
> -* voltage_mode is one of ATOM_SET_VOLTAGE, ATOM_SET_VOLTAGE_PHASE
> -*/
> +/*
> + * Returns TRUE if the given voltage type is controlled by GPIO pins.
> + * voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC, SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
> + * voltage_mode is one of ATOM_SET_VOLTAGE, ATOM_SET_VOLTAGE_PHASE
> + */
>  bool pp_atomfwctrl_is_voltage_controlled_by_gpio_v4(struct pp_hwmgr *hwmgr,
>                 uint8_t voltage_type, uint8_t voltage_mode)
>  {
> @@ -202,9 +202,9 @@ static bool pp_atomfwctrl_lookup_gpio_pin(
>         return false;
>  }
>
> -/**
> -* Returns TRUE if the given pin id find in lookup table.
> -*/
> +/*
> + * Returns TRUE if the given pin id find in lookup table.
> + */
>  bool pp_atomfwctrl_get_pp_assign_pin(struct pp_hwmgr *hwmgr,
>                 const uint32_t pin_id,
>                 struct pp_atomfwctrl_gpio_pin_assignment *gpio_pin_assignment)
> @@ -224,10 +224,10 @@ bool pp_atomfwctrl_get_pp_assign_pin(struct pp_hwmgr *hwmgr,
>         return ret;
>  }
>
> -/**
> -* Enter to SelfRefresh mode.
> -* @param hwmgr
> -*/
> +/*
> + * Enter to SelfRefresh mode.
> + * @param hwmgr
> + */
>  int pp_atomfwctrl_enter_self_refresh(struct pp_hwmgr *hwmgr)
>  {
>         /* 0 - no action
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 16/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable 'res'
  2020-11-26 13:42 ` [PATCH 16/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable 'res' Lee Jones
@ 2020-11-30 23:39   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:39 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Huang Rui,
	Maling list - DRI developers, Alex Deucher, Evan Quan,
	Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c: In function ‘iceland_thermal_setup_fan_table’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/iceland_smumgr.c:2093:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Huang Rui <ray.huang@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> index 6a0f581de999b..2da5225eafbb8 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c
> @@ -2090,7 +2090,6 @@ static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>         uint32_t t_diff1, t_diff2, pwm_diff1, pwm_diff2;
>         uint16_t fdo_min, slope1, slope2;
>         uint32_t reference_clock;
> -       int res;
>         uint64_t tmp64;
>
>         if (!phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_MicrocodeFanControl))
> @@ -2154,7 +2153,7 @@ static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>
>         /* fan_table.FanControl_GL_Flag = 1; */
>
> -       res = smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
> +       smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
>

Should probably just return the error.  I'll fix it up.  Thanks!

Alex

>         return 0;
>  }
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 17/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues
  2020-11-26 13:42 ` [PATCH 17/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues Lee Jones
@ 2020-11-30 23:40   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:40 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:232: warning: Function parameter or member 'hwmgr' not described in 'phm_start_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'hwmgr' not described in 'phm_get_clock_info'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'state' not described in 'phm_get_clock_info'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'pclock_info' not described in 'phm_get_clock_info'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:383: warning: Function parameter or member 'designation' not described in 'phm_get_clock_info'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/hardwaremanager.c  | 25 ++++++++++---------
>  1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> index 45dde3e74b578..25b5831a15cd2 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c
> @@ -223,11 +223,11 @@ int phm_register_irq_handlers(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Initializes the thermal controller subsystem.
> -*
> -* @param    pHwMgr  the address of the powerplay hardware manager.
> -* @exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the dispatcher.
> -*/
> + * phm_start_thermal_controller - Initializes the thermal controller subsystem.
> + *
> + * @hwmgr:   the address of the powerplay hardware manager.
> + * Exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the dispatcher.
> + */
>  int phm_start_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
>         int ret = 0;
> @@ -371,13 +371,14 @@ int phm_get_performance_level(struct pp_hwmgr *hwmgr, const struct pp_hw_power_s
>
>
>  /**
> -* Gets Clock Info.
> -*
> -* @param    pHwMgr  the address of the powerplay hardware manager.
> -* @param    pPowerState the address of the Power State structure.
> -* @param    pClockInfo the address of PP_ClockInfo structure where the result will be returned.
> -* @exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the back-end.
> -*/
> + * phm_get_clock_info
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @state: the address of the Power State structure.
> + * @pclock_info: the address of PP_ClockInfo structure where the result will be returned.
> + * @designation: PHM performance level designation
> + * Exception PP_Result_Failed if any of the paramters is NULL, otherwise the return value from the back-end.
> + */
>  int phm_get_clock_info(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *state, struct pp_clock_info *pclock_info,
>                         PHM_PerformanceLevelDesignation designation)
>  {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 18/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format
  2020-11-26 13:42 ` [PATCH 18/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format Lee Jones
@ 2020-11-30 23:41   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:41 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'hwmgr' not described in 'set_hw_cap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'setIt' not described in 'set_hw_cap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:41: warning: Function parameter or member 'cap' not described in 'set_hw_cap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: warning: Function parameter or member 'hwmgr' not described in 'set_platform_caps'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:56: warning: Function parameter or member 'powerplay_caps' not described in 'set_platform_caps'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:135: warning: Function parameter or member 'hwmgr' not described in 'get_powerplay_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: warning: Function parameter or member 'hwmgr' not described in 'get_platform_power_management_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:202: warning: Function parameter or member 'atom_ppm_table' not described in 'get_platform_power_management_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: warning: Function parameter or member 'hwmgr' not described in 'init_dpm_2_parameters'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:246: warning: Function parameter or member 'powerplay_table' not described in 'init_dpm_2_parameters'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: warning: Function parameter or member 'hwmgr' not described in 'init_clock_voltage_dependency'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:791: warning: Function parameter or member 'powerplay_table' not described in 'init_clock_voltage_dependency'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: warning: Function parameter or member 'hwmgr' not described in 'init_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:911: warning: Function parameter or member 'powerplay_table' not described in 'init_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121: warning: Function parameter or member 'hwmgr' not described in 'check_powerplay_tables'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1121: warning: Function parameter or member 'powerplay_table' not described in 'check_powerplay_tables'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'hwmgr' not described in 'make_classification_flags'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'classification' not described in 'make_classification_flags'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1263: warning: Function parameter or member 'classification2' not described in 'make_classification_flags'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'hwmgr' not described in 'get_powerplay_table_entry_v1_0'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'entry_index' not described in 'get_powerplay_table_entry_v1_0'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'power_state' not described in 'get_powerplay_table_entry_v1_0'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:1370: warning: Function parameter or member 'call_back_func' not described in 'get_powerplay_table_entry_v1_0'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../powerplay/hwmgr/process_pptables_v1_0.c   | 81 ++++++++++---------
>  1 file changed, 41 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
> index 801a565026703..741e03ad5311f 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
> @@ -32,10 +32,10 @@
>  #include "pptable_v1_0.h"
>
>  /**
> - * Private Function used during initialization.
> - * @param hwmgr Pointer to the hardware manager.
> - * @param setIt A flag indication if the capability should be set (TRUE) or reset (FALSE).
> - * @param cap Which capability to set/reset.
> + * set_hw_cap - Private Function used during initialization.
> + * @hwmgr: Pointer to the hardware manager.
> + * @setIt: A flag indication if the capability should be set (TRUE) or reset (FALSE).
> + * @cap: Which capability to set/reset.
>   */
>  static void set_hw_cap(struct pp_hwmgr *hwmgr, bool setIt, enum phm_platform_caps cap)
>  {
> @@ -47,10 +47,10 @@ static void set_hw_cap(struct pp_hwmgr *hwmgr, bool setIt, enum phm_platform_cap
>
>
>  /**
> - * Private Function used during initialization.
> - * @param hwmgr Pointer to the hardware manager.
> - * @param powerplay_caps the bit array (from BIOS) of capability bits.
> - * @exception the current implementation always returns 1.
> + * set_platform_caps - Private Function used during initialization.
> + * @hwmgr: Pointer to the hardware manager.
> + * @powerplay_caps: the bit array (from BIOS) of capability bits.
> + * Exception:  the current implementation always returns 1.
>   */
>  static int set_platform_caps(struct pp_hwmgr *hwmgr, uint32_t powerplay_caps)
>  {
> @@ -128,7 +128,7 @@ static int set_platform_caps(struct pp_hwmgr *hwmgr, uint32_t powerplay_caps)
>         return 0;
>  }
>
> -/**
> +/*
>   * Private Function to get the PowerPlay Table Address.
>   */
>  static const void *get_powerplay_table(struct pp_hwmgr *hwmgr)
> @@ -191,10 +191,10 @@ static int get_vddc_lookup_table(
>  }
>
>  /**
> - * Private Function used during initialization.
> + * get_platform_power_management_table - Private Function used during initialization.
>   * Initialize Platform Power Management Parameter table
> - * @param hwmgr Pointer to the hardware manager.
> - * @param atom_ppm_table Pointer to PPM table in VBIOS
> + * @hwmgr: Pointer to the hardware manager.
> + * @atom_ppm_table: Pointer to PPM table in VBIOS
>   */
>  static int get_platform_power_management_table(
>                 struct pp_hwmgr *hwmgr,
> @@ -234,10 +234,10 @@ static int get_platform_power_management_table(
>  }
>
>  /**
> - * Private Function used during initialization.
> + * init_dpm_2_parameters - Private Function used during initialization.
>   * Initialize TDP limits for DPM2
> - * @param hwmgr Pointer to the hardware manager.
> - * @param powerplay_table Pointer to the PowerPlay Table.
> + * @hwmgr: Pointer to the hardware manager.
> + * @powerplay_table: Pointer to the PowerPlay Table.
>   */
>  static int init_dpm_2_parameters(
>                 struct pp_hwmgr *hwmgr,
> @@ -779,10 +779,10 @@ static int get_gpio_table(struct pp_hwmgr *hwmgr,
>         return 0;
>  }
>  /**
> - * Private Function used during initialization.
> + * init_clock_voltage_dependency - Private Function used during initialization.
>   * Initialize clock voltage dependency
> - * @param hwmgr Pointer to the hardware manager.
> - * @param powerplay_table Pointer to the PowerPlay Table.
> + * @hwmgr: Pointer to the hardware manager.
> + * @powerplay_table: Pointer to the PowerPlay Table.
>   */
>  static int init_clock_voltage_dependency(
>                 struct pp_hwmgr *hwmgr,
> @@ -871,15 +871,16 @@ static int init_clock_voltage_dependency(
>         return result;
>  }
>
> -/** Retrieves the (signed) Overdrive limits from VBIOS.
> +/**
> + * init_over_drive_limits - Retrieves the (signed) Overdrive limits from VBIOS.
>   * The max engine clock, memory clock and max temperature come from the firmware info table.
>   *
>   * The information is placed into the platform descriptor.
>   *
> - * @param hwmgr source of the VBIOS table and owner of the platform descriptor to be updated.
> - * @param powerplay_table the address of the PowerPlay table.
> + * @hwmgr: source of the VBIOS table and owner of the platform descriptor to be updated.
> + * @powerplay_table: the address of the PowerPlay table.
>   *
> - * @return 1 as long as the firmware info table was present and of a supported version.
> + * Return: 1 as long as the firmware info table was present and of a supported version.
>   */
>  static int init_over_drive_limits(
>                 struct pp_hwmgr *hwmgr,
> @@ -898,11 +899,11 @@ static int init_over_drive_limits(
>  }
>
>  /**
> - * Private Function used during initialization.
> + * init_thermal_controller - Private Function used during initialization.
>   * Inspect the PowerPlay table for obvious signs of corruption.
> - * @param hwmgr Pointer to the hardware manager.
> - * @param powerplay_table Pointer to the PowerPlay Table.
> - * @exception This implementation always returns 1.
> + * @hwmgr: Pointer to the hardware manager.
> + * @powerplay_table: Pointer to the PowerPlay Table.
> + * Exception:  This implementation always returns 1.
>   */
>  static int init_thermal_controller(
>                 struct pp_hwmgr *hwmgr,
> @@ -1108,11 +1109,11 @@ static int init_thermal_controller(
>  }
>
>  /**
> - * Private Function used during initialization.
> + * check_powerplay_tables - Private Function used during initialization.
>   * Inspect the PowerPlay table for obvious signs of corruption.
> - * @param hwmgr Pointer to the hardware manager.
> - * @param powerplay_table Pointer to the PowerPlay Table.
> - * @exception 2 if the powerplay table is incorrect.
> + * @hwmgr: Pointer to the hardware manager.
> + * @powerplay_table: Pointer to the PowerPlay Table.
> + * Exception:  2 if the powerplay table is incorrect.
>   */
>  static int check_powerplay_tables(
>                 struct pp_hwmgr *hwmgr,
> @@ -1255,9 +1256,9 @@ int get_number_of_powerplay_table_entries_v1_0(struct pp_hwmgr *hwmgr)
>         return (uint32_t)(state_arrays->ucNumEntries);
>  }
>
> -/**
> -* Private function to convert flags stored in the BIOS to software flags in PowerPlay.
> -*/
> +/*
> + * Private function to convert flags stored in the BIOS to software flags in PowerPlay.
> + */
>  static uint32_t make_classification_flags(struct pp_hwmgr *hwmgr,
>                 uint16_t classification, uint16_t classification2)
>  {
> @@ -1356,13 +1357,13 @@ static int ppt_get_vce_state_table_entry_v1_0(struct pp_hwmgr *hwmgr, uint32_t i
>  }
>
>  /**
> -* Create a Power State out of an entry in the PowerPlay table.
> -* This function is called by the hardware back-end.
> -* @param hwmgr Pointer to the hardware manager.
> -* @param entry_index The index of the entry to be extracted from the table.
> -* @param power_state The address of the PowerState instance being created.
> -* @return -1 if the entry cannot be retrieved.
> -*/
> + * get_powerplay_table_entry_v1_0 - Create a Power State out of an entry in the PowerPlay table.
> + * This function is called by the hardware back-end.
> + * @hwmgr: Pointer to the hardware manager.
> + * @entry_index: The index of the entry to be extracted from the table.
> + * @power_state: The address of the PowerState instance being created.
> + * Return: -1 if the entry cannot be retrieved.
> + */
>  int get_powerplay_table_entry_v1_0(struct pp_hwmgr *hwmgr,
>                 uint32_t entry_index, struct pp_power_state *power_state,
>                 int (*call_back_func)(struct pp_hwmgr *, void *,
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 19/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues
  2020-11-26 13:42 ` [PATCH 19/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues Lee Jones
@ 2020-11-30 23:43   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:43 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: Function parameter or member 'reg_block' not described in 'atomctrl_set_mc_reg_address_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:104: warning: Function parameter or member 'table' not described in 'atomctrl_set_mc_reg_address_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_set_engine_dram_timings_rv770'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'engine_clock' not described in 'atomctrl_set_engine_dram_timings_rv770'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:213: warning: Function parameter or member 'memory_clock' not described in 'atomctrl_set_engine_dram_timings_rv770'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:239: warning: Function parameter or member 'device' not described in 'get_voltage_info_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:519: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_reference_clock'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'voltage_type' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:548: warning: Function parameter or member 'voltage_mode' not described in 'atomctrl_is_voltage_controlled_by_gpio_v3'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:640: warning: Function parameter or member 'device' not described in 'get_gpio_lookup_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'pinId' not described in 'atomctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:663: warning: Function parameter or member 'gpio_pin_assignment' not described in 'atomctrl_get_pp_assign_pin'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_voltage_evv'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'virtual_voltage_id' not described in 'atomctrl_get_voltage_evv'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1152: warning: Function parameter or member 'voltage' not described in 'atomctrl_get_voltage_evv'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1194: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_mpll_reference_clock'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1227: warning: Function parameter or member 'device' not described in 'asic_internal_ss_get_ss_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'hwmgr' not described in 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'clockSource' not described in 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'clockSpeed' not described in 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1258: warning: Function parameter or member 'ssEntry' not described in 'asic_internal_ss_get_ss_asignment'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_memory_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'memory_clock' not described in 'atomctrl_get_memory_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1321: warning: Function parameter or member 'ssInfo' not described in 'atomctrl_get_memory_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'hwmgr' not described in 'atomctrl_get_engine_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'engine_clock' not described in 'atomctrl_get_engine_clock_spread_spectrum'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:1332: warning: Function parameter or member 'ssInfo' not described in 'atomctrl_get_engine_clock_spread_spectrum'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/pm/powerplay/hwmgr/ppatomctrl.c   | 74 ++++++++++---------
>  1 file changed, 39 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> index 2cb913ab77f26..83a6504e093cb 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
> @@ -92,11 +92,11 @@ static int atomctrl_retrieve_ac_timing(
>  }
>
>  /**
> - * Get memory clock AC timing registers index from VBIOS table
> + * atomctrl_set_mc_reg_address_table - Get memory clock AC timing registers index from VBIOS table
>   * VBIOS set end of memory clock AC timing registers by ucPreRegDataLength bit6 = 1
> - * @param    reg_block the address ATOM_INIT_REG_BLOCK
> - * @param    table the address of MCRegTable
> - * @return   0
> + * @reg_block: the address ATOM_INIT_REG_BLOCK
> + * @table: the address of MCRegTable
> + * Return:   0
>   */
>  static int atomctrl_set_mc_reg_address_table(
>                 ATOM_INIT_REG_BLOCK *reg_block,
> @@ -203,7 +203,7 @@ int atomctrl_initialize_mc_reg_table_v2_2(
>         return result;
>  }
>
> -/**
> +/*
>   * Set DRAM timings based on engine clock and memory clock.
>   */
>  int atomctrl_set_engine_dram_timings_rv770(
> @@ -229,7 +229,7 @@ int atomctrl_set_engine_dram_timings_rv770(
>                         (uint32_t *)&engine_clock_parameters);
>  }
>
> -/**
> +/*
>   * Private Function to get the PowerPlay Table Address.
>   * WARNING: The tabled returned by this function is in
>   * dynamically allocated memory.
> @@ -274,12 +274,13 @@ static const ATOM_VOLTAGE_OBJECT_V3 *atomctrl_lookup_voltage_type_v3(
>         return NULL;
>  }
>
> -/** atomctrl_get_memory_pll_dividers_si().
> +/**
> + * atomctrl_get_memory_pll_dividers_si().
>   *
> - * @param hwmgr                 input parameter: pointer to HwMgr
> - * @param clock_value             input parameter: memory clock
> - * @param dividers                 output parameter: memory PLL dividers
> - * @param strobe_mode            input parameter: 1 for strobe mode,  0 for performance mode
> + * @hwmgr:           input parameter: pointer to HwMgr
> + * @clock_value:     input parameter: memory clock
> + * @dividers:        output parameter: memory PLL dividers
> + * @strobe_mode:     input parameter: 1 for strobe mode,  0 for performance mode
>   */
>  int atomctrl_get_memory_pll_dividers_si(
>                 struct pp_hwmgr *hwmgr,
> @@ -326,11 +327,12 @@ int atomctrl_get_memory_pll_dividers_si(
>         return result;
>  }
>
> -/** atomctrl_get_memory_pll_dividers_vi().
> +/**
> + * atomctrl_get_memory_pll_dividers_vi().
>   *
> - * @param hwmgr                 input parameter: pointer to HwMgr
> - * @param clock_value             input parameter: memory clock
> - * @param dividers               output parameter: memory PLL dividers
> + * @hwmgr:                 input parameter: pointer to HwMgr
> + * @clock_value:           input parameter: memory clock
> + * @dividers:              output parameter: memory PLL dividers
>   */
>  int atomctrl_get_memory_pll_dividers_vi(struct pp_hwmgr *hwmgr,
>                 uint32_t clock_value, pp_atomctrl_memory_clock_param *mpll_param)
> @@ -512,7 +514,7 @@ int atomctrl_get_dfs_pll_dividers_vi(
>         return result;
>  }
>
> -/**
> +/*
>   * Get the reference clock in 10KHz
>   */
>  uint32_t atomctrl_get_reference_clock(struct pp_hwmgr *hwmgr)
> @@ -535,7 +537,7 @@ uint32_t atomctrl_get_reference_clock(struct pp_hwmgr *hwmgr)
>         return clock;
>  }
>
> -/**
> +/*
>   * Returns true if the given voltage type is controlled by GPIO pins.
>   * voltage_type is one of SET_VOLTAGE_TYPE_ASIC_VDDC,
>   * SET_VOLTAGE_TYPE_ASIC_MVDDC, SET_VOLTAGE_TYPE_ASIC_MVDDQ.
> @@ -630,7 +632,7 @@ static bool atomctrl_lookup_gpio_pin(
>         return false;
>  }
>
> -/**
> +/*
>   * Private Function to get the PowerPlay Table Address.
>   * WARNING: The tabled returned by this function is in
>   * dynamically allocated memory.
> @@ -653,7 +655,7 @@ static ATOM_GPIO_PIN_LUT *get_gpio_lookup_table(void *device)
>         return (ATOM_GPIO_PIN_LUT *)table_address;
>  }
>
> -/**
> +/*
>   * Returns 1 if the given pin id find in lookup table.
>   */
>  bool atomctrl_get_pp_assign_pin(
> @@ -1101,14 +1103,15 @@ int atomctrl_calculate_voltage_evv_on_sclk(
>         return result;
>  }
>
> -/** atomctrl_get_voltage_evv_on_sclk gets voltage via call to ATOM COMMAND table.
> - * @param hwmgr        input: pointer to hwManager
> - * @param voltage_type            input: type of EVV voltage VDDC or VDDGFX
> - * @param sclk                        input: in 10Khz unit. DPM state SCLK frequency
> - *             which is define in PPTable SCLK/VDDC dependence
> - *                             table associated with this virtual_voltage_Id
> - * @param virtual_voltage_Id      input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
> - * @param voltage                     output: real voltage level in unit of mv
> +/**
> + * atomctrl_get_voltage_evv_on_sclk gets voltage via call to ATOM COMMAND table.
> + * @hwmgr:              input: pointer to hwManager
> + * @voltage_type:       input: type of EVV voltage VDDC or VDDGFX
> + * @sclk:               input: in 10Khz unit. DPM state SCLK frequency
> + *                      which is define in PPTable SCLK/VDDC dependence
> + *                      table associated with this virtual_voltage_Id
> + * @virtual_voltage_Id: input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
> + * @voltage:           output: real voltage level in unit of mv
>   */
>  int atomctrl_get_voltage_evv_on_sclk(
>                 struct pp_hwmgr *hwmgr,
> @@ -1142,9 +1145,9 @@ int atomctrl_get_voltage_evv_on_sclk(
>
>  /**
>   * atomctrl_get_voltage_evv gets voltage via call to ATOM COMMAND table.
> - * @param hwmgr        input: pointer to hwManager
> - * @param virtual_voltage_id      input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
> - * @param voltage                     output: real voltage level in unit of mv
> + * @hwmgr:              input: pointer to hwManager
> + * @virtual_voltage_id: input: voltage id which match per voltage DPM state: 0xff01, 0xff02.. 0xff08
> + * @voltage:          output: real voltage level in unit of mv
>   */
>  int atomctrl_get_voltage_evv(struct pp_hwmgr *hwmgr,
>                              uint16_t virtual_voltage_id,
> @@ -1187,7 +1190,7 @@ int atomctrl_get_voltage_evv(struct pp_hwmgr *hwmgr,
>         return result;
>  }
>
> -/**
> +/*
>   * Get the mpll reference clock in 10KHz
>   */
>  uint32_t atomctrl_get_mpll_reference_clock(struct pp_hwmgr *hwmgr)
> @@ -1220,7 +1223,7 @@ uint32_t atomctrl_get_mpll_reference_clock(struct pp_hwmgr *hwmgr)
>         return clock;
>  }
>
> -/**
> +/*
>   * Get the asic internal spread spectrum table
>   */
>  static ATOM_ASIC_INTERNAL_SS_INFO *asic_internal_ss_get_ss_table(void *device)
> @@ -1248,7 +1251,7 @@ bool atomctrl_is_asic_internal_ss_supported(struct pp_hwmgr *hwmgr)
>                 return false;
>  }
>
> -/**
> +/*
>   * Get the asic internal spread spectrum assignment
>   */
>  static int asic_internal_ss_get_ss_asignment(struct pp_hwmgr *hwmgr,
> @@ -1311,7 +1314,7 @@ static int asic_internal_ss_get_ss_asignment(struct pp_hwmgr *hwmgr,
>         return entry_found ? 0 : 1;
>  }
>
> -/**
> +/*
>   * Get the memory clock spread spectrum info
>   */
>  int atomctrl_get_memory_clock_spread_spectrum(
> @@ -1322,7 +1325,8 @@ int atomctrl_get_memory_clock_spread_spectrum(
>         return asic_internal_ss_get_ss_asignment(hwmgr,
>                         ASIC_INTERNAL_MEMORY_SS, memory_clock, ssInfo);
>  }
> -/**
> +
> +/*
>   * Get the engine clock spread spectrum info
>   */
>  int atomctrl_get_engine_clock_spread_spectrum(
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 20/40] drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static
  2020-11-26 13:42 ` [PATCH 20/40] drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static Lee Jones
@ 2020-11-30 23:43   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:43 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Gustavo A. R. Silva,
	Maling list - DRI developers, Alex Deucher, Evan Quan,
	Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:1148:5: warning: no previous prototype for ‘vega10_pp_tables_initialize’ [-Wmissing-prototypes]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> index 535404de78a20..95b988823f50f 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
> @@ -1145,7 +1145,7 @@ static int init_dpm_2_parameters(
>         return result;
>  }
>
> -int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
> +static int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
>  {
>         int result = 0;
>         const ATOM_Vega10_POWERPLAYTABLE *powerplay_table;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 21/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues
  2020-11-26 13:42 ` [PATCH 21/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues Lee Jones
@ 2020-11-30 23:44   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:44 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:202: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_mc_microcode_version'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:242: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_smc_voltage_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:263: warning: Function parameter or member 'hwmgr' not described in 'smu7_voltage_control'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:277: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_voltage_control'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:315: warning: Function parameter or member 'hwmgr' not described in 'smu7_construct_voltage_tables'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:428: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_static_screen_threshold_parameters'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:450: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_display_gap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:474: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_voting_clients'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:570: warning: Function parameter or member 'hwmgr' not described in 'smu7_initial_switch_from_arbf0_to_f1'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1926: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_evv_voltages'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_ppt_v1_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'voltage' not described in 'smu7_patch_ppt_v1_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2028: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_ppt_v1_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_lookup_table_with_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'lookup_table' not described in 'smu7_patch_lookup_table_with_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2056: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_lookup_table_with_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'hwmgr' not described in 'smu7_patch_ppt_v0_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'voltage' not described in 'smu7_patch_ppt_v0_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2511: warning: Function parameter or member 'leakage_table' not described in 'smu7_patch_ppt_v0_with_vdd_leakage'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4449: warning: Function parameter or member 'hwmgr' not described in 'smu7_program_display_gap'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Function parameter or member 'hwmgr' not described in 'smu7_set_max_fan_rpm_output'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4508: warning: Function parameter or member 'us_max_fan_rpm' not described in 'smu7_set_max_fan_rpm_output'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4707: warning: Function parameter or member 'hwmgr' not described in 'smu7_get_memory_type'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4723: warning: Function parameter or member 'hwmgr' not described in 'smu7_enable_acpi_power_management'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:4737: warning: Function parameter or member 'hwmgr' not described in 'smu7_init_power_gate_state'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c   | 166 +++++++++---------
>  1 file changed, 83 insertions(+), 83 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> index 53111c6bbcc91..82676c086ce46 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
> @@ -193,10 +193,10 @@ static const struct smu7_power_state *cast_const_phw_smu7_power_state(
>  }
>
>  /**
> - * Find the MC microcode version and store it in the HwMgr struct
> + * smu7_get_mc_microcode_version - Find the MC microcode version and store it in the HwMgr struct
>   *
> - * @param    hwmgr  the address of the powerplay hardware manager.
> - * @return   always 0
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
>   */
>  static int smu7_get_mc_microcode_version(struct pp_hwmgr *hwmgr)
>  {
> @@ -233,11 +233,11 @@ static int smu7_get_current_pcie_lane_number(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Enable voltage control
> -*
> -* @param    pHwMgr  the address of the powerplay hardware manager.
> -* @return   always PP_Result_OK
> -*/
> + * smu7_enable_smc_voltage_controller - Enable voltage control
> + *
> + * @hwmgr  the address of the powerplay hardware manager.
> + * Return:   always PP_Result_OK
> + */
>  static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr)
>  {
>         if (hwmgr->chip_id >= CHIP_POLARIS10 &&
> @@ -255,10 +255,10 @@ static int smu7_enable_smc_voltage_controller(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Checks if we want to support voltage control
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -*/
> + * smu7_voltage_control - Checks if we want to support voltage control
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + */
>  static bool smu7_voltage_control(const struct pp_hwmgr *hwmgr)
>  {
>         const struct smu7_hwmgr *data =
> @@ -268,11 +268,11 @@ static bool smu7_voltage_control(const struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Enable voltage control
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always 0
> -*/
> + * smu7_enable_voltage_control - Enable voltage control
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
> + */
>  static int smu7_enable_voltage_control(struct pp_hwmgr *hwmgr)
>  {
>         /* enable voltage control */
> @@ -306,11 +306,11 @@ static int phm_get_svi2_voltage_table_v0(pp_atomctrl_voltage_table *voltage_tabl
>
>
>  /**
> -* Create Voltage Tables.
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always 0
> -*/
> + * smu7_construct_voltage_tables - Create Voltage Tables.
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
> + */
>  static int smu7_construct_voltage_tables(struct pp_hwmgr *hwmgr)
>  {
>         struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> @@ -418,11 +418,11 @@ static int smu7_construct_voltage_tables(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Programs static screed detection parameters
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always 0
> -*/
> + * smu7_program_static_screen_threshold_parameters - Programs static screed detection parameters
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
> + */
>  static int smu7_program_static_screen_threshold_parameters(
>                                                         struct pp_hwmgr *hwmgr)
>  {
> @@ -441,11 +441,11 @@ static int smu7_program_static_screen_threshold_parameters(
>  }
>
>  /**
> -* Setup display gap for glitch free memory clock switching.
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always  0
> -*/
> + * smu7_enable_display_gap - Setup display gap for glitch free memory clock switching.
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always  0
> + */
>  static int smu7_enable_display_gap(struct pp_hwmgr *hwmgr)
>  {
>         uint32_t display_gap =
> @@ -465,11 +465,11 @@ static int smu7_enable_display_gap(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Programs activity state transition voting clients
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always  0
> -*/
> + * smu7_program_voting_clients - Programs activity state transition voting clients
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always  0
> + */
>  static int smu7_program_voting_clients(struct pp_hwmgr *hwmgr)
>  {
>         struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> @@ -560,12 +560,12 @@ static int smu7_reset_to_default(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Initial switch from ARB F0->F1
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always 0
> -* This function is to be called from the SetPowerState table.
> -*/
> + * smu7_initial_switch_from_arbf0_to_f1 - Initial switch from ARB F0->F1
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
> + * This function is to be called from the SetPowerState table.
> + */
>  static int smu7_initial_switch_from_arbf0_to_f1(struct pp_hwmgr *hwmgr)
>  {
>         return smu7_copy_and_switch_arb_sets(hwmgr,
> @@ -1917,11 +1917,11 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Get Leakage VDDC based on leakage ID.
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always 0
> -*/
> + * smu7_get_evv_voltages - Get Leakage VDDC based on leakage ID.
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
> + */
>  static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
>  {
>         struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> @@ -2017,11 +2017,11 @@ static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> - * Change virtual leakage voltage to actual value.
> + * smu7_patch_ppt_v1_with_vdd_leakage - Change virtual leakage voltage to actual value.
>   *
> - * @param     hwmgr  the address of the powerplay hardware manager.
> - * @param     pointer to changing voltage
> - * @param     pointer to leakage table
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @voltage: pointer to changing voltage
> + * @leakage_table: pointer to leakage table
>   */
>  static void smu7_patch_ppt_v1_with_vdd_leakage(struct pp_hwmgr *hwmgr,
>                 uint16_t *voltage, struct smu7_leakage_voltage *leakage_table)
> @@ -2043,13 +2043,13 @@ static void smu7_patch_ppt_v1_with_vdd_leakage(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Patch voltage lookup table by EVV leakages.
> -*
> -* @param     hwmgr  the address of the powerplay hardware manager.
> -* @param     pointer to voltage lookup table
> -* @param     pointer to leakage table
> -* @return     always 0
> -*/
> + * smu7_patch_lookup_table_with_leakage - Patch voltage lookup table by EVV leakages.
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @lookup_table: pointer to voltage lookup table
> + * @leakage_table: pointer to leakage table
> + * Return:     always 0
> + */
>  static int smu7_patch_lookup_table_with_leakage(struct pp_hwmgr *hwmgr,
>                 phm_ppt_v1_voltage_lookup_table *lookup_table,
>                 struct smu7_leakage_voltage *leakage_table)
> @@ -2500,11 +2500,11 @@ static int smu7_thermal_parameter_init(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> - * Change virtual leakage voltage to actual value.
> + * smu7_patch_ppt_v0_with_vdd_leakage - Change virtual leakage voltage to actual value.
>   *
> - * @param     hwmgr  the address of the powerplay hardware manager.
> - * @param     pointer to changing voltage
> - * @param     pointer to leakage table
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @voltage: pointer to changing voltage
> + * @leakage_table: pointer to leakage table
>   */
>  static void smu7_patch_ppt_v0_with_vdd_leakage(struct pp_hwmgr *hwmgr,
>                 uint32_t *voltage, struct smu7_leakage_voltage *leakage_table)
> @@ -4440,11 +4440,11 @@ smu7_notify_smc_display_config_after_ps_adjustment(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Programs the display gap
> -*
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @return   always OK
> -*/
> + * smu7_program_display_gap - Programs the display gap
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always OK
> + */
>  static int smu7_program_display_gap(struct pp_hwmgr *hwmgr)
>  {
>         struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
> @@ -4498,12 +4498,12 @@ static int smu7_display_configuration_changed_task(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -*  Set maximum target operating fan output RPM
> -*
> -* @param    hwmgr:  the address of the powerplay hardware manager.
> -* @param    usMaxFanRpm:  max operating fan RPM value.
> -* @return   The response that came from the SMC.
> -*/
> + * smu7_set_max_fan_rpm_output - Set maximum target operating fan output RPM
> + *
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @usMaxFanRpm:  max operating fan RPM value.
> + * Return:   The response that came from the SMC.
> + */
>  static int smu7_set_max_fan_rpm_output(struct pp_hwmgr *hwmgr, uint16_t us_max_fan_rpm)
>  {
>         hwmgr->thermal_controller.
> @@ -4698,10 +4698,10 @@ static int smu7_read_clock_registers(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> - * Find out if memory is GDDR5.
> + * smu7_get_memory_type - Find out if memory is GDDR5.
>   *
> - * @param    hwmgr  the address of the powerplay hardware manager.
> - * @return   always 0
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
>   */
>  static int smu7_get_memory_type(struct pp_hwmgr *hwmgr)
>  {
> @@ -4714,10 +4714,10 @@ static int smu7_get_memory_type(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> - * Enables Dynamic Power Management by SMC
> + * smu7_enable_acpi_power_management - Enables Dynamic Power Management by SMC
>   *
> - * @param    hwmgr  the address of the powerplay hardware manager.
> - * @return   always 0
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
>   */
>  static int smu7_enable_acpi_power_management(struct pp_hwmgr *hwmgr)
>  {
> @@ -4728,10 +4728,10 @@ static int smu7_enable_acpi_power_management(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> - * Initialize PowerGating States for different engines
> + * smu7_init_power_gate_state - Initialize PowerGating States for different engines
>   *
> - * @param    hwmgr  the address of the powerplay hardware manager.
> - * @return   always 0
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   always 0
>   */
>  static int smu7_init_power_gate_state(struct pp_hwmgr *hwmgr)
>  {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 23/40] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs
  2020-11-26 13:42 ` [PATCH 23/40] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs Lee Jones
@ 2020-11-30 23:48   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:48 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:112: warning: Function parameter or member 'mode' not described in 'smu7_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:137: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_default_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:209: warning: Function parameter or member 'speed' not described in 'smu7_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:245: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_reset_fan_speed_to_default'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: warning: Function parameter or member 'hwmgr' not described in 'smu7_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:268: warning: Function parameter or member 'speed' not described in 'smu7_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:299: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'low_temp' not described in 'smu7_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:325: warning: Function parameter or member 'high_temp' not described in 'smu7_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:358: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_initialize'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:377: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:395: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:414: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:433: warning: Function parameter or member 'hwmgr' not described in 'smu7_thermal_start_smc_fan_control'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/pm/powerplay/hwmgr/smu7_thermal.c | 103 +++++++++---------
>  1 file changed, 50 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
> index e3d9d969d86ac..0d38d4206848a 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c
> @@ -103,11 +103,11 @@ int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
>  }
>
>  /**
> -* Set Fan Speed Control to static mode, so that the user can decide what speed to use.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -*           mode    the fan control mode, 0 default, 1 by percent, 5, by RPM
> -* @exception Should always succeed.
> -*/
> + * smu7_fan_ctrl_set_static_mode - Set Fan Speed Control to static mode, so that the user can decide what speed to use.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @mode:   the fan control mode, 0 default, 1 by percent, 5, by RPM
> + * Exception: Should always succeed.
> + */
>  int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
>  {
>         if (hwmgr->fan_ctrl_is_in_default_mode) {
> @@ -130,8 +130,8 @@ int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
>
>  /**
>  * Reset Fan Speed Control to default mode.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @exception Should always succeed.
> +* @hwmgr:  the address of the powerplay hardware manager.
> +* Exception: Should always succeed.
>  */
>  int smu7_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
>  {
> @@ -199,11 +199,11 @@ int smu7_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set Fan Speed in percent.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    speed is the percentage value (0% - 100%) to be set.
> -* @exception Fails is the 100% setting appears to be 0.
> -*/
> + * smu7_fan_ctrl_set_fan_speed_percent - Set Fan Speed in percent.
> + * @hwmgr: the address of the powerplay hardware manager.
> + * @speed: is the percentage value (0% - 100%) to be set.
> + * Exception: Fails is the 100% setting appears to be 0.
> + */
>  int smu7_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
>                 uint32_t speed)
>  {
> @@ -237,9 +237,9 @@ int smu7_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Reset Fan Speed to default.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @exception Always succeeds.
> +* smu7_fan_ctrl_reset_fan_speed_to_default - Reset Fan Speed to default.
> +* @hwmgr:  the address of the powerplay hardware manager.
> +* Exception: Always succeeds.
>  */
>  int smu7_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
>  {
> @@ -259,11 +259,11 @@ int smu7_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set Fan Speed in RPM.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    speed is the percentage value (min - max) to be set.
> -* @exception Fails is the speed not lie between min and max.
> -*/
> + * smu7_fan_ctrl_set_fan_speed_rpm - Set Fan Speed in RPM.
> + * @hwmgr: the address of the powerplay hardware manager.
> + * @speed: is the percentage value (min - max) to be set.
> + * Exception: Fails is the speed not lie between min and max.
> + */
>  int smu7_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
>  {
>         uint32_t tach_period;
> @@ -291,10 +291,10 @@ int smu7_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
>  }
>
>  /**
> -* Reads the remote temperature from the SIslands thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * smu7_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  int smu7_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  {
>         int temp;
> @@ -314,12 +314,13 @@ int smu7_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set the requested temperature range for high and low alert signals
> -*
> -* @param    hwmgr The address of the hardware manager.
> -* @param    range Temperature range to be programmed for high and low alert signals
> -* @exception PP_Result_BadInput if the input data is not valid.
> -*/
> + * smu7_thermal_set_temperature_range - Set the requested temperature range for high and low alert signals
> + *
> + * @hwmgr: The address of the hardware manager.
> + * @low_temp: Temperature to be programmed for high alert signals
> + * @high_temp: Temperature to be programmed for low alert signals
> + * Exception: PP_Result_BadInput if the input data is not valid.
> + */
>  static int smu7_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>                 int low_temp, int high_temp)
>  {
> @@ -350,10 +351,10 @@ static int smu7_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Programs thermal controller one-time setting registers
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * smu7_thermal_initialize - Programs thermal controller one-time setting registers
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  static int smu7_thermal_initialize(struct pp_hwmgr *hwmgr)
>  {
>         if (hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution)
> @@ -369,10 +370,10 @@ static int smu7_thermal_initialize(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Enable thermal alerts on the RV770 thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * smu7_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  static void smu7_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  {
>         uint32_t alert;
> @@ -388,9 +389,9 @@ static void smu7_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Disable thermal alerts on the RV770 thermal controller.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * smu7_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int smu7_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  {
>         uint32_t alert;
> @@ -406,10 +407,10 @@ int smu7_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Uninitialize the thermal controller.
> -* Currently just disables alerts.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * smu7_thermal_stop_thermal_controller - Uninitialize the thermal controller.
> + * Currently just disables alerts.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int smu7_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
>         int result = smu7_thermal_disable_alert(hwmgr);
> @@ -421,14 +422,10 @@ int smu7_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Start the fan control on the SMC.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    pInput the pointer to input data
> -* @param    pOutput the pointer to output data
> -* @param    pStorage the pointer to temporary storage
> -* @param    Result the last failure code
> -* @return   result from set temperature range routine
> -*/
> + * smu7_thermal_start_smc_fan_control - Start the fan control on the SMC.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   result from set temperature range routine
> + */
>  static int smu7_thermal_start_smc_fan_control(struct pp_hwmgr *hwmgr)
>  {
>  /* If the fantable setup has failed we could have disabled
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 24/40] drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting
  2020-11-26 13:42 ` [PATCH 24/40] drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting Lee Jones
@ 2020-11-30 23:49   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:49 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:128: warning: Function parameter or member 'mode' not described in 'vega10_fan_ctrl_set_static_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:157: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_default_mode'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:176: warning: Cannot understand  * @fn vega10_enable_fan_control_feature
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:252: warning: Function parameter or member 'speed' not described in 'vega10_fan_ctrl_set_fan_speed_percent'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:290: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_reset_fan_speed_to_default'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: warning: Function parameter or member 'hwmgr' not described in 'vega10_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:307: warning: Function parameter or member 'speed' not described in 'vega10_fan_ctrl_set_fan_speed_rpm'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:339: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:365: warning: Function parameter or member 'range' not described in 'vega10_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:414: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_initialize'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:437: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:468: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:496: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:515: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_setup_fan_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_thermal.c:618: warning: Function parameter or member 'hwmgr' not described in 'vega10_thermal_start_smc_fan_control'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/vega10_thermal.c   | 131 ++++++++----------
>  1 file changed, 61 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
> index 952cd3d7240e3..9b46b27bd30c4 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
> @@ -118,12 +118,12 @@ int vega10_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
>  }
>
>  /**
> -* Set Fan Speed Control to static mode,
> -* so that the user can decide what speed to use.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -*           mode the fan control mode, 0 default, 1 by percent, 5, by RPM
> -* @exception Should always succeed.
> -*/
> + * vega10_fan_ctrl_set_static_mode - Set Fan Speed Control to static mode,
> + * so that the user can decide what speed to use.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @mode: the fan control mode, 0 default, 1 by percent, 5, by RPM
> + * Exception: Should always succeed.
> + */
>  int vega10_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -149,10 +149,10 @@ int vega10_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode)
>  }
>
>  /**
> -* Reset Fan Speed Control to default mode.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @exception Should always succeed.
> -*/
> + * vega10_fan_ctrl_set_default_mode - Reset Fan Speed Control to default mode.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Exception: Should always succeed.
> + */
>  int vega10_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -173,11 +173,10 @@ int vega10_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> - * @fn vega10_enable_fan_control_feature
> - * @brief Enables the SMC Fan Control Feature.
> + * vega10_enable_fan_control_feature - Enables the SMC Fan Control Feature.
>   *
> - * @param    hwmgr - the address of the powerplay hardware manager.
> - * @return   0 on success. -1 otherwise.
> + * @hwmgr: the address of the powerplay hardware manager.
> + * Return:   0 on success. -1 otherwise.
>   */
>  static int vega10_enable_fan_control_feature(struct pp_hwmgr *hwmgr)
>  {
> @@ -242,11 +241,11 @@ int vega10_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set Fan Speed in percent.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    speed is the percentage value (0% - 100%) to be set.
> -* @exception Fails is the 100% setting appears to be 0.
> -*/
> + * vega10_fan_ctrl_set_fan_speed_percent - Set Fan Speed in percent.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @speed: is the percentage value (0% - 100%) to be set.
> + * Exception: Fails is the 100% setting appears to be 0.
> + */
>  int vega10_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
>                 uint32_t speed)
>  {
> @@ -282,10 +281,10 @@ int vega10_fan_ctrl_set_fan_speed_percent(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Reset Fan Speed to default.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @exception Always succeeds.
> -*/
> + * vega10_fan_ctrl_reset_fan_speed_to_default - Reset Fan Speed to default.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Exception: Always succeeds.
> + */
>  int vega10_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
>  {
>         if (hwmgr->thermal_controller.fanInfo.bNoFan)
> @@ -298,11 +297,11 @@ int vega10_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set Fan Speed in RPM.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    speed is the percentage value (min - max) to be set.
> -* @exception Fails is the speed not lie between min and max.
> -*/
> + * vega10_fan_ctrl_set_fan_speed_rpm - Set Fan Speed in RPM.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * @speed: is the percentage value (min - max) to be set.
> + * Exception: Fails is the speed not lie between min and max.
> + */
>  int vega10_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -331,10 +330,10 @@ int vega10_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
>  }
>
>  /**
> -* Reads the remote temperature from the SIslands thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega10_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -353,13 +352,13 @@ int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set the requested temperature range for high and low alert signals
> -*
> -* @param    hwmgr The address of the hardware manager.
> -* @param    range Temperature range to be programmed for
> -*           high and low alert signals
> -* @exception PP_Result_BadInput if the input data is not valid.
> -*/
> + * vega10_thermal_set_temperature_range - Set the requested temperature range for high and low alert signals
> + *
> + * @hwmgr: The address of the hardware manager.
> + * @range: Temperature range to be programmed for
> + *           high and low alert signals
> + * Exception: PP_Result_BadInput if the input data is not valid.
> + */
>  static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>                 struct PP_TemperatureRange *range)
>  {
> @@ -406,10 +405,10 @@ static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Programs thermal controller one-time setting registers
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega10_thermal_initialize - Programs thermal controller one-time setting registers
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  static int vega10_thermal_initialize(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -429,10 +428,10 @@ static int vega10_thermal_initialize(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Enable thermal alerts on the RV770 thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega10_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  static int vega10_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -461,9 +460,9 @@ static int vega10_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Disable thermal alerts on the RV770 thermal controller.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega10_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -488,10 +487,10 @@ int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Uninitialize the thermal controller.
> -* Currently just disables alerts.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega10_thermal_stop_thermal_controller - Uninitialize the thermal controller.
> + * Currently just disables alerts.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega10_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
>         int result = vega10_thermal_disable_alert(hwmgr);
> @@ -503,14 +502,10 @@ int vega10_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set up the fan table to control the fan using the SMC.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    pInput the pointer to input data
> -* @param    pOutput the pointer to output data
> -* @param    pStorage the pointer to temporary storage
> -* @param    Result the last failure code
> -* @return   result from set temperature range routine
> -*/
> + * vega10_thermal_setup_fan_table - Set up the fan table to control the fan using the SMC.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   result from set temperature range routine
> + */
>  static int vega10_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>  {
>         int ret;
> @@ -606,14 +601,10 @@ int vega10_enable_mgpu_fan_boost(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Start the fan control on the SMC.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    pInput the pointer to input data
> -* @param    pOutput the pointer to output data
> -* @param    pStorage the pointer to temporary storage
> -* @param    Result the last failure code
> -* @return   result from set temperature range routine
> -*/
> + * vega10_thermal_start_smc_fan_control - Start the fan control on the SMC.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:   result from set temperature range routine
> + */
>  static int vega10_thermal_start_smc_fan_control(struct pp_hwmgr *hwmgr)
>  {
>  /* If the fantable setup has failed we could have disabled
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 26/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header
  2020-11-26 13:42 ` [PATCH 26/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header Lee Jones
@ 2020-11-30 23:50   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:50 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:2862:5: warning: no previous prototype for ‘vega12_hwmgr_init’ [-Wmissing-prototypes]
>  2862 | int vega12_hwmgr_init(struct pp_hwmgr *hwmgr)
>  | ^~~~~~~~~~~~~~~~~
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 393e4e76a8961..499f2520b1aa3 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -830,5 +830,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>
>  int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
> +int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index 7999091cca16e..49f8a331eb02e 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
> -extern int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr);
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s prototype to shared header
  2020-11-26 13:42 ` [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s " Lee Jones
@ 2020-11-30 23:51   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:51 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:4403:5: warning: no previous prototype for ‘vega20_hwmgr_init’ [-Wmissing-prototypes]
>  4403 | int vega20_hwmgr_init(struct pp_hwmgr *hwmgr)
>  | ^~~~~~~~~~~~~~~~~
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/inc/hwmgr.h             | 1 +
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> index 499f2520b1aa3..490371bd25201 100644
> --- a/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/pm/inc/hwmgr.h
> @@ -831,5 +831,6 @@ int hwmgr_handle_task(struct pp_hwmgr *hwmgr,
>  int smu7_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int smu8_init_function_pointers(struct pp_hwmgr *hwmgr);
>  int vega12_hwmgr_init(struct pp_hwmgr *hwmgr);
> +int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
>
>  #endif /* _HWMGR_H_ */
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> index 49f8a331eb02e..6a7de8b898faf 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c
> @@ -47,7 +47,6 @@ extern const struct pp_smumgr_func smu10_smu_funcs;
>  extern const struct pp_smumgr_func vega20_smu_funcs;
>
>  extern int vega10_hwmgr_init(struct pp_hwmgr *hwmgr);
> -extern int vega20_hwmgr_init(struct pp_hwmgr *hwmgr);
>  extern int smu10_init_function_pointers(struct pp_hwmgr *hwmgr);
>
>  static int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr);
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 28/40] drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers
  2020-11-26 13:42 ` [PATCH 28/40] drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers Lee Jones
@ 2020-11-30 23:52   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:52 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'hwmgr' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'index' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'value' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:112: warning: Function parameter or member 'mask' not described in 'phm_wait_on_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'hwmgr' not described in 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'indirect_port' not described in 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'index' not described in 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'value' not described in 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:145: warning: Function parameter or member 'mask' not described in 'phm_wait_on_indirect_register'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu_helper.c:494: warning: Function parameter or member 'hwmgr' not described in 'phm_initializa_dynamic_state_adjustment_rule_settings'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
> index 2a0ca5194bbe9..bfe80ac0ad8c8 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
> @@ -103,7 +103,7 @@ uint32_t phm_set_field_to_u32(u32 offset, u32 original_data, u32 field, u32 size
>         return original_data;
>  }
>
> -/**
> +/*
>   * Returns once the part of the register indicated by the mask has
>   * reached the given value.
>   */
> @@ -132,7 +132,7 @@ int phm_wait_on_register(struct pp_hwmgr *hwmgr, uint32_t index,
>  }
>
>
> -/**
> +/*
>   * Returns once the part of the register indicated by the mask has
>   * reached the given value.The indirect space is described by giving
>   * the memory-mapped index of the indirect index register.
> @@ -486,9 +486,9 @@ int phm_get_sclk_for_voltage_evv(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> - * Initialize Dynamic State Adjustment Rule Settings
> + * phm_initializa_dynamic_state_adjustment_rule_settings - Initialize Dynamic State Adjustment Rule Settings
>   *
> - * @param    hwmgr  the address of the powerplay hardware manager.
> + * @hwmgr:  the address of the powerplay hardware manager.
>   */
>  int phm_initializa_dynamic_state_adjustment_rule_settings(struct pp_hwmgr *hwmgr)
>  {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 29/40] drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation
  2020-11-26 13:42 ` [PATCH 29/40] drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation Lee Jones
@ 2020-11-30 23:53   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:53 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:217: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'range' not described in 'vega20_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:278: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:296: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:310: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:326: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_setup_fan_table'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/vega20_thermal.c   | 54 +++++++++----------
>  1 file changed, 24 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
> index 364162ddaa9c6..269dd7e95a445 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
> @@ -209,10 +209,10 @@ int vega20_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed)
>  }
>
>  /**
> -* Reads the remote temperature from the SIslands thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega20_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -230,13 +230,12 @@ int vega20_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set the requested temperature range for high and low alert signals
> -*
> -* @param    hwmgr The address of the hardware manager.
> -* @param    range Temperature range to be programmed for
> -*           high and low alert signals
> -* @exception PP_Result_BadInput if the input data is not valid.
> -*/
> + * vega20_thermal_set_temperature_range - Set the requested temperature range for high and low alert signals
> + *
> + * @hwmgr: The address of the hardware manager.
> + * @range: Temperature range to be programmed for high and low alert signals
> + * Exception: PP_Result_BadInput if the input data is not valid.
> + */
>  static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>                 struct PP_TemperatureRange *range)
>  {
> @@ -270,10 +269,10 @@ static int vega20_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Enable thermal alerts on the RV770 thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  static int vega20_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -289,9 +288,9 @@ static int vega20_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Disable thermal alerts on the RV770 thermal controller.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega20_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -302,10 +301,10 @@ int vega20_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Uninitialize the thermal controller.
> -* Currently just disables alerts.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega20_thermal_stop_thermal_controller - Uninitialize the thermal controller.
> + * Currently just disables alerts.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega20_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
>         int result = vega20_thermal_disable_alert(hwmgr);
> @@ -314,14 +313,9 @@ int vega20_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set up the fan table to control the fan using the SMC.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    pInput the pointer to input data
> -* @param    pOutput the pointer to output data
> -* @param    pStorage the pointer to temporary storage
> -* @param    Result the last failure code
> -* @return   result from set temperature range routine
> -*/
> + * vega20_thermal_setup_fan_table - Set up the fan table to control the fan using the SMC.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + */
>  static int vega20_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>  {
>         int ret;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 30/40] drm/amd/pm/powerplay/hwmgr/vega12_thermal: Fix some outdated function documentation
  2020-11-26 13:42 ` [PATCH 30/40] drm/amd/pm/powerplay/hwmgr/vega12_thermal: " Lee Jones
@ 2020-11-30 23:54   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:54 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:63: warning: Cannot understand  * @fn vega12_enable_fan_control_feature
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:137: warning: Function parameter or member 'hwmgr' not described in 'vega12_fan_ctrl_reset_fan_speed_to_default'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:147: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_get_temperature'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:172: warning: Function parameter or member 'range' not described in 'vega12_thermal_set_temperature_range'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:208: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_enable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:226: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_disable_alert'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:240: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_stop_thermal_controller'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:256: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_setup_fan_table'
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:279: warning: Function parameter or member 'hwmgr' not described in 'vega12_thermal_start_smc_fan_control'
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../amd/pm/powerplay/hwmgr/vega12_thermal.c   | 82 ++++++++-----------
>  1 file changed, 36 insertions(+), 46 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
> index 7ace439dcde7a..0dc16f25a463b 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_thermal.c
> @@ -60,11 +60,10 @@ int vega12_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
>  }
>
>  /**
> - * @fn vega12_enable_fan_control_feature
> - * @brief Enables the SMC Fan Control Feature.
> + * vega12_enable_fan_control_feature -Enables the SMC Fan Control Feature.
>   *
> - * @param    hwmgr - the address of the powerplay hardware manager.
> - * @return   0 on success. -1 otherwise.
> + * @hwmgr: the address of the powerplay hardware manager.
> + * Return:   0 on success. -1 otherwise.
>   */
>  static int vega12_enable_fan_control_feature(struct pp_hwmgr *hwmgr)
>  {
> @@ -129,20 +128,20 @@ int vega12_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Reset Fan Speed to default.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @exception Always succeeds.
> -*/
> + * vega12_fan_ctrl_reset_fan_speed_to_default - Reset Fan Speed to default.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Exception Always succeeds.
> + */
>  int vega12_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr)
>  {
>         return vega12_fan_ctrl_start_smc_fan_control(hwmgr);
>  }
>
>  /**
> -* Reads the remote temperature from the SIslands thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega12_thermal_get_temperature - Reads the remote temperature from the SIslands thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega12_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -160,13 +159,13 @@ int vega12_thermal_get_temperature(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set the requested temperature range for high and low alert signals
> -*
> -* @param    hwmgr The address of the hardware manager.
> -* @param    range Temperature range to be programmed for
> -*           high and low alert signals
> -* @exception PP_Result_BadInput if the input data is not valid.
> -*/
> + * Set the requested temperature range for high and low alert signals
> + *
> + * @hwmgr: The address of the hardware manager.
> + * @range: Temperature range to be programmed for
> + *           high and low alert signals
> + * Exception: PP_Result_BadInput if the input data is not valid.
> + */
>  static int vega12_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>                 struct PP_TemperatureRange *range)
>  {
> @@ -200,10 +199,10 @@ static int vega12_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
>  }
>
>  /**
> -* Enable thermal alerts on the RV770 thermal controller.
> -*
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega12_thermal_enable_alert - Enable thermal alerts on the RV770 thermal controller.
> + *
> + * @hwmgr: The address of the hardware manager.
> + */
>  static int vega12_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -219,9 +218,9 @@ static int vega12_thermal_enable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Disable thermal alerts on the RV770 thermal controller.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega12_thermal_disable_alert - Disable thermal alerts on the RV770 thermal controller.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega12_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  {
>         struct amdgpu_device *adev = hwmgr->adev;
> @@ -232,10 +231,10 @@ int vega12_thermal_disable_alert(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Uninitialize the thermal controller.
> -* Currently just disables alerts.
> -* @param    hwmgr The address of the hardware manager.
> -*/
> + * vega12_thermal_stop_thermal_controller - Uninitialize the thermal controller.
> + * Currently just disables alerts.
> + * @hwmgr: The address of the hardware manager.
> + */
>  int vega12_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
>         int result = vega12_thermal_disable_alert(hwmgr);
> @@ -244,14 +243,9 @@ int vega12_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Set up the fan table to control the fan using the SMC.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    pInput the pointer to input data
> -* @param    pOutput the pointer to output data
> -* @param    pStorage the pointer to temporary storage
> -* @param    Result the last failure code
> -* @return   result from set temperature range routine
> -*/
> + * vega12_thermal_setup_fan_table - Set up the fan table to control the fan using the SMC.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + */
>  static int vega12_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>  {
>         int ret;
> @@ -267,14 +261,10 @@ static int vega12_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
>  }
>
>  /**
> -* Start the fan control on the SMC.
> -* @param    hwmgr  the address of the powerplay hardware manager.
> -* @param    pInput the pointer to input data
> -* @param    pOutput the pointer to output data
> -* @param    pStorage the pointer to temporary storage
> -* @param    Result the last failure code
> -* @return   result from set temperature range routine
> -*/
> + * vega12_thermal_start_smc_fan_control - Start the fan control on the SMC.
> + * @hwmgr:  the address of the powerplay hardware manager.
> + * Return:  result from set temperature range routine
> + */
>  static int vega12_thermal_start_smc_fan_control(struct pp_hwmgr *hwmgr)
>  {
>         /* If the fantable setup has failed we could have disabled
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused
  2020-11-26 13:42 ` [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused Lee Jones
@ 2020-11-30 23:57   ` Alex Deucher
  2020-12-01  7:19     ` Lee Jones
  0 siblings, 1 reply; 82+ messages in thread
From: Alex Deucher @ 2020-11-30 23:57 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> 'link_bandwidth_kbps' is always obtained, but only used if
> CONFIG_DRM_AMD_DC_DCN is defined.

Probably better to just move this under CONFIG_DRM_AMD_DC_DCN.  I'll
send a patch.

Thanks,

Alex


>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘create_stream_for_sink’:
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5080:11: warning: variable ‘link_bandwidth_kbps’ set but not used [-Wunused-but-set-variable]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 08539f4315864..ac7643d73bc68 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -5077,7 +5077,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
>  #if defined(CONFIG_DRM_AMD_DC_DCN)
>         struct dsc_dec_dpcd_caps dsc_caps;
>  #endif
> -       uint32_t link_bandwidth_kbps;
> +       uint32_t __maybe_unused link_bandwidth_kbps;
>
>         struct dc_sink *sink = NULL;
>         if (aconnector == NULL) {
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 33/40] drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' as __maybe_unused
  2020-11-26 13:42 ` [PATCH 33/40] drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' " Lee Jones
@ 2020-12-01  0:00   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01  0:00 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> 'dpp_input_csc_matrix' is used by some, but not all source files which
> include dpp.h.
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dpp.h:50:42: warning: ‘dpp_input_csc_matrix’ defined but not used [-Wunused-const-variable=]
>
> NB: Snipped lots of these for brevity
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
> index 6751186f6f904..ddbe4bb52724a 100644
> --- a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
> +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h
> @@ -47,7 +47,7 @@ struct dpp_input_csc_matrix {
>         uint16_t regval[12];
>  };
>
> -static const struct dpp_input_csc_matrix dpp_input_csc_matrix[] = {
> +static const struct dpp_input_csc_matrix __maybe_unused dpp_input_csc_matrix[] = {
>         {COLOR_SPACE_SRGB,
>                 {0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} },
>         {COLOR_SPACE_SRGB_LIMITED,
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 35/40] drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header
  2020-11-26 13:42 ` [PATCH 35/40] drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header Lee Jones
@ 2020-12-01  0:02   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01  0:02 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'lut' not described in '__drm_lut_to_dc_gamma'
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'gamma' not described in '__drm_lut_to_dc_gamma'
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:128: warning: Function parameter or member 'is_legacy' not described in '__drm_lut_to_dc_gamma'
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_color.c:426: warning: Function parameter or member 'dc_plane_state' not described in 'amdgpu_dm_update_plane_color_mgmt'
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> index 5df05f0d18bc9..157fe4efbb599 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> @@ -119,7 +119,7 @@ static bool __is_lut_linear(const struct drm_color_lut *lut, uint32_t size)
>         return true;
>  }
>
> -/**
> +/*
>   * Convert the drm_color_lut to dc_gamma. The conversion depends on the size
>   * of the lut - whether or not it's legacy.
>   */
> @@ -413,7 +413,7 @@ int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state *crtc)
>  /**
>   * amdgpu_dm_update_plane_color_mgmt: Maps DRM color management to DC plane.
>   * @crtc: amdgpu_dm crtc state
> - * @ dc_plane_state: target DC surface
> + * @dc_plane_state: target DC surface
>   *
>   * Update the underlying dc_stream_state's input transfer function (ITF) in
>   * preparation for hardware commit. The transfer function used depends on
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 36/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static
  2020-11-26 13:42 ` [PATCH 36/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static Lee Jones
@ 2020-12-01  0:04   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01  0:04 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:538:6: warning: no previous prototype for ‘pp_rv_set_wm_ranges’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:590:6: warning: no previous prototype for ‘pp_rv_set_pme_wa_enable’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:601:6: warning: no previous prototype for ‘pp_rv_set_active_display_count’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:614:6: warning: no previous prototype for ‘pp_rv_set_min_deep_sleep_dcfclk’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:627:6: warning: no previous prototype for ‘pp_rv_set_hard_min_dcefclk_by_freq’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:640:6: warning: no previous prototype for ‘pp_rv_set_hard_min_fclk_by_freq’ [-Wmissing-prototypes]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c   | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> index 84065c12d4b85..ac0a0539854ef 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> @@ -535,7 +535,7 @@ bool dm_pp_get_static_clocks(
>         return true;
>  }
>
> -void pp_rv_set_wm_ranges(struct pp_smu *pp,
> +static void pp_rv_set_wm_ranges(struct pp_smu *pp,
>                 struct pp_smu_wm_range_sets *ranges)
>  {
>         const struct dc_context *ctx = pp->dm;
> @@ -587,7 +587,7 @@ void pp_rv_set_wm_ranges(struct pp_smu *pp,
>                                                            &wm_with_clock_ranges);
>  }
>
> -void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
> +static void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
>  {
>         const struct dc_context *ctx = pp->dm;
>         struct amdgpu_device *adev = ctx->driver_context;
> @@ -598,7 +598,7 @@ void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
>                 pp_funcs->notify_smu_enable_pwe(pp_handle);
>  }
>
> -void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
> +static void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
>  {
>         const struct dc_context *ctx = pp->dm;
>         struct amdgpu_device *adev = ctx->driver_context;
> @@ -611,7 +611,7 @@ void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
>         pp_funcs->set_active_display_count(pp_handle, count);
>  }
>
> -void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
> +static void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
>  {
>         const struct dc_context *ctx = pp->dm;
>         struct amdgpu_device *adev = ctx->driver_context;
> @@ -624,7 +624,7 @@ void pp_rv_set_min_deep_sleep_dcfclk(struct pp_smu *pp, int clock)
>         pp_funcs->set_min_deep_sleep_dcefclk(pp_handle, clock);
>  }
>
> -void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
> +static void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
>  {
>         const struct dc_context *ctx = pp->dm;
>         struct amdgpu_device *adev = ctx->driver_context;
> @@ -637,7 +637,7 @@ void pp_rv_set_hard_min_dcefclk_by_freq(struct pp_smu *pp, int clock)
>         pp_funcs->set_hard_min_dcefclk_by_freq(pp_handle, clock);
>  }
>
> -void pp_rv_set_hard_min_fclk_by_freq(struct pp_smu *pp, int mhz)
> +static void pp_rv_set_hard_min_fclk_by_freq(struct pp_smu *pp, int mhz)
>  {
>         const struct dc_context *ctx = pp->dm;
>         struct amdgpu_device *adev = ctx->driver_context;
> @@ -661,7 +661,7 @@ static enum pp_smu_status pp_nv_set_wm_ranges(struct pp_smu *pp,
>         return PP_SMU_RESULT_OK;
>  }
>
> -enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
> +static enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
>  {
>         const struct dc_context *ctx = pp->dm;
>         struct amdgpu_device *adev = ctx->driver_context;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 37/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()'
  2020-11-26 13:42 ` [PATCH 37/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()' Lee Jones
@ 2020-12-01  0:05   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01  0:05 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:664:20: warning: no previous prototype for ‘pp_nv_set_pme_wa_enable’ [-Wmissing-prototypes]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 16 ----------------
>  1 file changed, 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> index ac0a0539854ef..607ec09994456 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
> @@ -661,22 +661,6 @@ static enum pp_smu_status pp_nv_set_wm_ranges(struct pp_smu *pp,
>         return PP_SMU_RESULT_OK;
>  }
>
> -static enum pp_smu_status pp_nv_set_pme_wa_enable(struct pp_smu *pp)
> -{
> -       const struct dc_context *ctx = pp->dm;
> -       struct amdgpu_device *adev = ctx->driver_context;
> -       struct smu_context *smu = &adev->smu;
> -
> -       if (!smu->ppt_funcs)
> -               return PP_SMU_RESULT_UNSUPPORTED;
> -
> -       /* 0: successful or smu.ppt_funcs->set_azalia_d3_pme = NULL;  1: fail */
> -       if (smu_set_azalia_d3_pme(smu))
> -               return PP_SMU_RESULT_FAIL;
> -
> -       return PP_SMU_RESULT_OK;
> -}
> -
>  static enum pp_smu_status pp_nv_set_display_count(struct pp_smu *pp, int count)
>  {
>         const struct dc_context *ctx = pp->dm;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 38/40] drm/amd/display/dc/basics/conversion: Include header containing our prototypes
  2020-11-26 13:42 ` [PATCH 38/40] drm/amd/display/dc/basics/conversion: Include header containing our prototypes Lee Jones
@ 2020-12-01  0:05   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01  0:05 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:34:10: warning: no previous prototype for ‘fixed_point_to_int_frac’ [-Wmissing-prototypes]
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/conversion.c:81:6: warning: no previous prototype for ‘convert_float_matrix’ [-Wmissing-prototypes]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/basics/conversion.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> index 50b47f11875c9..24ed03d8cda74 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
> @@ -24,6 +24,7 @@
>   */
>
>  #include "dm_services.h"
> +#include "conversion.h"
>
>  #define DIVIDER 10000
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 39/40] drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi'
  2020-11-26 13:42 ` [PATCH 39/40] drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi' Lee Jones
@ 2020-12-01  0:06   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01  0:06 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/fixpt31_32.c:29:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> index 59f37563704ad..1726bdf89bae8 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
> @@ -26,7 +26,6 @@
>  #include "dm_services.h"
>  #include "include/fixed31_32.h"
>
> -static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
>  static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
>  static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
>  static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 40/40] drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static
  2020-11-26 13:42 ` [PATCH 40/40] drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static Lee Jones
@ 2020-12-01  0:07   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01  0:07 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/basics/vector.c:55:6: warning: no previous prototype for ‘dal_vector_presized_costruct’ [-Wmissing-prototypes]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/basics/vector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/basics/vector.c b/drivers/gpu/drm/amd/display/dc/basics/vector.c
> index 8f93d25f91ee2..706c803c4d3b0 100644
> --- a/drivers/gpu/drm/amd/display/dc/basics/vector.c
> +++ b/drivers/gpu/drm/amd/display/dc/basics/vector.c
> @@ -52,7 +52,7 @@ bool dal_vector_construct(
>         return true;
>  }
>
> -bool dal_vector_presized_costruct(
> +static bool dal_vector_presized_costruct(
>         struct vector *vector,
>         struct dc_context *ctx,
>         uint32_t count,
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused
  2020-11-30 23:57   ` Alex Deucher
@ 2020-12-01  7:19     ` Lee Jones
  0 siblings, 0 replies; 82+ messages in thread
From: Lee Jones @ 2020-12-01  7:19 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Mon, 30 Nov 2020, Alex Deucher wrote:

> On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
> >
> > 'link_bandwidth_kbps' is always obtained, but only used if
> > CONFIG_DRM_AMD_DC_DCN is defined.
> 
> Probably better to just move this under CONFIG_DRM_AMD_DC_DCN.  I'll
> send a patch.

I considered that, but thought there would have been good reason for
the clause break just for dc_link_bandwidth_kbps().

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 31/40] drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret'
  2020-11-26 13:42 ` [PATCH 31/40] drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret' Lee Jones
@ 2020-12-01 14:00   ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01 14:00 UTC (permalink / raw)
  To: Lee Jones
  Cc: David Airlie, LKML, amd-gfx list, Maling list - DRI developers,
	Alex Deucher, Evan Quan, Christian König

On Thu, Nov 26, 2020 at 8:43 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c: In function ‘kv_dpm_powergate_uvd’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c:1678:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c: In function ‘kv_dpm_powergate_vce’:
>  drivers/gpu/drm/amd/amdgpu/../pm/powerplay/kv_dpm.c:1706:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> Cc: Evan Quan <evan.quan@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c b/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c
> index 4b3faaccecb94..66daabebee358 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c
> +++ b/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c
> @@ -1675,14 +1675,13 @@ static void kv_dpm_powergate_uvd(void *handle, bool gate)
>  {
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>         struct kv_power_info *pi = kv_get_pi(adev);
> -       int ret;
>
>         pi->uvd_power_gated = gate;
>
>         if (gate) {
>                 /* stop the UVD block */
> -               ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
> -                                                            AMD_PG_STATE_GATE);
> +               amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
> +                                                      AMD_PG_STATE_GATE);
>                 kv_update_uvd_dpm(adev, gate);
>                 if (pi->caps_uvd_pg)
>                         /* power off the UVD block */
> @@ -1694,8 +1693,8 @@ static void kv_dpm_powergate_uvd(void *handle, bool gate)
>                         /* re-init the UVD block */
>                 kv_update_uvd_dpm(adev, gate);
>
> -               ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
> -                                                            AMD_PG_STATE_UNGATE);
> +               amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD,
> +                                                      AMD_PG_STATE_UNGATE);
>         }
>  }
>
> @@ -1703,14 +1702,13 @@ static void kv_dpm_powergate_vce(void *handle, bool gate)
>  {
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>         struct kv_power_info *pi = kv_get_pi(adev);
> -       int ret;
>
>         pi->vce_power_gated = gate;
>
>         if (gate) {
>                 /* stop the VCE block */
> -               ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
> -                                                            AMD_PG_STATE_GATE);
> +               amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
> +                                                      AMD_PG_STATE_GATE);
>                 kv_enable_vce_dpm(adev, false);
>                 if (pi->caps_vce_pg) /* power off the VCE block */
>                         amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerOFF);
> @@ -1719,8 +1717,8 @@ static void kv_dpm_powergate_vce(void *handle, bool gate)
>                         amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
>                 kv_enable_vce_dpm(adev, true);
>                 /* re-init the VCE block */
> -               ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
> -                                                            AMD_PG_STATE_UNGATE);
> +               amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
> +                                                      AMD_PG_STATE_UNGATE);
>         }
>  }
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation
  2020-11-26 13:42 ` [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation Lee Jones
@ 2020-12-01 18:42   ` Alex Deucher
  2020-12-01 18:59     ` Christian König
  0 siblings, 1 reply; 82+ messages in thread
From: Alex Deucher @ 2020-12-01 18:42 UTC (permalink / raw)
  To: Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c: In function ‘dm_dtn_log_append_v’:
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:345:2: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>  drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:375:3: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> index b7d7ec3ba00d7..24a81642baa26 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> @@ -318,6 +318,7 @@ void dm_dtn_log_begin(struct dc_context *ctx,
>         dm_dtn_log_append_v(ctx, log_ctx, "%s", msg);
>  }
>
> +__printf(3, 4)

Can you expand a bit on what this does?

Alex

>  void dm_dtn_log_append_v(struct dc_context *ctx,
>         struct dc_log_buffer_ctx *log_ctx,
>         const char *msg, ...)
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation
  2020-12-01 18:42   ` Alex Deucher
@ 2020-12-01 18:59     ` Christian König
  2020-12-01 19:41       ` Alex Deucher
  0 siblings, 1 reply; 82+ messages in thread
From: Christian König @ 2020-12-01 18:59 UTC (permalink / raw)
  To: Alex Deucher, Lee Jones
  Cc: Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher

Am 01.12.20 um 19:42 schrieb Alex Deucher:
> On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
>> Fixes the following W=1 kernel build warning(s):
>>
>>   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c: In function ‘dm_dtn_log_append_v’:
>>   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:345:2: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>>   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:375:3: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>>
>> Cc: Harry Wentland <harry.wentland@amd.com>
>> Cc: Leo Li <sunpeng.li@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: "Christian König" <christian.koenig@amd.com>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Cc: amd-gfx@lists.freedesktop.org
>> Cc: dri-devel@lists.freedesktop.org
>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>> ---
>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> index b7d7ec3ba00d7..24a81642baa26 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> @@ -318,6 +318,7 @@ void dm_dtn_log_begin(struct dc_context *ctx,
>>          dm_dtn_log_append_v(ctx, log_ctx, "%s", msg);
>>   }
>>
>> +__printf(3, 4)
> Can you expand a bit on what this does?

Been a while since I looked into something like this, but IIRC this 
means that parameter 3 (msg) is considered a printf format string and 
the types of parameter 4 and following checked against that.

Looks correct to me.

Christian.

>
> Alex
>
>>   void dm_dtn_log_append_v(struct dc_context *ctx,
>>          struct dc_log_buffer_ctx *log_ctx,
>>          const char *msg, ...)
>> --
>> 2.25.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C50bdbd2fb7a5400e91c008d89628d11c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637424450053181783%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=afzSSu%2Fba0%2FQiwOameJRO5Sgs5joRPondWQx%2ByQZZlU%3D&amp;reserved=0


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

* Re: [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation
  2020-12-01 18:59     ` Christian König
@ 2020-12-01 19:41       ` Alex Deucher
  0 siblings, 0 replies; 82+ messages in thread
From: Alex Deucher @ 2020-12-01 19:41 UTC (permalink / raw)
  To: Christian König
  Cc: Lee Jones, Leo Li, LKML, amd-gfx list, David Airlie,
	Maling list - DRI developers, Alex Deucher

On Tue, Dec 1, 2020 at 1:59 PM Christian König <christian.koenig@amd.com> wrote:
>
> Am 01.12.20 um 19:42 schrieb Alex Deucher:
> > On Thu, Nov 26, 2020 at 8:44 AM Lee Jones <lee.jones@linaro.org> wrote:
> >> Fixes the following W=1 kernel build warning(s):
> >>
> >>   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c: In function ‘dm_dtn_log_append_v’:
> >>   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:345:2: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
> >>   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:375:3: warning: function ‘dm_dtn_log_append_v’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
> >>
> >> Cc: Harry Wentland <harry.wentland@amd.com>
> >> Cc: Leo Li <sunpeng.li@amd.com>
> >> Cc: Alex Deucher <alexander.deucher@amd.com>
> >> Cc: "Christian König" <christian.koenig@amd.com>
> >> Cc: David Airlie <airlied@linux.ie>
> >> Cc: Daniel Vetter <daniel@ffwll.ch>
> >> Cc: amd-gfx@lists.freedesktop.org
> >> Cc: dri-devel@lists.freedesktop.org
> >> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> >> ---
> >>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> >> index b7d7ec3ba00d7..24a81642baa26 100644
> >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> >> @@ -318,6 +318,7 @@ void dm_dtn_log_begin(struct dc_context *ctx,
> >>          dm_dtn_log_append_v(ctx, log_ctx, "%s", msg);
> >>   }
> >>
> >> +__printf(3, 4)
> > Can you expand a bit on what this does?
>
> Been a while since I looked into something like this, but IIRC this
> means that parameter 3 (msg) is considered a printf format string and
> the types of parameter 4 and following checked against that.
>
> Looks correct to me.

Thanks.  Applied.

Alex


>
> Christian.
>
> >
> > Alex
> >
> >>   void dm_dtn_log_append_v(struct dc_context *ctx,
> >>          struct dc_log_buffer_ctx *log_ctx,
> >>          const char *msg, ...)
> >> --
> >> 2.25.1
> >>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C50bdbd2fb7a5400e91c008d89628d11c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637424450053181783%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=afzSSu%2Fba0%2FQiwOameJRO5Sgs5joRPondWQx%2ByQZZlU%3D&amp;reserved=0
>

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

end of thread, other threads:[~2020-12-01 19:42 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 13:42 [PATCH 00/40] [Set 10] Rid W=1 warnings from GPU Lee Jones
2020-11-26 13:42 ` [PATCH 01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res' Lee Jones
2020-11-30 23:09   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 02/40] drm/amd/pm/powerplay/smumgr/polaris10_smumgr: Make function called by reference static Lee Jones
2020-11-30 23:10   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 03/40] drm/amd/pm/powerplay/smumgr/ci_smumgr: Remove set but unused variable 'res' Lee Jones
2020-11-30 23:14   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 04/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Make function called by reference static Lee Jones
2020-11-30 23:16   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 05/40] drm/amd/pm/powerplay/smumgr/vegam_smumgr: " Lee Jones
2020-11-30 23:16   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 06/40] drm/amd/pm/powerplay/smumgr/smu9_smumgr: Include our own header containing our prototypes Lee Jones
2020-11-30 23:17   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 07/40] drm/amd/pm/powerplay/smumgr/fiji_smumgr: Demote kernel-doc format abuse Lee Jones
2020-11-30 23:18   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 08/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Remove unused 'phm_set_*()' functions Lee Jones
2020-11-30 23:20   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 09/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu8_init_function_pointers()' prototype to shared header Lee Jones
2020-11-30 23:28   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 10/40] drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused Lee Jones
2020-11-30 23:29   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use Lee Jones
2020-11-30 23:31   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 12/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Remove unused variable 'fPowerDPMx' Lee Jones
2020-11-30 23:33   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 13/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'smu7_init_function_pointers()'s prototype to header Lee Jones
2020-11-30 23:33   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 14/40] drm/amd/pm/powerplay/hwmgr/ppatomfwctrl: Demote kernel-doc formatting abuses Lee Jones
2020-11-30 23:34   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 15/40] drm/msm/disp/dpu1/dpu_hw_interrupts: Demote kernel-doc formatting misuse Lee Jones
2020-11-30 21:23   ` abhinavk
2020-11-26 13:42 ` [PATCH 16/40] drm/amd/pm/powerplay/smumgr/iceland_smumgr: Remove unused variable 'res' Lee Jones
2020-11-30 23:39   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 17/40] drm/amd/pm/powerplay/hwmgr/hardwaremanager: Fix function header related formatting issues Lee Jones
2020-11-30 23:40   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 18/40] drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0: Convert to proper kernel-doc format Lee Jones
2020-11-30 23:41   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 19/40] drm/amd/pm/powerplay/hwmgr/ppatomctrl: Fix a myriad of kernel-doc issues Lee Jones
2020-11-30 23:43   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 20/40] drm/amd/pm/powerplay/hwmgr/vega10_processpptables: Make function invoked by reference static Lee Jones
2020-11-30 23:43   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 21/40] drm/amd/pm/powerplay/hwmgr/smu7_hwmgr: Fix a whole bunch of historical function doc issues Lee Jones
2020-11-30 23:44   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 22/40] drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Remove set but unused variable 'result' Lee Jones
2020-11-26 13:42 ` [PATCH 23/40] drm/amd/pm/powerplay/hwmgr/smu7_thermal: Repair formatting in a bunch of function docs Lee Jones
2020-11-30 23:48   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 24/40] drm/amd/pm/powerplay/hwmgr/vega10_thermal: Fix a bunch of dated function doc formatting Lee Jones
2020-11-30 23:49   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 25/40] drm/amd/pm/powerplay/hwmgr/pp_psm: Remove unused variable 'result' Lee Jones
2020-11-26 13:42 ` [PATCH 26/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega12_hwmgr_init()'s prototype to shared header Lee Jones
2020-11-30 23:50   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 27/40] drm/amd/pm/powerplay/hwmgr/hwmgr: Move 'vega20_hwmgr_init()'s " Lee Jones
2020-11-30 23:51   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 28/40] drm/amd/pm/powerplay/hwmgr/smu_helper: Demote or fix kernel-doc headers Lee Jones
2020-11-30 23:52   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 29/40] drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation Lee Jones
2020-11-30 23:53   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 30/40] drm/amd/pm/powerplay/hwmgr/vega12_thermal: " Lee Jones
2020-11-30 23:54   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 31/40] drm/amd/pm/powerplay/kv_dpm: Remove unused variable 'ret' Lee Jones
2020-12-01 14:00   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 32/40] drm/amd/display/amdgpu_dm/amdgpu_dm: Mark 'link_bandwidth_kbps' as __maybe_unused Lee Jones
2020-11-30 23:57   ` Alex Deucher
2020-12-01  7:19     ` Lee Jones
2020-11-26 13:42 ` [PATCH 33/40] drm/amd/display/dc/inc/hw/dpp: Mark 'dpp_input_csc_matrix' " Lee Jones
2020-12-01  0:00   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 34/40] drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Use 'gnu_printf' format notation Lee Jones
2020-12-01 18:42   ` Alex Deucher
2020-12-01 18:59     ` Christian König
2020-12-01 19:41       ` Alex Deucher
2020-11-26 13:42 ` [PATCH 35/40] drm/amd/display/amdgpu_dm/amdgpu_dm_color: Demote a misuse and fix another kernel-doc header Lee Jones
2020-12-01  0:02   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 36/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Mark local functions invoked by reference as static Lee Jones
2020-12-01  0:04   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 37/40] drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu: Remove unused function 'pp_nv_set_pme_wa_enable()' Lee Jones
2020-12-01  0:05   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 38/40] drm/amd/display/dc/basics/conversion: Include header containing our prototypes Lee Jones
2020-12-01  0:05   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 39/40] drm/amd/display/dc/basics/fixpt31_32: Remove unused variable 'dc_fixpt_pi' Lee Jones
2020-12-01  0:06   ` Alex Deucher
2020-11-26 13:42 ` [PATCH 40/40] drm/amd/display/dc/basics/vector: Make local function 'dal_vector_presized_costruct' static Lee Jones
2020-12-01  0:07   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).