drm/amd/display: add prefix to dc/clk_mgr/dcn10 functions
Subsystems (3)
cover drm/amd/display: add prefix to dc/clk_mgr/dcn10 functions
This patchset has three commits that add prefix to all the functions defined in dc/clk_mgr/dcn10 that indicate the file that they were defined. Enforcing this pattern makes filtering results in debug tools like ftrace better.
David Tadokoro (3):
drm/amd/display: add prefix to rv1_clk_mgr_clk.c function drm/amd/display: add prefix to rv1_clk_mgr.c functions drm/amd/display: add prefix to rv1_clk_mgr_vbios_smu.c functions
.../display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 24 +++++++++---------- .../dc/clk_mgr/dcn10/rv1_clk_mgr_clk.c | 2 +- .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c | 14 +++++------ .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.h | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/3 drm/amd/display: add prefix to rv1_clk_mgr_clk.c function
The function defined in dc/clk_mgr/dcn10/rv1_clk_mgr_clk.c doesn't have a name that indicates where it was declared.
To better filter results in debug tools like ftrace, prefix this function with 'rv1_clk_mgr_clk_'.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr_clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr_clk.c +1 -1
@@ -49,7 +49,7 @@/* Only used by testing framework*/ -void rv1_dump_clk_registers (struct clk_state_registers *regs,struct clk_bypass *bypass,struct clk_mgr *clk_mgr_base) +void rv1_clk_mgr_clk_dump_clk_registers (struct clk_state_registers *regs,struct clk_bypass *bypass,struct clk_mgr *clk_mgr_base) {struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);
Signature · 1 line
2.39.2
PATCH 2/3 drm/amd/display: add prefix to rv1_clk_mgr.c functions
In reply to David TadokoroThe functions defined in dc/clk_mgr/dcn10/rv1_clk_mgr.c don't have names that indicates where they were declared.
To better filter results in debug tools like ftrace, prefix these functions with 'rv1_clk_mgr_'.
--- .../display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c +11 -11
@@ -34,12 +34,12 @@#include "rv1_clk_mgr_vbios_smu.h" #include "rv1_clk_mgr_clk.h" -static void rv1_init_clocks (struct clk_mgr *clk_mgr) +static void rv1_clk_mgr_init_clocks (struct clk_mgr *clk_mgr) {memset (&(clk_mgr->clks),0 ,sizeof (struct dc_clocks )); } -static int rv1_determine_dppclk_threshold (struct clk_mgr_internal *clk_mgr,struct dc_clocks *new_clocks) +static int rv1_clk_mgr_determine_dppclk_threshold (struct clk_mgr_internal *clk_mgr,struct dc_clocks *new_clocks) {bool request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz;bool dispclk_increase = new_clocks->dispclk_khz > clk_mgr->base.clks.dispclk_khz;
@@ -85,18 +85,18 @@ static int rv1_determine_dppclk_threshold(struct clk_mgr_internal *clk_mgr, strureturn disp_clk_threshold; } -static void ramp_up_dispclk_with_dpp ( +static void rv1_clk_mgr_ramp_up_dispclk_with_dpp (struct clk_mgr_internal *clk_mgr,struct dc *dc,struct dc_clocks *new_clocks,bool safe_to_lower) {int i; -int dispclk_to_dpp_threshold =rv1_determine_dppclk_threshold (clk_mgr, new_clocks); +int dispclk_to_dpp_threshold =rv1_clk_mgr_determine_dppclk_threshold (clk_mgr, new_clocks);bool request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz;/* this function is to change dispclk, dppclk and dprefclk according to -* bandwidth requirement. Its call stack is rv1_update_clocks --> +* bandwidth requirement. Its call stack is rv1_clk_mgr_update_clocks --> * update_clocks --> dcn10_prepare_bandwidth / dcn10_optimize_bandwidth * --> prepare_bandwidth / optimize_bandwidth. before change dcn hw, * prepare_bandwidth will be called first to allow enough clock,
@@ -187,7 +187,7 @@ static void ramp_up_dispclk_with_dpp( clk_mgr->base.clks.max_supported_dppclk_khz = new_clocks->max_supported_dppclk_khz; } -static void rv1_update_clocks (struct clk_mgr *clk_mgr_base, +static void rv1_clk_mgr_update_clocks (struct clk_mgr *clk_mgr_base,struct dc_state *context,bool safe_to_lower) {
@@ -274,7 +274,7 @@ static void rv1_update_clocks(struct clk_mgr *clk_mgr_base,/* program dispclk on = as a w/a for sleep resume clock ramping issues */ if (should_set_clock (safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) || new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz) { -ramp_up_dispclk_with_dpp (clk_mgr, dc, new_clocks, safe_to_lower); +rv1_clk_mgr_ramp_up_dispclk_with_dpp (clk_mgr, dc, new_clocks, safe_to_lower); clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz; send_request_to_lower = true; }
@@ -291,7 +291,7 @@ static void rv1_update_clocks(struct clk_mgr *clk_mgr_base, } } -static void rv1_enable_pme_wa (struct clk_mgr *clk_mgr_base) +static void rv1_clk_mgr_enable_pme_wa (struct clk_mgr *clk_mgr_base) {struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);struct pp_smu_funcs_rv *pp_smu =NULL ;
@@ -305,10 +305,10 @@ static void rv1_enable_pme_wa(struct clk_mgr *clk_mgr_base) }static struct clk_mgr_funcs rv1_clk_funcs = { - .init_clocks = rv1_init_clocks, + .init_clocks = rv1_clk_mgr_init_clocks, .get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz, - .update_clocks = rv1_update_clocks, - .enable_pme_wa = rv1_enable_pme_wa, + .update_clocks = rv1_clk_mgr_update_clocks, + .enable_pme_wa = rv1_clk_mgr_enable_pme_wa, };static struct clk_mgr_internal_funcs rv1_clk_internal_funcs = {
Signature · 1 line
2.39.2
PATCH 3/3 drm/amd/display: add prefix to rv1_clk_mgr_vbios_smu.c functions
In reply to David TadokoroThe functions defined in dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c don't have names that indicate where they were declared.
To better filter results in debug tools like ftrace, prefix these functions with 'rv1_clk_mgr_vbios_smu_'.
--- .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c | 14 +++++++------- .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c +1 -1
@@ -312,7 +312,7 @@ static struct clk_mgr_funcs rv1_clk_funcs = { };static struct clk_mgr_internal_funcs rv1_clk_internal_funcs = { - .set_dispclk = rv1_vbios_smu_set_dispclk, + .set_dispclk = rv1_clk_mgr_vbios_smu_set_dispclk, .set_dprefclk = dce112_set_dprefclk };
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c +7 -7
@@ -83,7 +83,7 @@ static const struct IP_BASE MP1_BASE = { { { { 0x00016000, 0, 0, 0, 0 } },* the register is NOT EQUAL to zero, and because the translation in msg_if.h * won't work with REG_WAIT. */ -static uint32_t rv1_smu_wait_for_response (struct clk_mgr_internal *clk_mgr,unsigned int delay_us,unsigned int max_retries) +static uint32_t rv1_clk_mgr_vbios_smu_wait_for_response (struct clk_mgr_internal *clk_mgr,unsigned int delay_us,unsigned int max_retries) {uint32_t res_val = VBIOSSMC_Status_BUSY;
@@ -101,7 +101,7 @@ static uint32_t rv1_smu_wait_for_response(struct clk_mgr_internal *clk_mgr, unsireturn res_val; } -static int rv1_vbios_smu_send_msg_with_param (struct clk_mgr_internal *clk_mgr, +static int rv1_clk_mgr_vbios_smu_send_msg_with_param (struct clk_mgr_internal *clk_mgr,unsigned int msg_id,unsigned int param) {uint32_t result;
@@ -115,7 +115,7 @@ static int rv1_vbios_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,/* Trigger the message transaction by writing the message ID */ REG_WRITE (MP1_SMN_C2PMSG_67 , msg_id); - result =rv1_smu_wait_for_response (clk_mgr,10 ,1000 ); + result =rv1_clk_mgr_vbios_smu_wait_for_response (clk_mgr,10 ,1000 );ASSERT (result == VBIOSSMC_Result_OK);
@@ -123,14 +123,14 @@ static int rv1_vbios_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,return REG_READ (MP1_SMN_C2PMSG_83 ); } -int rv1_vbios_smu_set_dispclk (struct clk_mgr_internal *clk_mgr,int requested_dispclk_khz) +int rv1_clk_mgr_vbios_smu_set_dispclk (struct clk_mgr_internal *clk_mgr,int requested_dispclk_khz) {int actual_dispclk_set_mhz =-1 ;struct dc *dc = clk_mgr->base.ctx->dc;struct dmcu *dmcu = dc->res_pool->dmcu;/* Unit of SMU msg parameter is Mhz */ - actual_dispclk_set_mhz =rv1_vbios_smu_send_msg_with_param ( + actual_dispclk_set_mhz =rv1_clk_mgr_vbios_smu_send_msg_with_param ( clk_mgr, VBIOSSMC_MSG_SetDispclkFreq,khz_to_mhz_ceil (requested_dispclk_khz));
@@ -144,11 +144,11 @@ int rv1_vbios_smu_set_dispclk(struct clk_mgr_internal *clk_mgr, int requested_direturn actual_dispclk_set_mhz *1000 ; } -int rv1_vbios_smu_set_dprefclk (struct clk_mgr_internal *clk_mgr) +int rv1_clk_mgr_vbios_smu_set_dprefclk (struct clk_mgr_internal *clk_mgr) {int actual_dprefclk_set_mhz =-1 ; - actual_dprefclk_set_mhz =rv1_vbios_smu_send_msg_with_param ( + actual_dprefclk_set_mhz =rv1_clk_mgr_vbios_smu_send_msg_with_param ( clk_mgr, VBIOSSMC_MSG_SetDprefclkFreq,khz_to_mhz_ceil (clk_mgr->base.dprefclk_khz));
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.h +2 -2
@@ -26,7 +26,7 @@#ifndef DAL_DC_DCN10_RV1_CLK_MGR_VBIOS_SMU_H_ #define DAL_DC_DCN10_RV1_CLK_MGR_VBIOS_SMU_H_ -int rv1_vbios_smu_set_dispclk (struct clk_mgr_internal *clk_mgr,int requested_dispclk_khz); -int rv1_vbios_smu_set_dprefclk (struct clk_mgr_internal *clk_mgr); +int rv1_clk_mgr_vbios_smu_set_dispclk (struct clk_mgr_internal *clk_mgr,int requested_dispclk_khz); +int rv1_clk_mgr_vbios_smu_set_dprefclk (struct clk_mgr_internal *clk_mgr);#endif /* DAL_DC_DCN10_RV1_CLK_MGR_VBIOS_SMU_H_ */
Signature · 1 line
2.39.2