[PATCH 05/26] drm/amd/display: assign new stream id in dc_copy_stream

sunpeng.li at amd.com sunpeng.li at amd.com
Mon May 27 19:50:44 UTC 2019

From: Wenjing Liu <Wenjing.Liu at amd.com>

stream id should uniquely identify an instance of stream.
the copy constructor should be treated as a new
stream instance.

assign a new stream id in this copy constructor.

Signed-off-by: Wenjing Liu <Wenjing.Liu at amd.com>
Reviewed-by: Jun Lei <Jun.Lei at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 3 +++
 1 file changed, 3 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 59b247a..a002e69 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -179,6 +179,9 @@ struct dc_stream_state *dc_copy_stream(const struct dc_stream_state *stream)
 	if (new_stream->out_transfer_func)
+	new_stream->stream_id = new_stream->ctx->dc_stream_id_count;
+	new_stream->ctx->dc_stream_id_count++;
 	return new_stream;

More information about the amd-gfx mailing list