Commit 8d1b4047 authored by Yongqiang Sun's avatar Yongqiang Sun Committed by Alex Deucher

drm/amd/display: Only apply ctx for specific surface.

Signed-off-by: default avatarYongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 64b44524
......@@ -1689,20 +1689,22 @@ static void dcn10_apply_ctx_for_surface(
{
int i;
memcpy(context->res_ctx.mpc_tree,
dc->current_context->res_ctx.mpc_tree,
sizeof(struct mpc_tree_cfg) * dc->res_pool->pipe_count);
for (i = 0; i < dc->res_pool->pipe_count; i++) {
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
if (!pipe_ctx->surface)
if (!pipe_ctx->surface || pipe_ctx->surface != surface)
continue;
/* looking for top pipe to program */
if (!pipe_ctx->top_pipe)
if (!pipe_ctx->top_pipe) {
memcpy(context->res_ctx.mpc_tree,
dc->current_context->res_ctx.mpc_tree,
sizeof(struct mpc_tree_cfg) * dc->res_pool->pipe_count);
program_all_pipe_in_tree(dc, pipe_ctx, context);
}
}
for (i = 0; i < dc->res_pool->pipe_count; i++) {
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
......
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