From: Ivan Lipski <[email protected]>

[WHY & HOW]
Initialize the replay_state variable to PR_STATE_INVALID instead of
PR_STATE_0 before retrieving the actual replay state.

Reviewed-by: Wenjing Liu <[email protected]>
Signed-off-by: Ivan Lipski <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
---
 .../drm/amd/display/dc/link/protocols/link_dp_panel_replay.c    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c 
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c
index 7e45d1e767bb..6661078c0241 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c
@@ -389,7 +389,7 @@ bool dp_pr_get_state(const struct dc_link *link, uint64_t 
*state)
        const struct dc *dc = link->ctx->dc;
        unsigned int panel_inst = 0;
        uint32_t retry_count = 0;
-       uint32_t replay_state = 0;
+       uint32_t replay_state = PR_STATE_INVALID;
 
        if (!dp_pr_get_panel_inst(dc, link, &panel_inst))
                return false;
-- 
2.43.0

Reply via email to