drm/amd/display: exit PSR during detection
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / display / dc / dce110 / dce110_hw_sequencer.c
index 01a924b..021e406 100644 (file)
@@ -944,7 +944,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
 {
        /* notify audio driver for audio modes of monitor */
        struct dc *core_dc;
-       struct pp_smu_funcs *pp_smu = NULL;
        struct clk_mgr *clk_mgr;
        unsigned int i, num_audio = 1;
 
@@ -957,9 +956,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
        if (pipe_ctx->stream_res.audio && pipe_ctx->stream_res.audio->enabled == true)
                return;
 
-       if (core_dc->res_pool->pp_smu)
-               pp_smu = core_dc->res_pool->pp_smu;
-
        if (pipe_ctx->stream_res.audio) {
                for (i = 0; i < MAX_PIPES; i++) {
                        /*current_state not updated yet*/
@@ -984,7 +980,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
 void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx)
 {
        struct dc *dc;
-       struct pp_smu_funcs *pp_smu = NULL;
        struct clk_mgr *clk_mgr;
 
        if (!pipe_ctx || !pipe_ctx->stream)
@@ -1001,9 +996,6 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx)
        if (pipe_ctx->stream_res.audio) {
                pipe_ctx->stream_res.audio->enabled = false;
 
-               if (dc->res_pool->pp_smu)
-                       pp_smu = dc->res_pool->pp_smu;
-
                if (dc_is_dp_signal(pipe_ctx->stream->signal))
                        pipe_ctx->stream_res.stream_enc->funcs->dp_audio_disable(
                                        pipe_ctx->stream_res.stream_enc);
@@ -1418,7 +1410,7 @@ static enum dc_status apply_single_controller_ctx_to_hw(
 
        pipe_ctx->plane_res.scl_data.lb_params.alpha_en = pipe_ctx->bottom_pipe != 0;
 
-       pipe_ctx->stream->link->psr_enabled = false;
+       pipe_ctx->stream->link->psr_feature_enabled = false;
 
        return DC_OK;
 }
@@ -1529,18 +1521,6 @@ static struct dc_stream_state *get_edp_stream(struct dc_state *context)
        return NULL;
 }
 
-static struct dc_link *get_edp_link(struct dc *dc)
-{
-       int i;
-
-       // report any eDP links, even unconnected DDI's
-       for (i = 0; i < dc->link_count; i++) {
-               if (dc->links[i]->connector_signal == SIGNAL_TYPE_EDP)
-                       return dc->links[i];
-       }
-       return NULL;
-}
-
 static struct dc_link *get_edp_link_with_sink(
                struct dc *dc,
                struct dc_state *context)
@@ -1834,7 +1814,7 @@ static bool should_enable_fbc(struct dc *dc,
                return false;
 
        /* PSR should not be enabled */
-       if (pipe_ctx->stream->link->psr_enabled)
+       if (pipe_ctx->stream->link->psr_feature_enabled)
                return false;
 
        /* Nothing to compress */
@@ -2464,7 +2444,6 @@ static void dce110_program_front_end_for_pipe(
                struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
        struct mem_input *mi = pipe_ctx->plane_res.mi;
-       struct pipe_ctx *old_pipe = NULL;
        struct dc_plane_state *plane_state = pipe_ctx->plane_state;
        struct xfm_grph_csc_adjustment adjust;
        struct out_csc_color_matrix tbl_entry;
@@ -2472,9 +2451,6 @@ static void dce110_program_front_end_for_pipe(
        DC_LOGGER_INIT();
        memset(&tbl_entry, 0, sizeof(tbl_entry));
 
-       if (dc->current_state)
-               old_pipe = &dc->current_state->res_ctx.pipe_ctx[pipe_ctx->pipe_idx];
-
        memset(&adjust, 0, sizeof(adjust));
        adjust.gamut_adjust_type = GRAPHICS_GAMUT_ADJUST_TYPE_BYPASS;