drm/amd/display: Add missing PSR state
authorMikita Lipski <mikita.lipski@amd.com>
Wed, 29 Sep 2021 12:39:21 +0000 (08:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Oct 2021 21:19:16 +0000 (17:19 -0400)
[why]
PSR_STATE2b was introduced on DMCUB side, but not on the driver side,
which caused convert_psr_state helper function to return
PSR_STATE_INVALID. That caused visual lagging during state transition.

[how]
Add PSR_STATE2b to dc_psr_state and convert_psr_state

Reviewed-by: Wyatt Wood <Wyatt.Wood@amd.com>
Acked-by: Agustin Gutierrez Sanchez <agustin.gutierrez@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@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 15c353c389d8999209053a375a67020d7244f7c9..388457ffc0a88166d5cadd1fac836c5d32c0b0cc 100644 (file)
@@ -653,6 +653,7 @@ enum dc_psr_state {
        PSR_STATE1a,
        PSR_STATE2,
        PSR_STATE2a,
+       PSR_STATE2b,
        PSR_STATE3,
        PSR_STATE3Init,
        PSR_STATE4,
index aa8403bc4c83050582bb97fbd615eb6968e0aaf2..05d96ca80512cb56da1ab2c5cd23543316b6f4d0 100644 (file)
@@ -50,6 +50,8 @@ static enum dc_psr_state convert_psr_state(uint32_t raw_state)
                state = PSR_STATE2;
        else if (raw_state == 0x21)
                state = PSR_STATE2a;
+       else if (raw_state == 0x22)
+               state = PSR_STATE2b;
        else if (raw_state == 0x30)
                state = PSR_STATE3;
        else if (raw_state == 0x31)