Commit b1432fcb authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher

drm/amd/display: assign new stream id in dc_copy_stream

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

[how]
assign a new stream id in this copy constructor.
Signed-off-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a7f90cbc
......@@ -179,6 +179,9 @@ struct dc_stream_state *dc_copy_stream(const struct dc_stream_state *stream)
if (new_stream->out_transfer_func)
dc_transfer_func_retain(new_stream->out_transfer_func);
new_stream->stream_id = new_stream->ctx->dc_stream_id_count;
new_stream->ctx->dc_stream_id_count++;
kref_init(&new_stream->refcount);
return new_stream;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment