drm/amd/display: Safe stream encoder id in stream_status
authorWenjing Liu <Wenjing.Liu@amd.com>
Tue, 22 Aug 2017 22:42:51 +0000 (18:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:17:04 +0000 (18:17 -0400)
Signed-off-by: Wenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc.h

index 428863bccab657a52c207eac76b32ffeab074cbe..fbfe15f783c0697c179ba4f9146d558ba266c7f7 100644 (file)
@@ -1599,6 +1599,7 @@ enum dc_status resource_map_pool_resources(
        for (i = 0; i < context->stream_count; i++)
                if (context->streams[i] == stream) {
                        context->stream_status[i].primary_otg_inst = pipe_ctx->stream_res.tg->inst;
+                       context->stream_status[i].stream_enc_inst = pipe_ctx->stream_res.stream_enc->id;
                        return DC_OK;
                }
 
index 0f2a16a0cf8200fbd411789f28a89872fcd176da..9cc1c28caa4e95f00812158ed9a3a8dde73b0921 100644 (file)
@@ -510,6 +510,7 @@ enum surface_update_type {
 
 struct dc_stream_status {
        int primary_otg_inst;
+       int stream_enc_inst;
        int plane_count;
        struct dc_plane_state *plane_states[MAX_SURFACE_NUM];