drm/amd/display: Align static screen idle worker with IPX mode
authorRoman Li <Roman.Li@amd.com>
Thu, 26 Sep 2024 20:36:15 +0000 (16:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2024 18:16:19 +0000 (14:16 -0400)
[Why]
Idle worker thread serves for periodic detection of HPD while system is in IPS2.
Currently it is used in headless and static screen scenarios.
IPX can be configured not to execute IPS2 for static screen.
In this case idle worker is redundant.

[How]
Only use periodic detection for static screen if IPS is fully enabled.

Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c

index a2cf2c066a76ddadde799781da5b17529a14738c..32fa643cd89916f05a4bc70c3d15720d2fb34825 100644 (file)
@@ -154,6 +154,7 @@ static void amdgpu_dm_crtc_set_panel_sr_feature(
 
                        amdgpu_dm_psr_enable(vblank_work->stream);
                        if (dm->idle_workqueue &&
+                           (dm->dc->config.disable_ips == DMUB_IPS_ENABLE) &&
                            dm->dc->idle_optimizations_allowed &&
                            dm->idle_workqueue->enable &&
                            !dm->idle_workqueue->running)