summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorPiotr Maziarz <piotr.maziarz@amd.com>2026-09-10 11:16:12 +0200
committerAlex Deucher <alexander.deucher@amd.com>2026-10-01 11:35:47 -0400
commit820be7aab9527108c51c2f1a089491d03d24470f (patch)
tree8647955f4841432ab321b6713278e59994ed8e1e /drivers/gpu
parentbbf2814d832a09c0a000398b6cf3daff4cc06ace (diff)
drm/amd/display: Remove OPP_SET_MPCC_DISCONNECT_PENDING
[WHY] The operation wrote no hardware register. Its executor only set opp->mpcc_disconnect_pending, a driver side flag, which breaks the rule that a block sequence step programs a hardware block rather than mutating logical objects. It was also split across phases: written while the pre-unlock sequence executed, then read and cleared while the post-unlock sequence was still being built. [HOW] Deleted the enum value, the params struct, the add helper, the executor and the dispatch case. dcn401_plane_atomic_disconnect_sequence now sets the flag during the build phase, matching what dcn10, dcn20, dcn201, dcn35, dcn3ag and dcn42b already do. Updated the operation specs and the core_gtest dumper. Signed-off-by: Piotr Maziarz <piotr.maziarz@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c24
-rw-r--r--drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c6
-rw-r--r--drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h13
3 files changed, 4 insertions, 39 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 e1d6e31af657..5e41792c622a 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
@@ -1888,9 +1888,6 @@ void hwss_execute_sequence(struct dc *dc,
case MPC_REMOVE_MPCC:
hwss_mpc_remove_mpcc(params);
break;
- case OPP_SET_MPCC_DISCONNECT_PENDING:
- hwss_opp_set_mpcc_disconnect_pending(params);
- break;
case DC_SET_OPTIMIZED_REQUIRED:
hwss_dc_set_optimized_required(params);
break;
@@ -3581,15 +3578,6 @@ void hwss_mpc_remove_mpcc(union block_sequence_params *params)
mpc->funcs->remove_mpcc(mpc, mpc_tree_params, mpcc_to_remove);
}
-void hwss_opp_set_mpcc_disconnect_pending(union block_sequence_params *params)
-{
- struct output_pixel_processor *opp = params->opp_set_mpcc_disconnect_pending_params.opp;
- int mpcc_inst = params->opp_set_mpcc_disconnect_pending_params.mpcc_inst;
- bool pending = params->opp_set_mpcc_disconnect_pending_params.pending;
-
- opp->mpcc_disconnect_pending[mpcc_inst] = pending;
-}
-
void hwss_dc_set_optimized_required(union block_sequence_params *params)
{
struct dc *dc = params->dc_set_optimized_required_params.dc;
@@ -4773,18 +4761,6 @@ void hwss_add_mpc_remove_mpcc(struct block_sequence_state *seq_state,
}
}
-void hwss_add_opp_set_mpcc_disconnect_pending(struct block_sequence_state *seq_state,
- struct output_pixel_processor *opp, int mpcc_inst, bool pending)
-{
- if (*seq_state->num_steps < MAX_HWSS_BLOCK_SEQUENCE_SIZE) {
- seq_state->steps[*seq_state->num_steps].func = OPP_SET_MPCC_DISCONNECT_PENDING;
- seq_state->steps[*seq_state->num_steps].params.opp_set_mpcc_disconnect_pending_params.opp = opp;
- seq_state->steps[*seq_state->num_steps].params.opp_set_mpcc_disconnect_pending_params.mpcc_inst = mpcc_inst;
- seq_state->steps[*seq_state->num_steps].params.opp_set_mpcc_disconnect_pending_params.pending = pending;
- (*seq_state->num_steps)++;
- }
-}
-
void hwss_add_hubp_disconnect(struct block_sequence_state *seq_state,
struct hubp *hubp)
{
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
index c82f941f42ec..b7680326f495 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
@@ -3301,8 +3301,10 @@ void dcn401_plane_atomic_disconnect_sequence(struct dc *dc,
// Phantom pipes have OTG disabled by default, so MPCC_STATUS will never assert idle,
// so don't wait for MPCC_IDLE in the programming sequence
if (dc_state_get_pipe_subvp_type(state, pipe_ctx) != SUBVP_PHANTOM) {
- /* Step 2: Set MPCC disconnect pending flag */
- hwss_add_opp_set_mpcc_disconnect_pending(seq_state, opp, pipe_ctx->plane_res.mpcc_inst, true);
+ /* Step 2: Set MPCC disconnect pending flag. Set here rather than as a sequence step
+ * because the post-unlock build phase reads it to decide what to emit.
+ */
+ opp->mpcc_disconnect_pending[pipe_ctx->plane_res.mpcc_inst] = true;
}
/* Step 3: Set optimized required flag */
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 d7ab21c5a1e4..9ad18c9dcff9 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
@@ -486,12 +486,6 @@ struct mpc_remove_mpcc_params {
struct mpcc *mpcc_to_remove;
};
-struct opp_set_mpcc_disconnect_pending_params {
- struct output_pixel_processor *opp;
- int mpcc_inst;
- bool pending;
-};
-
struct dc_set_optimized_required_params {
struct dc *dc;
bool optimized_required;
@@ -1128,7 +1122,6 @@ union block_sequence_params {
struct set_abm_immediate_disable_params set_abm_immediate_disable_params;
struct set_disp_pattern_generator_params set_disp_pattern_generator_params;
struct mpc_remove_mpcc_params mpc_remove_mpcc_params;
- struct opp_set_mpcc_disconnect_pending_params opp_set_mpcc_disconnect_pending_params;
struct dc_set_optimized_required_params dc_set_optimized_required_params;
struct hubp_disconnect_params hubp_disconnect_params;
struct hubbub_force_pstate_change_control_params hubbub_force_pstate_change_control_params;
@@ -1299,7 +1292,6 @@ enum block_sequence_func {
ABM_SET_LEVEL,
ABM_SET_IMMEDIATE_DISABLE,
MPC_REMOVE_MPCC,
- OPP_SET_MPCC_DISCONNECT_PENDING,
DC_SET_OPTIMIZED_REQUIRED,
HUBP_DISCONNECT,
HUBBUB_FORCE_PSTATE_CHANGE_CONTROL,
@@ -2007,8 +1999,6 @@ void hwss_set_abm_immediate_disable(union block_sequence_params *params);
void hwss_mpc_remove_mpcc(union block_sequence_params *params);
-void hwss_opp_set_mpcc_disconnect_pending(union block_sequence_params *params);
-
void hwss_dc_set_optimized_required(union block_sequence_params *params);
void hwss_hubp_disconnect(union block_sequence_params *params);
@@ -2323,9 +2313,6 @@ void hwss_add_dsc_calculate_and_set_config(struct block_sequence_state *seq_stat
void hwss_add_mpc_remove_mpcc(struct block_sequence_state *seq_state,
struct mpc *mpc, struct mpc_tree *mpc_tree_params, struct mpcc *mpcc_to_remove);
-void hwss_add_opp_set_mpcc_disconnect_pending(struct block_sequence_state *seq_state,
- struct output_pixel_processor *opp, int mpcc_inst, bool pending);
-
void hwss_add_hubp_disconnect(struct block_sequence_state *seq_state,
struct hubp *hubp);