]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Support multiple options during psr entry.
authorMartin Tsai <Martin.Tsai@amd.com>
Mon, 20 Jan 2025 03:21:46 +0000 (11:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 13 Feb 2025 02:03:00 +0000 (21:03 -0500)
[WHY]
Some panels may not handle idle pattern properly during PSR entry.

[HOW]
Add a condition to allow multiple options on power down
sequence during PSR1 entry.

Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Signed-off-by: Martin Tsai <Martin.Tsai@amd.com>
Signed-off-by: Alex Hung <alex.hung@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_types.h
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h

index 0c2aa91f0a1113b9bfa96f17215b1e57233cf507..e60898c2df01a75b40fd0577f742348134f59dde 100644 (file)
@@ -1033,6 +1033,13 @@ struct psr_settings {
        unsigned int psr_sdp_transmit_line_num_deadline;
        uint8_t force_ffu_mode;
        unsigned int psr_power_opt;
+
+       /**
+        * Some panels cannot handle idle pattern during PSR entry.
+        * To power down phy before disable stream to avoid sending
+        * idle pattern.
+        */
+       uint8_t power_down_phy_before_disable_stream;
 };
 
 enum replay_coasting_vtotal_type {
index 88c75c243bf8aeb8988619abd86cab67dd0baebf..ff3b8244ba3d0bc3b28fcd02d40409692f70380c 100644 (file)
@@ -418,6 +418,10 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub,
        copy_settings_data->relock_delay_frame_cnt = 0;
        if (link->dpcd_caps.sink_dev_id == DP_BRANCH_DEVICE_ID_001CF8)
                copy_settings_data->relock_delay_frame_cnt = 2;
+
+       copy_settings_data->power_down_phy_before_disable_stream =
+               link->psr_settings.power_down_phy_before_disable_stream;
+
        copy_settings_data->dsc_slice_height = psr_context->dsc_slice_height;
 
        dc_wake_and_execute_dmub_cmd(dc, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
index d0fe324cb5371eb7bfe8194c51517db4e107ad02..8cf89aed024b76d0d85129bd0048422387df4735 100644 (file)
@@ -3118,6 +3118,12 @@ struct dmub_cmd_psr_copy_settings_data {
         * Some panels request main link off before xth vertical line
         */
        uint16_t poweroff_before_vertical_line;
+       /**
+        * Some panels cannot handle idle pattern during PSR entry.
+        * To power down phy before disable stream to avoid sending
+        * idle pattern.
+        */
+       uint8_t power_down_phy_before_disable_stream;
 };
 
 /**