|
4 | 4 |
|
5 | 5 | #include "dc.h" |
6 | 6 | #include "dc_dmub_srv.h" |
7 | | -#include "dc_dp_types.h" |
8 | 7 | #include "dmub/dmub_srv.h" |
9 | 8 | #include "core_types.h" |
10 | 9 | #include "dmub_replay.h" |
@@ -44,45 +43,21 @@ static void dmub_replay_get_state(struct dmub_replay *dmub, enum replay_state *s |
44 | 43 | /* |
45 | 44 | * Enable/Disable Replay. |
46 | 45 | */ |
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) |
49 | 47 | { |
50 | 48 | union dmub_rb_cmd cmd; |
51 | 49 | struct dc_context *dc = dmub->ctx; |
52 | 50 | uint32_t retry_count; |
53 | 51 | 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; |
57 | 52 |
|
58 | 53 | memset(&cmd, 0, sizeof(cmd)); |
59 | 54 | cmd.replay_enable.header.type = DMUB_CMD__REPLAY; |
60 | 55 | cmd.replay_enable.data.panel_inst = panel_inst; |
61 | 56 |
|
62 | 57 | cmd.replay_enable.header.sub_type = DMUB_CMD__REPLAY_ENABLE; |
63 | | - if (enable) { |
| 58 | + if (enable) |
64 | 59 | 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 |
86 | 61 | cmd.replay_enable.data.enable = REPLAY_DISABLE; |
87 | 62 |
|
88 | 63 | 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, |
174 | 149 | copy_settings_data->digbe_inst = replay_context->digbe_inst; |
175 | 150 | copy_settings_data->digfe_inst = replay_context->digfe_inst; |
176 | 151 |
|
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 | | - |
188 | 152 | if (pipe_ctx->plane_res.dpp) |
189 | 153 | copy_settings_data->dpp_inst = pipe_ctx->plane_res.dpp->inst; |
190 | 154 | else |
@@ -247,7 +211,6 @@ static void dmub_replay_set_coasting_vtotal(struct dmub_replay *dmub, |
247 | 211 | pCmd->header.type = DMUB_CMD__REPLAY; |
248 | 212 | pCmd->header.sub_type = DMUB_CMD__REPLAY_SET_COASTING_VTOTAL; |
249 | 213 | pCmd->header.payload_bytes = sizeof(struct dmub_cmd_replay_set_coasting_vtotal_data); |
250 | | - pCmd->replay_set_coasting_vtotal_data.panel_inst = panel_inst; |
251 | 214 | pCmd->replay_set_coasting_vtotal_data.coasting_vtotal = (coasting_vtotal & 0xFFFF); |
252 | 215 | pCmd->replay_set_coasting_vtotal_data.coasting_vtotal_high = (coasting_vtotal & 0xFFFF0000) >> 16; |
253 | 216 |
|
|
0 commit comments