]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Set plane update flags for all planes in reset
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 9 Nov 2021 16:24:10 +0000 (11:24 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Nov 2021 20:05:44 +0000 (15:05 -0500)
[Why]
We're only setting the flags on stream[0]'s planes so this logic fails
if we have more than one stream in the state.

This can cause a page flip timeout with multiple displays in the
configuration.

[How]
Index into the stream_status array using the stream index - it's a 1:1
mapping.

Fixes: 8d8a33ba1a4e ("drm/amd/display: Handle GPU reset for DC block")
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 1dee25326e2be14c91bb63e3bea0f3d5c6b87852..b3210928b9cbdc5d44e6c2d7b0c43dc3889351bd 100644 (file)
@@ -2574,8 +2574,8 @@ static int dm_resume(void *handle)
 
                for (i = 0; i < dc_state->stream_count; i++) {
                        dc_state->streams[i]->mode_changed = true;
-                       for (j = 0; j < dc_state->stream_status->plane_count; j++) {
-                               dc_state->stream_status->plane_states[j]->update_flags.raw
+                       for (j = 0; j < dc_state->stream_status[i].plane_count; j++) {
+                               dc_state->stream_status[i].plane_states[j]->update_flags.raw
                                        = 0xffffffff;
                        }
                }