<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Why not just set <font size="2"><span style="font-size:11pt" class="ContentPasted0">replay_feature_enabled = true;</span></font> to false?<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Li, Sun peng (Leo) <Sunpeng.Li@amd.com><br>
<b>Sent:</b> October 3, 2023 11:20 AM<br>
<b>To:</b> Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; LIPSKI, IVAN <IVAN.LIPSKI@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Chung, ChiaHsuan (Tom) <ChiaHsuan.Chung@amd.com><br>
<b>Subject:</b> Re: [PATCH v2] Revert "drm/amd/display: Enable Replay for static screen use cases"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
On 2023-10-03 11:13, Lakha, Bhawanpreet wrote:<br>
> [AMD Official Use Only - General]<br>
> <br>
> <br>
> Any reason for reverting this instead of looking into <br>
> "amdgpu_dm_setup_replay()" and "replay_feature_enabled" to see why reply <br>
> is being enabled?<br>
<br>
It causes a regression in amd_psr. Unless there's a quick fix, we should<br>
revert for now. It sounds like this can break existing support for<br>
PSR/PSR SU.<br>
<br>
Acked-by: Leo Li <sunpeng.li@amd.com><br>
<br>
- Leo<br>
<br>
> <br>
> Bhawan<br>
> ------------------------------------------------------------------------<br>
> *From:* LIPSKI, IVAN <IVAN.LIPSKI@amd.com><br>
> *Sent:* October 2, 2023 1:47 PM<br>
> *To:* amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
> *Cc:* Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Mahfooz, Hamza <br>
> <Hamza.Mahfooz@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; <br>
> Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Deucher, Alexander <br>
> <Alexander.Deucher@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; <br>
> Chung, ChiaHsuan (Tom) <ChiaHsuan.Chung@amd.com>; LIPSKI, IVAN <br>
> <IVAN.LIPSKI@amd.com>; LIPSKI, IVAN <IVAN.LIPSKI@amd.com><br>
> *Subject:* [PATCH v2] Revert "drm/amd/display: Enable Replay for static <br>
> screen use cases"<br>
> From: Ivan Lipski <ivlipski@amd.com><br>
> <br>
> This reverts commit a92da5bc33ea99a861f6c422192af6072c145d2d.<br>
> <br>
> V2: Reword commit message<br>
> <br>
> [WHY]<br>
> This commit caused regression in which eDP's with PSR support,<br>
> but no Replay support (Sink support <= 0x03), failed enabling PSR<br>
> and all IGT amd_psr tests.<br>
> <br>
> [HOW]<br>
> Reverted the patch.<br>
> <br>
> Signed-off-by: Ivan Lipski <ivlipskI@amd.com><br>
> ---<br>
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 -------------------<br>
> .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 9 +-------<br>
> drivers/gpu/drm/amd/include/amd_shared.h | 2 --<br>
> 3 files changed, 1 insertion(+), 33 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c <br>
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> index 32156609fbcf..f69b2e9ecd98 100644<br>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> @@ -66,7 +66,6 @@<br>
> #include "amdgpu_dm_debugfs.h"<br>
> #endif<br>
> #include "amdgpu_dm_psr.h"<br>
> -#include "amdgpu_dm_replay.h"<br>
> <br>
> #include "ivsrcid/ivsrcid_vislands30.h"<br>
> <br>
> @@ -4423,7 +4422,6 @@ static int amdgpu_dm_initialize_drm_device(struct <br>
> amdgpu_device *adev)<br>
> enum dc_connection_type new_connection_type = dc_connection_none;<br>
> const struct dc_plane_cap *plane;<br>
> bool psr_feature_enabled = false;<br>
> - bool replay_feature_enabled = false;<br>
> int max_overlay = dm->dc->caps.max_slave_planes;<br>
> <br>
> dm->display_indexes_num = dm->dc->caps.max_streams;<br>
> @@ -4535,21 +4533,6 @@ static int amdgpu_dm_initialize_drm_device(struct <br>
> amdgpu_device *adev)<br>
> }<br>
> }<br>
> <br>
> - if (!(amdgpu_dc_debug_mask & DC_DISABLE_REPLAY)) {<br>
> - switch (amdgpu_ip_version(adev, DCE_HWIP, 0)) {<br>
> - case IP_VERSION(3, 1, 4):<br>
> - case IP_VERSION(3, 1, 5):<br>
> - case IP_VERSION(3, 1, 6):<br>
> - case IP_VERSION(3, 2, 0):<br>
> - case IP_VERSION(3, 2, 1):<br>
> - case IP_VERSION(3, 5, 0):<br>
> - replay_feature_enabled = true;<br>
> - break;<br>
> - default:<br>
> - replay_feature_enabled = amdgpu_dc_feature_mask <br>
> & DC_REPLAY_MASK;<br>
> - break;<br>
> - }<br>
> - }<br>
> /* loops over all connectors on the board */<br>
> for (i = 0; i < link_cnt; i++) {<br>
> struct dc_link *link = NULL;<br>
> @@ -4618,12 +4601,6 @@ static int amdgpu_dm_initialize_drm_device(struct <br>
> amdgpu_device *adev)<br>
> <br>
> amdgpu_dm_update_connector_after_detect(aconnector);<br>
> setup_backlight_device(dm, aconnector);<br>
> <br>
> - /*<br>
> - * Disable psr if replay can be enabled<br>
> - */<br>
> - if (replay_feature_enabled && <br>
> amdgpu_dm_setup_replay(link, aconnector))<br>
> - psr_feature_enabled = false;<br>
> -<br>
> if (psr_feature_enabled)<br>
> amdgpu_dm_set_psr_caps(link);<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c <br>
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c<br>
> index fb51ec4f8d31..440fc0869a34 100644<br>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c<br>
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c<br>
> @@ -29,7 +29,6 @@<br>
> #include "dc.h"<br>
> #include "amdgpu.h"<br>
> #include "amdgpu_dm_psr.h"<br>
> -#include "amdgpu_dm_replay.h"<br>
> #include "amdgpu_dm_crtc.h"<br>
> #include "amdgpu_dm_plane.h"<br>
> #include "amdgpu_dm_trace.h"<br>
> @@ -124,12 +123,7 @@ static void vblank_control_worker(struct <br>
> work_struct *work)<br>
> * fill_dc_dirty_rects().<br>
> */<br>
> if (vblank_work->stream && vblank_work->stream->link) {<br>
> - /*<br>
> - * Prioritize replay, instead of psr<br>
> - */<br>
> - if <br>
> (vblank_work->stream->link->replay_settings.replay_feature_enabled)<br>
> - amdgpu_dm_replay_enable(vblank_work->stream, false);<br>
> - else if (vblank_work->enable) {<br>
> + if (vblank_work->enable) {<br>
> if <br>
> (vblank_work->stream->link->psr_settings.psr_version < <br>
> DC_PSR_VERSION_SU_1 &&<br>
> <br>
> vblank_work->stream->link->psr_settings.psr_allow_active)<br>
> <br>
> amdgpu_dm_psr_disable(vblank_work->stream);<br>
> @@ -138,7 +132,6 @@ static void vblank_control_worker(struct work_struct <br>
> *work)<br>
> #ifdef CONFIG_DRM_AMD_SECURE_DISPLAY<br>
> <br>
> !amdgpu_dm_crc_window_is_activated(&vblank_work->acrtc->base) &&<br>
> #endif<br>
> - <br>
> vblank_work->stream->link->panel_config.psr.disallow_replay &&<br>
> <br>
> vblank_work->acrtc->dm_irq_params.allow_psr_entry) {<br>
> amdgpu_dm_psr_enable(vblank_work->stream);<br>
> }<br>
> diff --git a/drivers/gpu/drm/amd/include/amd_shared.h <br>
> b/drivers/gpu/drm/amd/include/amd_shared.h<br>
> index 314fd44ec018..ce75351204bb 100644<br>
> --- a/drivers/gpu/drm/amd/include/amd_shared.h<br>
> +++ b/drivers/gpu/drm/amd/include/amd_shared.h<br>
> @@ -244,7 +244,6 @@ enum DC_FEATURE_MASK {<br>
> DC_DISABLE_LTTPR_DP2_0 = (1 << 6), //0x40, disabled by default<br>
> DC_PSR_ALLOW_SMU_OPT = (1 << 7), //0x80, disabled by default<br>
> DC_PSR_ALLOW_MULTI_DISP_OPT = (1 << 8), //0x100, disabled by <br>
> default<br>
> - DC_REPLAY_MASK = (1 << 9), //0x200, disabled by default for dcn <br>
> < 3.1.4<br>
> };<br>
> <br>
> enum DC_DEBUG_MASK {<br>
> @@ -255,7 +254,6 @@ enum DC_DEBUG_MASK {<br>
> DC_DISABLE_PSR = 0x10,<br>
> DC_FORCE_SUBVP_MCLK_SWITCH = 0x20,<br>
> DC_DISABLE_MPO = 0x40,<br>
> - DC_DISABLE_REPLAY = 0x50,<br>
> DC_ENABLE_DPIA_TRACE = 0x80,<br>
> };<br>
> <br>
> -- <br>
> 2.34.1<br>
> <br>
</div>
</span></font></div>
</div>
</body>
</html>