drm/amd/display: Safe stream encoder id in stream_status

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>
This commit is contained in:
Wenjing Liu 2017-08-22 18:42:51 -04:00 committed by Alex Deucher
parent aaa15026f2
commit 0f0bdca5ca
2 changed files with 2 additions and 0 deletions

View 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;
}

View 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];