Skip to content

Commit 3cafcc9

Browse files
superm1alexdeucher
authored andcommitted
drm/amd/display: Clear phantom stream count and plane count
When dc_state_destruct() was refactored the new phantom_stream_count and phantom_plane_count members weren't cleared. Fixes: 012a04b ("drm/amd/display: Refactor phantom resource allocation") Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 04e1ef8 commit 3cafcc9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_state.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,14 @@ void dc_state_destruct(struct dc_state *state)
291291
dc_stream_release(state->phantom_streams[i]);
292292
state->phantom_streams[i] = NULL;
293293
}
294+
state->phantom_stream_count = 0;
294295

295296
for (i = 0; i < state->phantom_plane_count; i++) {
296297
dc_plane_state_release(state->phantom_planes[i]);
297298
state->phantom_planes[i] = NULL;
298299
}
300+
state->phantom_plane_count = 0;
301+
299302
state->stream_mask = 0;
300303
memset(&state->res_ctx, 0, sizeof(state->res_ctx));
301304
memset(&state->pp_display_cfg, 0, sizeof(state->pp_display_cfg));

0 commit comments

Comments
 (0)