drm/amd/display: Set PSR level to enable ALPM by default
authorDavid Zhang <dingchen.zhang@amd.com>
Tue, 3 May 2022 14:56:54 +0000 (10:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 6 Jun 2022 18:42:14 +0000 (14:42 -0400)
[Why & How]
While support ALPM, do ALPM state transition while PSR entry/exit.
ALPM is needed for PSR-SU feature, and since the function is ready,
we'd enable it by default.

- Add psr level definition to enable/disable ALPM and set ALPM
  powerdone mode.
- Enable ALPM by default

Signed-off-by: David Zhang <dingchen.zhang@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/dc_types.h

index 68e9fc6b510cb1369ab10279952d98f4f2c08a22..31ffb961e18b50c629967805259354213b36295a 100644 (file)
@@ -3364,6 +3364,10 @@ bool dc_link_setup_psr(struct dc_link *link,
         */
        psr_context->psr_level.bits.DISABLE_PSR_ENTRY_ABORT = 1;
 
+       /* enable ALPM */
+       psr_context->psr_level.bits.DISABLE_ALPM = 0;
+       psr_context->psr_level.bits.ALPM_DEFAULT_PD_MODE = 1;
+
        /* Controls additional delay after remote frame capture before
         * continuing power down, default = 0
         */
index 144c387010c236634290c4be50200dcfc7b6d2c1..26b62f50ac4e96dd8a4e6dde8c63d0d911842d08 100644 (file)
@@ -698,7 +698,9 @@ union dmcu_psr_level {
                unsigned int SKIP_AUTO_STATE_ADVANCE:1;
                unsigned int DISABLE_PSR_ENTRY_ABORT:1;
                unsigned int SKIP_SINGLE_OTG_DISABLE:1;
-               unsigned int RESERVED:22;
+               unsigned int DISABLE_ALPM:1;
+               unsigned int ALPM_DEFAULT_PD_MODE:1;
+               unsigned int RESERVED:20;
        } bits;
        unsigned int u32all;
 };