OSDN Git Service

drm/amd/display: Prevent Diags from entering S2
authorMikita Lipski <mikita.lipski@amd.com>
Thu, 17 Jun 2021 20:17:09 +0000 (16:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Jul 2021 17:39:25 +0000 (13:39 -0400)
[why]
Lowering clocks when entering S2 Idle state causes DMUB to hang with
Diags.

[how]
Do not enter S2 optimization with Diags on dcn301 to prevent DMUB hang.

Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c

index c636b58..7046da1 100644 (file)
@@ -114,7 +114,7 @@ void vg_update_clocks(struct clk_mgr *clk_mgr_base,
 
                        display_count = vg_get_active_display_cnt_wa(dc, context);
                        /* if we can go lower, go lower */
-                       if (display_count == 0) {
+                       if (display_count == 0 && !IS_DIAG_DC(dc->ctx->dce_environment)) {
                                union display_idle_optimization_u idle_info = { 0 };
 
                                idle_info.idle_info.df_request_disabled = 1;