From: Dmytro Laktyushkin <Dmytro.Laktyushkin@xxxxxxx> Change-Id: Ia758a65b08a5bf4cc8d5f95170b682e615052f54 Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin at amd.com> Acked-by: Harry Wentland <Harry.Wentland at amd.com> Reviewed-by: Tony Cheng <Tony.Cheng at amd.com> --- drivers/gpu/drm/amd/display/dc/core/dc.c | 9 --------- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c | 6 ++++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 0ec2c4f39735..852932aec436 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -980,11 +980,6 @@ bool dc_pre_update_surfaces_to_stream( resource_build_scaling_params( new_surfaces[i], &context->res_ctx.pipe_ctx[j]); - - if (dc->debug.surface_visual_confirm) { - context->res_ctx.pipe_ctx[j].scl_data.recout.height -= 2; - context->res_ctx.pipe_ctx[j].scl_data.recout.width -= 2; - } } if (!core_dc->res_pool->funcs->validate_bandwidth(core_dc, context)) { @@ -1267,10 +1262,6 @@ void dc_update_surfaces_for_stream(struct dc *dc, continue; resource_build_scaling_params(updates[i].surface, pipe_ctx); - if (dc->debug.surface_visual_confirm) { - pipe_ctx->scl_data.recout.height -= 2; - pipe_ctx->scl_data.recout.width -= 2; - } } } diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c index d8ffbff9a268..c861fd7b5767 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c @@ -27,6 +27,7 @@ #include "reg_helper.h" #include "opp.h" #include "basics/conversion.h" +#include "dc.h" #define REG(reg) \ (xfm_dce->regs->reg) @@ -121,6 +122,11 @@ static void program_overscan( int overscan_bottom = data->v_active - data->recout.y - data->recout.height; + if (xfm_dce->base.ctx->dc->debug.surface_visual_confirm) { + overscan_bottom += 2; + overscan_right += 2; + } + if (overscan_right < 0) { BREAK_TO_DEBUGGER(); overscan_right = 0; diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c index feb5f3c29804..28963996693c 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c @@ -25,6 +25,7 @@ #include "dce110_transform_v.h" #include "dm_services.h" +#include "dc.h" #include "dce/dce_11_0_d.h" #include "dce/dce_11_0_sh_mask.h" @@ -232,6 +233,11 @@ static void program_overscan( int overscan_right = data->h_active - data->recout.x - data->recout.width; int overscan_bottom = data->v_active - data->recout.y - data->recout.height; + if (xfm_dce->base.ctx->dc->debug.surface_visual_confirm) { + overscan_bottom += 2; + overscan_right += 2; + } + if (overscan_right < 0) { BREAK_TO_DEBUGGER(); overscan_right = 0; -- 2.9.3