Re: [PATCH] drm/amdgpu: stream's id should reduced after stream destruct

From: Kazlauskas, Nicholas
Date: Mon Feb 22 2021 - 14:30:31 EST


On 2021-02-20 1:30 a.m., ZhiJie.Zhang wrote:
Signed-off-by: ZhiJie.Zhang <zhangzhijie@xxxxxxxxxxx>
---
drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index c103f858375d..dc7b7e57a86c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -137,6 +137,8 @@ static void dc_stream_destruct(struct dc_stream_state *stream)
dc_transfer_func_release(stream->out_transfer_func);
stream->out_transfer_func = NULL;
}
+
+ stream->ctx->dc_stream_id_count--;

This is supposed to be a unique identifier so we shouldn't be reusing any old ID when creating a new stream.

Regards,
Nicholas Kazlauskas

}
void dc_stream_retain(struct dc_stream_state *stream)