drm/amd/display: Fix disbling PSR slow response issue
authorTom Chung <chiahsuan.chung@amd.com>
Mon, 29 May 2023 06:27:11 +0000 (14:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Jun 2023 14:44:23 +0000 (10:44 -0400)
[Why]
dmub_psr_get_state() return an invalid PSR state while disable
the PSR because convert_psr_state() doesn't recognize the state
that return from DMCUB.

[How]
Add a PSR state to make the dmub_psr_get_state() return a
correct PSR state.

Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Reviewed-by: Wayne Lin <Wayne.Lin@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

index 6b4731b..0ce7728 100644 (file)
@@ -597,6 +597,7 @@ enum dc_psr_state {
        PSR_STATE4b_FULL_FRAME,
        PSR_STATE4c_FULL_FRAME,
        PSR_STATE4_FULL_FRAME_POWERUP,
+       PSR_STATE4_FULL_FRAME_HW_LOCK,
        PSR_STATE5,
        PSR_STATE5a,
        PSR_STATE5b,
index 4000a83..0f24b6f 100644 (file)
@@ -87,6 +87,8 @@ static enum dc_psr_state convert_psr_state(uint32_t raw_state)
                state = PSR_STATE4c_FULL_FRAME;
        else if (raw_state == 0x4E)
                state = PSR_STATE4_FULL_FRAME_POWERUP;
+       else if (raw_state == 0x4F)
+               state = PSR_STATE4_FULL_FRAME_HW_LOCK;
        else if (raw_state == 0x60)
                state = PSR_STATE_HWLOCK_MGR;
        else if (raw_state == 0x61)