]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Initialize replay_state to PR_STATE_INVALID
authorIvan Lipski <ivan.lipski@amd.com>
Wed, 18 Feb 2026 21:19:15 +0000 (16:19 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Mar 2026 21:39:02 +0000 (16:39 -0500)
[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 <wenjing.liu@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c

index 7e45d1e767bb19539813fa8fc79d69e176416c5f..6661078c0241f9e118dbcbd628b1864f3f4d07aa 100644 (file)
@@ -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;