提交 ede37e4c 编写于 作者: C Charlene Liu 提交者: Alex Deucher

drm/amd/display: fix can not turn on two displays due to DSC_RESOURCE failed.

[Why]
Can not turn on two displays at the same time with the asic having only one DSC.
DC_DSC_RESOURCE allocation failed.

[Solution]
Only add_dsc if the timing is dsc capable based on diag_dc and num_dsc
Signed-off-by: NCharlene Liu <charlene.liu@amd.com>
Reviewed-by: NWesley Chalmers <Wesley.Chalmers@amd.com>
Acked-by: NBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 8e27a2d4
......@@ -1284,6 +1284,12 @@ enum dc_status dcn20_add_stream_to_ctx(struct dc *dc, struct dc_state *new_ctx,
if (pipe_ctx->stream != dc_stream)
continue;
if (IS_DIAG_DC(dc->ctx->dce_environment) ||
dc->res_pool->res_cap->num_dsc == 1) {
// Diags build can also run on platforms that have fewer DSCs than pipes.
// In that case, add DSC only if needed by timing.
is_add_dsc = (dc_stream->timing.flags.DSC == 1);
}
if (is_add_dsc) {
pipe_ctx->stream_res.dsc = acquire_dsc(&new_ctx->res_ctx, pool);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册