]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Use current_state when checking old_pipe subvp type
authorAlvin Lee <alvin.lee2@amd.com>
Tue, 14 May 2024 20:22:01 +0000 (16:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Jun 2024 15:25:13 +0000 (11:25 -0400)
[Description]
When checking the subvp type of the previous state we must
pass in current_state to the interface instead of context
otherwise we will get the wrong result.

Reviewed-by: Samson Tam <samson.tam@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@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/hwss/dcn32/dcn32_hwseq.c

index 25c9a407779b85a136abae0ebbc7d1cc21b5450e..0d27eec724b49f8a38f1d6d23e8e47cd2f94ffc5 100644 (file)
@@ -643,7 +643,7 @@ void dcn32_update_force_pstate(struct dc *dc, struct dc_state *context)
 
                if (pipe->stream && (dc_state_get_pipe_subvp_type(context, pipe) == SUBVP_MAIN ||
                                (stream_status && stream_status->fpo_in_use)) &&
-                               (!old_pipe->stream || (dc_state_get_pipe_subvp_type(context, old_pipe) != SUBVP_MAIN &&
+                               (!old_pipe->stream || (dc_state_get_pipe_subvp_type(dc->current_state, old_pipe) != SUBVP_MAIN &&
                                (old_stream_status && !old_stream_status->fpo_in_use)))) {
                        if (hubp && hubp->funcs->hubp_update_force_pstate_disallow)
                                hubp->funcs->hubp_update_force_pstate_disallow(hubp, true);