Skip to content

Commit 0aa8664

Browse files
Gabe Teegeralexdeucher
authored andcommitted
drm/amd/display: Revert Add HPO encoder support to Replay
This reverts commits: commit 1f26214 ("drm/amd/display: Add HPO encoder support to Replay") commit 3bfce48 ("drm/amd/display: Add support for Panel Replay on DP1 eDP (panel_inst=1)") due to visual confirm issue. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Gabe Teeger <gabe.teeger@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 92f68f6)
1 parent c17b750 commit 0aa8664

4 files changed

Lines changed: 5 additions & 62 deletions

File tree

drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include "dc.h"
66
#include "dc_dmub_srv.h"
7-
#include "dc_dp_types.h"
87
#include "dmub/dmub_srv.h"
98
#include "core_types.h"
109
#include "dmub_replay.h"
@@ -44,45 +43,21 @@ static void dmub_replay_get_state(struct dmub_replay *dmub, enum replay_state *s
4443
/*
4544
* Enable/Disable Replay.
4645
*/
47-
static void dmub_replay_enable(struct dmub_replay *dmub, bool enable, bool wait, uint8_t panel_inst,
48-
struct dc_link *link)
46+
static void dmub_replay_enable(struct dmub_replay *dmub, bool enable, bool wait, uint8_t panel_inst)
4947
{
5048
union dmub_rb_cmd cmd;
5149
struct dc_context *dc = dmub->ctx;
5250
uint32_t retry_count;
5351
enum replay_state state = REPLAY_STATE_0;
54-
struct pipe_ctx *pipe_ctx = NULL;
55-
struct resource_context *res_ctx = &link->ctx->dc->current_state->res_ctx;
56-
uint8_t i;
5752

5853
memset(&cmd, 0, sizeof(cmd));
5954
cmd.replay_enable.header.type = DMUB_CMD__REPLAY;
6055
cmd.replay_enable.data.panel_inst = panel_inst;
6156

6257
cmd.replay_enable.header.sub_type = DMUB_CMD__REPLAY_ENABLE;
63-
if (enable) {
58+
if (enable)
6459
cmd.replay_enable.data.enable = REPLAY_ENABLE;
65-
// hpo stream/link encoder assignments are not static, need to update everytime we try to enable replay
66-
if (link->cur_link_settings.link_rate >= LINK_RATE_UHBR10) {
67-
for (i = 0; i < MAX_PIPES; i++) {
68-
if (res_ctx &&
69-
res_ctx->pipe_ctx[i].stream &&
70-
res_ctx->pipe_ctx[i].stream->link &&
71-
res_ctx->pipe_ctx[i].stream->link == link &&
72-
res_ctx->pipe_ctx[i].stream->link->connector_signal == SIGNAL_TYPE_EDP) {
73-
pipe_ctx = &res_ctx->pipe_ctx[i];
74-
//TODO: refactor for multi edp support
75-
break;
76-
}
77-
}
78-
79-
if (!pipe_ctx)
80-
return;
81-
82-
cmd.replay_enable.data.hpo_stream_enc_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;
83-
cmd.replay_enable.data.hpo_link_enc_inst = pipe_ctx->link_res.hpo_dp_link_enc->inst;
84-
}
85-
} else
60+
else
8661
cmd.replay_enable.data.enable = REPLAY_DISABLE;
8762

8863
cmd.replay_enable.header.payload_bytes = sizeof(struct dmub_rb_cmd_replay_enable_data);
@@ -174,17 +149,6 @@ static bool dmub_replay_copy_settings(struct dmub_replay *dmub,
174149
copy_settings_data->digbe_inst = replay_context->digbe_inst;
175150
copy_settings_data->digfe_inst = replay_context->digfe_inst;
176151

177-
if (link->cur_link_settings.link_rate >= LINK_RATE_UHBR10) {
178-
if (pipe_ctx->stream_res.hpo_dp_stream_enc)
179-
copy_settings_data->hpo_stream_enc_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;
180-
else
181-
copy_settings_data->hpo_stream_enc_inst = 0;
182-
if (pipe_ctx->link_res.hpo_dp_link_enc)
183-
copy_settings_data->hpo_link_enc_inst = pipe_ctx->link_res.hpo_dp_link_enc->inst;
184-
else
185-
copy_settings_data->hpo_link_enc_inst = 0;
186-
}
187-
188152
if (pipe_ctx->plane_res.dpp)
189153
copy_settings_data->dpp_inst = pipe_ctx->plane_res.dpp->inst;
190154
else
@@ -247,7 +211,6 @@ static void dmub_replay_set_coasting_vtotal(struct dmub_replay *dmub,
247211
pCmd->header.type = DMUB_CMD__REPLAY;
248212
pCmd->header.sub_type = DMUB_CMD__REPLAY_SET_COASTING_VTOTAL;
249213
pCmd->header.payload_bytes = sizeof(struct dmub_cmd_replay_set_coasting_vtotal_data);
250-
pCmd->replay_set_coasting_vtotal_data.panel_inst = panel_inst;
251214
pCmd->replay_set_coasting_vtotal_data.coasting_vtotal = (coasting_vtotal & 0xFFFF);
252215
pCmd->replay_set_coasting_vtotal_data.coasting_vtotal_high = (coasting_vtotal & 0xFFFF0000) >> 16;
253216

drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct dmub_replay_funcs {
1919
void (*replay_get_state)(struct dmub_replay *dmub, enum replay_state *state,
2020
uint8_t panel_inst);
2121
void (*replay_enable)(struct dmub_replay *dmub, bool enable, bool wait,
22-
uint8_t panel_inst, struct dc_link *link);
22+
uint8_t panel_inst);
2323
bool (*replay_copy_settings)(struct dmub_replay *dmub, struct dc_link *link,
2424
struct replay_context *replay_context, uint8_t panel_inst);
2525
void (*replay_set_power_opt)(struct dmub_replay *dmub, unsigned int power_opt,

drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ bool edp_set_replay_allow_active(struct dc_link *link, const bool *allow_active,
944944
// TODO: Handle mux change case if force_static is set
945945
// If force_static is set, just change the replay_allow_active state directly
946946
if (replay != NULL && link->replay_settings.replay_feature_enabled)
947-
replay->funcs->replay_enable(replay, *allow_active, wait, panel_inst, link);
947+
replay->funcs->replay_enable(replay, *allow_active, wait, panel_inst);
948948
link->replay_settings.replay_allow_active = *allow_active;
949949
}
950950

drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4047,14 +4047,6 @@ struct dmub_cmd_replay_copy_settings_data {
40474047
* DIG BE HW instance.
40484048
*/
40494049
uint8_t digbe_inst;
4050-
/**
4051-
* @hpo_stream_enc_inst: HPO stream encoder instance
4052-
*/
4053-
uint8_t hpo_stream_enc_inst;
4054-
/**
4055-
* @hpo_link_enc_inst: HPO link encoder instance
4056-
*/
4057-
uint8_t hpo_link_enc_inst;
40584050
/**
40594051
* AUX HW instance.
40604052
*/
@@ -4159,18 +4151,6 @@ struct dmub_rb_cmd_replay_enable_data {
41594151
* This does not support HDMI/DP2 for now.
41604152
*/
41614153
uint8_t phy_rate;
4162-
/**
4163-
* @hpo_stream_enc_inst: HPO stream encoder instance
4164-
*/
4165-
uint8_t hpo_stream_enc_inst;
4166-
/**
4167-
* @hpo_link_enc_inst: HPO link encoder instance
4168-
*/
4169-
uint8_t hpo_link_enc_inst;
4170-
/**
4171-
* @pad: Align structure to 4 byte boundary.
4172-
*/
4173-
uint8_t pad[2];
41744154
};
41754155

41764156
/**

0 commit comments

Comments
 (0)