From: Piotr Maziarz <[email protected]>

[WHY]
hubbub_force_pstate_change_control_params::wait was passed as the allow
argument of hubbub_funcs::force_pstate_change_control, which drives
DCHUBBUB_ARB_ALLOW_PSTATE_CHANGE_FORCE_VALUE. Sitting three lines above a
udelay(500), the name read as a timing control and invited the wrong
conclusion about what the field does.

[HOW]
Renamed the field to allow and updated the add helper signature, the
executor, the core_gtest dumper and comparator, and the affected
core_golden entry. No functional change.

Signed-off-by: Piotr Maziarz <[email protected]>
Signed-off-by: Fangzhi Zuo <[email protected]>
Reviewed-by: Alvin Lee <[email protected]>
---
 .../drm/amd/display/dc/core/dc_hw_sequencer.c   | 17 ++++++++++-------
 .../gpu/drm/amd/display/dc/hwss/hw_sequencer.h  |  4 ++--
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
index 5e41792c622a..e2cc5ab40b3b 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
@@ -2775,13 +2775,16 @@ void hwss_add_hubp_program_mcache_id(struct 
block_sequence_state *seq_state,
 void hwss_add_hubbub_force_pstate_change_control(struct block_sequence_state 
*seq_state,
                struct hubbub *hubbub,
                bool enable,
-               bool wait)
+               bool allow)
 {
        if (*seq_state->num_steps < MAX_HWSS_BLOCK_SEQUENCE_SIZE) {
-               
seq_state->steps[*seq_state->num_steps].params.hubbub_force_pstate_change_control_params.hubbub
 = hubbub;
-               
seq_state->steps[*seq_state->num_steps].params.hubbub_force_pstate_change_control_params.enable
 = enable;
-               
seq_state->steps[*seq_state->num_steps].params.hubbub_force_pstate_change_control_params.wait
 = wait;
-               seq_state->steps[*seq_state->num_steps].func = 
HUBBUB_FORCE_PSTATE_CHANGE_CONTROL;
+               struct block_sequence *step = 
&seq_state->steps[*seq_state->num_steps];
+               union block_sequence_params *step_params = &step->params;
+
+               step_params->hubbub_force_pstate_change_control_params.hubbub = 
hubbub;
+               step_params->hubbub_force_pstate_change_control_params.enable = 
enable;
+               step_params->hubbub_force_pstate_change_control_params.allow = 
allow;
+               step->func = HUBBUB_FORCE_PSTATE_CHANGE_CONTROL;
                (*seq_state->num_steps)++;
        }
 }
@@ -3598,10 +3601,10 @@ void hwss_hubbub_force_pstate_change_control(union 
block_sequence_params *params
 {
        struct hubbub *hubbub = 
params->hubbub_force_pstate_change_control_params.hubbub;
        bool enable = params->hubbub_force_pstate_change_control_params.enable;
-       bool wait = params->hubbub_force_pstate_change_control_params.wait;
+       bool allow = params->hubbub_force_pstate_change_control_params.allow;
 
        if (hubbub->funcs->force_pstate_change_control) {
-               hubbub->funcs->force_pstate_change_control(hubbub, enable, 
wait);
+               hubbub->funcs->force_pstate_change_control(hubbub, enable, 
allow);
                /* Add delay when enabling pstate change control */
                if (enable)
                        udelay(500);
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h 
b/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
index 9ad18c9dcff9..6f3ec43bf3b0 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
@@ -498,7 +498,7 @@ struct hubp_disconnect_params {
 struct hubbub_force_pstate_change_control_params {
        struct hubbub *hubbub;
        bool enable;
-       bool wait;
+       bool allow;
 };
 
 struct tg_enable_crtc_params {
@@ -2276,7 +2276,7 @@ void hwss_add_hubp_program_mcache_id(struct 
block_sequence_state *seq_state,
                struct hubp *hubp, struct dml2_hubp_pipe_mcache_regs 
*mcache_regs);
 
 void hwss_add_hubbub_force_pstate_change_control(struct block_sequence_state 
*seq_state,
-               struct hubbub *hubbub, bool enable, bool wait);
+               struct hubbub *hubbub, bool enable, bool allow);
 
 void hwss_add_hubp_program_det_segments(struct block_sequence_state *seq_state,
                struct hubbub *hubbub, unsigned int hubp_inst, unsigned int 
det_size);
-- 
2.53.0

Reply via email to