drm/amd/display: Adding a dc_debug option and dmub setting to use PHY FSM for PSR
authorShah Dharati <dharati.shah@amd.com>
Wed, 16 Feb 2022 19:17:41 +0000 (14:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Mar 2022 23:40:05 +0000 (18:40 -0500)
[Why]
PSR Power on/off is done in PSR. Add a dc_debug option
and dmub setting to use PHY implementation of this instead.

[How]
Add a dc_debug option and dmub setting to use
PHY FSM Power up/down for PSR.

Co-authored-by: Shah Dharati <dharati.shah@amd.com>
Reviewed-by: Hansen Dsouza <hansen.dsouza@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Shah Dharati <dharati.shah@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/dc.h
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h

index 55d43d642b38dbdafe6addb0fd8e0eff87430456..7c8b6e1a9c9eec510b2413f252ee5624743cb8eb 100644 (file)
@@ -710,6 +710,7 @@ struct dc_debug_options {
 #endif
        bool apply_vendor_specific_lttpr_wa;
        bool ignore_dpref_ss;
+       uint8_t psr_power_use_phy_fsm;
 };
 
 struct gpu_info_soc_bounding_box_v1_0;
index 8bd265b40847076999456edf6c504e39f141bb0e..312c681726892d628106209ab0eb0ebfc76c0d4a 100644 (file)
@@ -320,6 +320,7 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub,
                copy_settings_data->otg_inst                    = 0;
 
        // Misc
+       copy_settings_data->use_phy_fsm             = link->ctx->dc->debug.psr_power_use_phy_fsm;
        copy_settings_data->psr_level                           = psr_context->psr_level.u32all;
        copy_settings_data->smu_optimizations_en                = psr_context->allow_smu_optimizations;
        copy_settings_data->multi_disp_optimizations_en = psr_context->allow_multi_disp_optimizations;
index a710734828816445c40ff3224f974477a2ba5021..9a035e517ca907061856753a96fbf416346f823d 100644 (file)
@@ -1035,6 +1035,7 @@ static const struct dc_debug_options debug_defaults_drv = {
        },
        .optimize_edp_link_rate = true,
        .enable_sw_cntl_psr = true,
+       .psr_power_use_phy_fsm = 0,
 };
 
 static const struct dc_debug_options debug_defaults_diags = {
index 34fb148474cc305d17d825c02ac369958bf9d030..1377cde0a7e1f6252709cd0dc4d6aa1b9333591f 100644 (file)
@@ -1560,10 +1560,14 @@ struct dmub_cmd_psr_copy_settings_data {
         * DSC enable status in driver
         */
        uint8_t dsc_enable_status;
+       /*
+        * Use FSM state for PSR power up/down
+        */
+       uint8_t use_phy_fsm;
        /**
-        * Explicit padding to 3 byte boundary.
+        * Explicit padding to 2 byte boundary.
         */
-       uint8_t pad3[3];
+       uint8_t pad3[2];
 };
 
 /**