aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWenjing Liu <[email protected]>2019-05-07 15:18:44 -0400
committerAlex Deucher <[email protected]>2019-05-31 10:39:30 -0500
commitb1432fcbdbea5de6e4ec2e1b2fa2b3c13ade4785 (patch)
tree4ced8b8147e9a21478656751260935cc2c69d421
parenta7f90cbc0ee416ffcb2097583bf5364ffc3818bb (diff)
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: Wenjing Liu <[email protected]> Reviewed-by: Jun Lei <[email protected]> Acked-by: Leo Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_stream.c3
1 files changed, 3 insertions, 0 deletions
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 59b247af5b81..a002e690814f 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)
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;