From: Eric Yang <eric.ya...@amd.com>

[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.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlaus...@amd.com>
Acked-by: Rodrigo Siqueira <rodrigo.sique...@amd.com>
Signed-off-by: Eric Yang <eric.ya...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 6 +++++-
 drivers/gpu/drm/amd/display/dc/dc.h                      | 1 +
 drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c    | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c 
b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
index 1c0415366216..9b4836350547 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
@@ -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
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h 
b/drivers/gpu/drm/amd/display/dc/dc.h
index 69cf78fe78cf..4f9dacd09856 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -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
diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c 
b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c
index 40778c05f9b3..7f9ceda4229b 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c
@@ -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 = {
-- 
2.25.1

Reply via email to