pipe->stream_res.pix_clk_params.requested_pix_clk_100hz;
if (pix_clk_100hz != requested_pix_clk_100hz) {
- core_link_disable_stream(pipe);
+ if (dc->hwss.update_phy_state)
+ dc->hwss.update_phy_state(dc->current_state,
+ pipe, TX_OFF_SYMCLK_OFF);
+ else
+ core_link_disable_stream(pipe);
pipe->stream->dpms_off = false;
}
}
if (stream_update->dpms_off) {
if (*stream_update->dpms_off) {
- core_link_disable_stream(pipe_ctx);
+ if (dc->hwss.update_phy_state)
+ dc->hwss.update_phy_state(dc->current_state,
+ pipe_ctx, TX_OFF_SYMCLK_ON);
+ else
+ core_link_disable_stream(pipe_ctx);
/* for dpms, keep acquired resources*/
if (pipe_ctx->stream_res.audio && !dc->debug.az_endpoint_mute_only)
pipe_ctx->stream_res.audio->funcs->az_disable(pipe_ctx->stream_res.audio);
if (get_seamless_boot_stream_count(context) == 0)
dc->hwss.prepare_bandwidth(dc, dc->current_state);
- core_link_enable_stream(dc->current_state, pipe_ctx);
+ if (dc->hwss.update_phy_state)
+ dc->hwss.update_phy_state(dc->current_state,
+ pipe_ctx, TX_ON_SYMCLK_ON);
+ else
+ core_link_enable_stream(dc->current_state, pipe_ctx);
}
}
pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx && pipe_ctx->stream && !pipe_ctx->stream->dpms_off &&
pipe_ctx->stream->link == link && !pipe_ctx->prev_odm_pipe) {
- core_link_disable_stream(pipe_ctx);
+ if (link->dc->hwss.update_phy_state)
+ link->dc->hwss.update_phy_state(link->dc->current_state,
+ pipe_ctx, TX_OFF_SYMCLK_OFF);
+ else
+ core_link_disable_stream(pipe_ctx);
}
}
pipe_ctx = &link->dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx && pipe_ctx->stream && !pipe_ctx->stream->dpms_off &&
pipe_ctx->stream->link == link && !pipe_ctx->prev_odm_pipe) {
- core_link_enable_stream(link->dc->current_state, pipe_ctx);
+ if (link->dc->hwss.update_phy_state)
+ link->dc->hwss.update_phy_state(link->dc->current_state,
+ pipe_ctx, TX_ON_SYMCLK_ON);
+ else
+ core_link_enable_stream(link->dc->current_state, pipe_ctx);
}
}
}
struct gpio *hpd_gpio;
enum dc_link_fec_state fec_state;
+ enum phy_state phy_state;
};
const struct dc_link_status *dc_link_get_status(const struct dc_link *dc_link);
if (dc_is_dp_signal(pipe_ctx->stream->signal))
dp_source_sequence_trace(link, DPCD_SOURCE_SEQ_AFTER_CONNECT_DIG_FE_OTG);
- if (!stream->dpms_off)
- core_link_enable_stream(context, pipe_ctx);
+ if (!stream->dpms_off) {
+ if (dc->hwss.update_phy_state)
+ dc->hwss.update_phy_state(context, pipe_ctx, TX_ON_SYMCLK_ON);
+ else
+ core_link_enable_stream(context, pipe_ctx);
+ }
/* DCN3.1 FPGA Workaround
* Need to enable HPO DP Stream Encoder before setting OTG master enable.
* screen only, the dpms_off would be true but
* VBIOS lit up eDP, so check link status too.
*/
- if (!pipe_ctx->stream->dpms_off || link->link_status.link_active)
- core_link_disable_stream(pipe_ctx);
- else if (pipe_ctx->stream_res.audio)
+ if (!pipe_ctx->stream->dpms_off || link->link_status.link_active) {
+ if (dc->hwss.update_phy_state)
+ dc->hwss.update_phy_state(dc->current_state, pipe_ctx, TX_OFF_SYMCLK_OFF);
+ else
+ core_link_disable_stream(pipe_ctx);
+ } else if (pipe_ctx->stream_res.audio)
dc->hwss.disable_audio_stream(pipe_ctx);
/* free acquired resources */
* screen only, the dpms_off would be true but
* VBIOS lit up eDP, so check link status too.
*/
- if (!pipe_ctx->stream->dpms_off || link->link_status.link_active)
- core_link_disable_stream(pipe_ctx);
- else if (pipe_ctx->stream_res.audio)
+ if (!pipe_ctx->stream->dpms_off || link->link_status.link_active) {
+ if (dc->hwss.update_phy_state)
+ dc->hwss.update_phy_state(dc->current_state, pipe_ctx, TX_OFF_SYMCLK_OFF);
+ else
+ core_link_disable_stream(pipe_ctx);
+ } else if (pipe_ctx->stream_res.audio)
dc->hwss.disable_audio_stream(pipe_ctx);
/* free acquired resources */
return true;
return false;
}
+
+void dcn32_update_phy_state(struct dc_state *state, struct pipe_ctx *pipe_ctx,
+ enum phy_state target_state)
+{
+ enum phy_state current_state = pipe_ctx->stream->link->phy_state;
+
+ if (current_state == target_state) {
+ BREAK_TO_DEBUGGER();
+ return;
+ }
+
+ if (target_state == TX_OFF_SYMCLK_OFF) {
+ core_link_disable_stream(pipe_ctx);
+ pipe_ctx->stream->link->phy_state = TX_OFF_SYMCLK_OFF;
+ } else if (target_state == TX_ON_SYMCLK_ON) {
+ core_link_enable_stream(state, pipe_ctx);
+ pipe_ctx->stream->link->phy_state = TX_ON_SYMCLK_ON;
+ } else if (target_state == TX_OFF_SYMCLK_ON) {
+ if (current_state == TX_ON_SYMCLK_ON) {
+ core_link_disable_stream(pipe_ctx);
+ pipe_ctx->stream->link->phy_state = TX_OFF_SYMCLK_OFF;
+ }
+
+ pipe_ctx->clock_source->funcs->program_pix_clk(
+ pipe_ctx->clock_source,
+ &pipe_ctx->stream_res.pix_clk_params,
+ dp_get_link_encoding_format(&pipe_ctx->link_config.dp_link_settings),
+ &pipe_ctx->pll_settings);
+ pipe_ctx->stream->link->phy_state = TX_OFF_SYMCLK_ON;
+ } else
+ BREAK_TO_DEBUGGER();
+}
bool dcn32_is_dp_dig_pixel_rate_div_policy(struct pipe_ctx *pipe_ctx);
+void dcn32_update_phy_state(struct dc_state *state, struct pipe_ctx *pipe_ctx,
+ enum phy_state target_state);
+
#endif /* __DC_HWSS_DCN32_H__ */
.commit_subvp_config = dcn32_commit_subvp_config,
.subvp_pipe_control_lock = dcn32_subvp_pipe_control_lock,
.update_visual_confirm_color = dcn20_update_visual_confirm_color,
+ .update_phy_state = dcn32_update_phy_state,
};
static const struct hwseq_private_funcs dcn32_private_funcs = {
LUT_RAM_B
};
+enum phy_state {
+ TX_OFF_SYMCLK_OFF,
+ TX_ON_SYMCLK_ON,
+ TX_OFF_SYMCLK_ON
+};
+
/**
* speakersToChannels
*
struct tg_color *color,
int mpcc_id);
+ void (*update_phy_state)(struct dc_state *state, struct pipe_ctx *pipe_ctx, enum phy_state target_state);
+
void (*commit_subvp_config)(struct dc *dc, struct dc_state *context);
void (*subvp_pipe_control_lock)(struct dc *dc,
struct dc_state *context,