Commit ed151940 authored by Yongqiang Sun's avatar Yongqiang Sun Committed by Alex Deucher

drm/amd/display: Fixed 4K black issue by refactor update 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 86e2e1be
...@@ -1482,17 +1482,19 @@ void dc_update_surfaces_for_stream(struct dc *dc, ...@@ -1482,17 +1482,19 @@ void dc_update_surfaces_for_stream(struct dc *dc,
} }
/* not sure if we still need this */ /* not sure if we still need this */
for (j = 0; j < context->res_ctx.pool->pipe_count; j++) { if (update_type == UPDATE_TYPE_FULL) {
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[j]; for (j = 0; j < context->res_ctx.pool->pipe_count; j++) {
struct core_stream *stream = pipe_ctx->stream; struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[j];
struct core_stream *stream = pipe_ctx->stream;
if (pipe_ctx->surface != surface) if (pipe_ctx->surface != surface)
continue; continue;
resource_build_scaling_params(updates[i].surface, pipe_ctx); resource_build_scaling_params(updates[i].surface, pipe_ctx);
if (dc->debug.surface_visual_confirm) { if (dc->debug.surface_visual_confirm) {
pipe_ctx->scl_data.recout.height -= 2; pipe_ctx->scl_data.recout.height -= 2;
pipe_ctx->scl_data.recout.width -= 2; pipe_ctx->scl_data.recout.width -= 2;
}
} }
} }
...@@ -1563,10 +1565,12 @@ void dc_update_surfaces_for_stream(struct dc *dc, ...@@ -1563,10 +1565,12 @@ void dc_update_surfaces_for_stream(struct dc *dc,
} }
if (update_type == UPDATE_TYPE_FULL) { if (update_type == UPDATE_TYPE_FULL) {
core_dc->hwss.apply_ctx_for_surface(core_dc, surface, context); /* only apply for top pipe */
} else if (updates[i].flip_addr) { if (!pipe_ctx->top_pipe)
core_dc->hwss.apply_ctx_for_surface(core_dc,
surface, context);
} else if (updates[i].flip_addr)
core_dc->hwss.update_plane_addr(core_dc, pipe_ctx); core_dc->hwss.update_plane_addr(core_dc, pipe_ctx);
}
if (update_type == UPDATE_TYPE_FAST) if (update_type == UPDATE_TYPE_FAST)
continue; continue;
......
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