bool (*edp_set_replay_allow_active)(struct dc_link *dc_link,
const bool *enable, bool wait, bool force_static,
const unsigned int *power_opts);
- bool (*dp_setup_replay)(struct dc_link *link,
- const struct dc_stream_state *stream);
bool (*edp_send_replay_cmd)(struct dc_link *link,
enum replay_FW_Message_type msg,
union dmub_replay_cmd_set *cmd_data);
bool (*edp_receiver_ready_T9)(struct dc_link *link);
bool (*edp_receiver_ready_T7)(struct dc_link *link);
bool (*edp_power_alpm_dpcd_enable)(struct dc_link *link, bool enable);
+ bool (*dp_setup_replay)(struct dc_link *link, const struct dc_stream_state *stream);
+ bool (*dp_pr_get_panel_inst)(const struct dc *dc, const struct dc_link *link, unsigned int *inst_out);
bool (*dp_pr_enable)(struct dc_link *link, bool enable);
bool (*dp_pr_update_state)(struct dc_link *link, struct dmub_cmd_pr_update_state_data *update_state_data);
bool (*dp_pr_set_general_cmd)(struct dc_link *link, struct dmub_cmd_pr_general_cmd_data *general_cmd_data);
if (!replay)
return false;
- if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
+ if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
replay_context.aux_inst = link->ddc->ddc_pin->hw_info.ddc_channel;
link->replay_settings.replay_feature_enabled = dp_pr_copy_settings(link, &replay_context);
if (link->replay_settings.replay_feature_enabled) {
- pr_config_1.bits.PANEL_REPLAY_ENABLE = 1;
- pr_config_1.bits.PANEL_REPLAY_CRC_ENABLE = 1;
- pr_config_1.bits.IRQ_HPD_ASSDP_MISSING = 1;
- pr_config_1.bits.IRQ_HPD_VSCSDP_UNCORRECTABLE_ERROR = 1;
- pr_config_1.bits.IRQ_HPD_RFB_ERROR = 1;
- pr_config_1.bits.IRQ_HPD_ACTIVE_FRAME_CRC_ERROR = 1;
- pr_config_1.bits.PANEL_REPLAY_SELECTIVE_UPDATE_ENABLE = 1;
- pr_config_1.bits.PANEL_REPLAY_EARLY_TRANSPORT_ENABLE = 1;
+ if (dc_is_embedded_signal(link->connector_signal)) {
+ pr_config_1.bits.PANEL_REPLAY_ENABLE = 1;
+ pr_config_1.bits.PANEL_REPLAY_CRC_ENABLE = 1;
+ pr_config_1.bits.IRQ_HPD_ASSDP_MISSING = 1;
+ pr_config_1.bits.IRQ_HPD_VSCSDP_UNCORRECTABLE_ERROR = 1;
+ pr_config_1.bits.IRQ_HPD_RFB_ERROR = 1;
+ pr_config_1.bits.IRQ_HPD_ACTIVE_FRAME_CRC_ERROR = 1;
+ pr_config_1.bits.PANEL_REPLAY_SELECTIVE_UPDATE_ENABLE = 1;
+ pr_config_1.bits.PANEL_REPLAY_EARLY_TRANSPORT_ENABLE = 1;
+ } else {
+ pr_config_1.bits.PANEL_REPLAY_ENABLE = 1;
+ }
pr_config_2.bits.SINK_REFRESH_RATE_UNLOCK_GRANTED = 0;
return true;
}
+
+bool dp_pr_get_panel_inst(const struct dc *dc,
+ const struct dc_link *link,
+ unsigned int *inst_out)
+{
+ if (dc_is_embedded_signal(link->connector_signal)) {
+ /* TODO: just get edp link panel inst for now, fix it */
+ return dc_get_edp_link_panel_inst(dc, link, inst_out);
+ } else if (dc_is_dp_sst_signal(link->connector_signal)) {
+ /* TODO: just set to 1 for now, fix it */
+ *inst_out = 1;
+ return true;
+ }
+
+ return false;
+}
+
bool dp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream)
{
if (!link)
unsigned int panel_inst = 0;
union dmub_rb_cmd cmd;
- if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
+ if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
if (link->replay_settings.replay_allow_active != enable) {
union dmub_rb_cmd cmd;
struct pipe_ctx *pipe_ctx = NULL;
- if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
+ if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
for (unsigned int i = 0; i < MAX_PIPES; i++) {
if (dc->current_state->res_ctx.pipe_ctx[i].stream &&
dc->current_state->res_ctx.pipe_ctx[i].stream->link &&
dc->current_state->res_ctx.pipe_ctx[i].stream->link == link &&
- dc->current_state->res_ctx.pipe_ctx[i].stream->link->connector_signal == SIGNAL_TYPE_EDP) {
+ dc_is_dp_sst_signal(dc->current_state->res_ctx.pipe_ctx[i].stream->link->connector_signal)) {
pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i];
- //TODO: refactor for multi edp support
+ /* todo: need update for MST */
break;
}
}
unsigned int panel_inst = 0;
union dmub_rb_cmd cmd;
- if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
+ if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
memset(&cmd, 0, sizeof(cmd));
unsigned int panel_inst = 0;
union dmub_rb_cmd cmd;
- if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
+ if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
memset(&cmd, 0, sizeof(cmd));
uint32_t retry_count = 0;
uint32_t replay_state = 0;
- if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
+ if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
return false;
do {