drm/amd/display: Removed power down on boot from DCN31
authorLai, Derek <Derek.Lai@amd.com>
Tue, 28 Sep 2021 05:58:56 +0000 (13:58 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Oct 2021 21:18:31 +0000 (17:18 -0400)
[Why]
Error message on Linux when booting.

[How]
Removed power down on boot from DCN31 HW init
to match DCN10 HW init.

Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Agustin Gutierrez Sanchez <agustin.gutierrez@amd.com>
Signed-off-by: Derek Lai <derek.lai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c

index 968b882..52947c0 100644 (file)
@@ -73,7 +73,6 @@ void dcn31_init_hw(struct dc *dc)
        struct resource_pool *res_pool = dc->res_pool;
        uint32_t backlight = MAX_BACKLIGHT_LEVEL;
        int i;
-       int edp_num;
 
        if (dc->clk_mgr && dc->clk_mgr->funcs->init_clocks)
                dc->clk_mgr->funcs->init_clocks(dc->clk_mgr);
@@ -209,48 +208,6 @@ void dcn31_init_hw(struct dc *dc)
                                        !dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
        }
 
-       /* In headless boot cases, DIG may be turned
-        * on which causes HW/SW discrepancies.
-        * To avoid this, power down hardware on boot
-        * if DIG is turned on and seamless boot not enabled
-        */
-       if (dc->config.power_down_display_on_boot) {
-               struct dc_link *edp_links[MAX_NUM_EDP];
-               struct dc_link *edp_link;
-               bool power_down = false;
-
-               get_edp_links(dc, edp_links, &edp_num);
-               if (edp_num) {
-                       for (i = 0; i < edp_num; i++) {
-                               edp_link = edp_links[i];
-                               if (edp_link->link_enc->funcs->is_dig_enabled &&
-                                               edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc) &&
-                                               dc->hwss.edp_backlight_control &&
-                                               dc->hwss.power_down &&
-                                               dc->hwss.edp_power_control) {
-                                       dc->hwss.edp_backlight_control(edp_link, false);
-                                       dc->hwss.power_down(dc);
-                                       dc->hwss.edp_power_control(edp_link, false);
-                                       power_down = true;
-                               }
-                       }
-               }
-               if (!power_down) {
-                       for (i = 0; i < dc->link_count; i++) {
-                               struct dc_link *link = dc->links[i];
-
-                               if (link->ep_type == DISPLAY_ENDPOINT_PHY &&
-                                               link->link_enc->funcs->is_dig_enabled &&
-                                               link->link_enc->funcs->is_dig_enabled(link->link_enc) &&
-                                               dc->hwss.power_down) {
-                                       dc->hwss.power_down(dc);
-                                       break;
-                               }
-
-                       }
-               }
-       }
-
        for (i = 0; i < res_pool->audio_count; i++) {
                struct audio *audio = res_pool->audios[i];