mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
drm/amd/display: Fix writeback_info is not removed
[WHY] Counter j was not updated to present the num of writeback_info when writeback pipes are removed. [HOW] update j (num of writeback info) under the correct condition. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
58c3b3341c
commit
5b89d2ccc8
|
|
@ -565,11 +565,12 @@ bool dc_stream_remove_writeback(struct dc *dc,
|
|||
if (stream->writeback_info[i].dwb_pipe_inst == dwb_pipe_inst)
|
||||
stream->writeback_info[i].wb_enabled = false;
|
||||
|
||||
if (j < i)
|
||||
/* trim the array */
|
||||
/* trim the array */
|
||||
if (j < i) {
|
||||
memcpy(&stream->writeback_info[j], &stream->writeback_info[i],
|
||||
sizeof(struct dc_writeback_info));
|
||||
j++;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
stream->num_wb_info = j;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user