|
@@ -1557,32 +1557,40 @@ static struct dc_link *get_link_for_edp_not_in_use(
|
|
*/
|
|
*/
|
|
void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
|
|
void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
|
|
{
|
|
{
|
|
|
|
+ int i;
|
|
struct dc_link *edp_link_to_turnoff = NULL;
|
|
struct dc_link *edp_link_to_turnoff = NULL;
|
|
struct dc_link *edp_link = get_link_for_edp(dc);
|
|
struct dc_link *edp_link = get_link_for_edp(dc);
|
|
- bool can_eDP_fast_boot_optimize = false;
|
|
|
|
|
|
+ bool can_edp_fast_boot_optimize = false;
|
|
|
|
+ bool apply_edp_fast_boot_optimization = false;
|
|
|
|
|
|
if (edp_link) {
|
|
if (edp_link) {
|
|
/* this seems to cause blank screens on DCE8 */
|
|
/* this seems to cause blank screens on DCE8 */
|
|
if ((dc->ctx->dce_version == DCE_VERSION_8_0) ||
|
|
if ((dc->ctx->dce_version == DCE_VERSION_8_0) ||
|
|
(dc->ctx->dce_version == DCE_VERSION_8_1) ||
|
|
(dc->ctx->dce_version == DCE_VERSION_8_1) ||
|
|
(dc->ctx->dce_version == DCE_VERSION_8_3))
|
|
(dc->ctx->dce_version == DCE_VERSION_8_3))
|
|
- can_eDP_fast_boot_optimize = false;
|
|
|
|
|
|
+ can_edp_fast_boot_optimize = false;
|
|
else
|
|
else
|
|
- can_eDP_fast_boot_optimize =
|
|
|
|
|
|
+ can_edp_fast_boot_optimize =
|
|
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc);
|
|
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc);
|
|
}
|
|
}
|
|
|
|
|
|
- if (can_eDP_fast_boot_optimize) {
|
|
|
|
|
|
+ if (can_edp_fast_boot_optimize)
|
|
edp_link_to_turnoff = get_link_for_edp_not_in_use(dc, context);
|
|
edp_link_to_turnoff = get_link_for_edp_not_in_use(dc, context);
|
|
|
|
|
|
- /* if OS doesn't light up eDP and eDP link is available, we want to disable
|
|
|
|
- * If resume from S4/S5, should optimization.
|
|
|
|
- */
|
|
|
|
- if (!edp_link_to_turnoff)
|
|
|
|
- dc->apply_edp_fast_boot_optimization = true;
|
|
|
|
|
|
+ /* if OS doesn't light up eDP and eDP link is available, we want to disable
|
|
|
|
+ * If resume from S4/S5, should optimization.
|
|
|
|
+ */
|
|
|
|
+ if (can_edp_fast_boot_optimize && !edp_link_to_turnoff) {
|
|
|
|
+ /* Find eDP stream and set optimization flag */
|
|
|
|
+ for (i = 0; i < context->stream_count; i++) {
|
|
|
|
+ if (context->streams[i]->signal == SIGNAL_TYPE_EDP) {
|
|
|
|
+ context->streams[i]->apply_edp_fast_boot_optimization = true;
|
|
|
|
+ apply_edp_fast_boot_optimization = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- if (!dc->apply_edp_fast_boot_optimization) {
|
|
|
|
|
|
+ if (!apply_edp_fast_boot_optimization) {
|
|
if (edp_link_to_turnoff) {
|
|
if (edp_link_to_turnoff) {
|
|
/*turn off backlight before DP_blank and encoder powered down*/
|
|
/*turn off backlight before DP_blank and encoder powered down*/
|
|
dc->hwss.edp_backlight_control(edp_link_to_turnoff, false);
|
|
dc->hwss.edp_backlight_control(edp_link_to_turnoff, false);
|