Commit 3f0940f8 authored by Charlene Liu's avatar Charlene Liu Committed by Alex Deucher

drm/amd/display: add stream_enc_inst for PSP HDCP inst use

[why]
new HW engine mapping requirment use in PSP
[how]
report stream_enc_inst
Signed-off-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Reviewed-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 76162cb7
...@@ -2922,7 +2922,8 @@ static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off) ...@@ -2922,7 +2922,8 @@ static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off)
memset(&config, 0, sizeof(config)); memset(&config, 0, sizeof(config));
config.otg_inst = (uint8_t) pipe_ctx->stream_res.tg->inst; config.otg_inst = (uint8_t) pipe_ctx->stream_res.tg->inst;
config.stream_enc_inst = (uint8_t) pipe_ctx->stream_res.stream_enc->id; /*stream_enc_inst*/
config.stream_enc_inst = (uint8_t) pipe_ctx->stream_res.stream_enc->stream_enc_inst;
config.link_enc_inst = pipe_ctx->stream->link->link_enc_hw_inst; config.link_enc_inst = pipe_ctx->stream->link->link_enc_hw_inst;
config.dpms_off = dpms_off; config.dpms_off = dpms_off;
config.dm_stream_ctx = pipe_ctx->stream->dm_stream_context; config.dm_stream_ctx = pipe_ctx->stream->dm_stream_context;
......
...@@ -2034,7 +2034,7 @@ enum dc_status resource_map_pool_resources( ...@@ -2034,7 +2034,7 @@ enum dc_status resource_map_pool_resources(
for (i = 0; i < context->stream_count; i++) for (i = 0; i < context->stream_count; i++)
if (context->streams[i] == stream) { if (context->streams[i] == stream) {
context->stream_status[i].primary_otg_inst = pipe_ctx->stream_res.tg->inst; 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; context->stream_status[i].stream_enc_inst = pipe_ctx->stream_res.stream_enc->stream_enc_inst;
context->stream_status[i].audio_inst = context->stream_status[i].audio_inst =
pipe_ctx->stream_res.audio ? pipe_ctx->stream_res.audio->inst : -1; pipe_ctx->stream_res.audio ? pipe_ctx->stream_res.audio->inst : -1;
......
...@@ -1667,5 +1667,6 @@ void dcn10_stream_encoder_construct( ...@@ -1667,5 +1667,6 @@ void dcn10_stream_encoder_construct(
enc1->regs = regs; enc1->regs = regs;
enc1->se_shift = se_shift; enc1->se_shift = se_shift;
enc1->se_mask = se_mask; enc1->se_mask = se_mask;
enc1->base.stream_enc_inst = eng_id - ENGINE_ID_DIGA;
} }
...@@ -616,5 +616,6 @@ void dcn20_stream_encoder_construct( ...@@ -616,5 +616,6 @@ void dcn20_stream_encoder_construct(
enc1->regs = regs; enc1->regs = regs;
enc1->se_shift = se_shift; enc1->se_shift = se_shift;
enc1->se_mask = se_mask; enc1->se_mask = se_mask;
enc1->base.stream_enc_inst = eng_id - ENGINE_ID_DIGA;
} }
...@@ -103,6 +103,7 @@ struct stream_encoder { ...@@ -103,6 +103,7 @@ struct stream_encoder {
struct dc_context *ctx; struct dc_context *ctx;
struct dc_bios *bp; struct dc_bios *bp;
enum engine_id id; enum engine_id id;
uint32_t stream_enc_inst;
}; };
struct enc_state { struct enc_state {
......
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