drm/amd/display: add debug option for z9 disable interface
authorEric Yang <Eric.Yang2@amd.com>
Sun, 23 Jan 2022 18:20:21 +0000 (13:20 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jan 2022 23:00:36 +0000 (18:00 -0500)
[Why]
To help triage issues and coordinate driver/bios release dependency

[How]
Only enable the new Z9 interface when debug option is set, otherwise
treat Z10 only support case as Zstate disallowed.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c

index 1c04153..9b48363 100644 (file)
@@ -308,12 +308,16 @@ void dcn31_smu_transfer_wm_table_dram_2_smu(struct clk_mgr_internal *clk_mgr)
 
 void dcn31_smu_set_zstate_support(struct clk_mgr_internal *clk_mgr, enum dcn_zstate_support_state support)
 {
-       //TODO: Work with smu team to define optimization options.
        unsigned int msg_id, param;
 
        if (!clk_mgr->smu_present)
                return;
 
+       if (!clk_mgr->base.ctx->dc->debug.enable_z9_disable_interface &&
+                       (support == DCN_ZSTATE_SUPPORT_ALLOW_Z10_ONLY))
+               support = DCN_ZSTATE_SUPPORT_DISALLOW;
+
+
        if (support == DCN_ZSTATE_SUPPORT_ALLOW_Z10_ONLY)
                param = 1;
        else
index 69cf78f..4f9dacd 100644 (file)
@@ -703,6 +703,7 @@ struct dc_debug_options {
        int crb_alloc_policy_min_disp_count;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
        bool disable_z10;
+       bool enable_z9_disable_interface;
        bool enable_sw_cntl_psr;
        union dpia_debug_options dpia_debug;
 #endif
index 8d64187..f9e312b 100644 (file)
@@ -1033,6 +1033,7 @@ static const struct dc_debug_options debug_defaults_drv = {
        .optimize_edp_link_rate = true,
        .enable_sw_cntl_psr = true,
        .apply_vendor_specific_lttpr_wa = true,
+       .enable_z9_disable_interface = false
 };
 
 static const struct dc_debug_options debug_defaults_diags = {