Module: Mesa Branch: main Commit: 7e4d95c271b3ef7f9cb370946933bd584fd47a32 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e4d95c271b3ef7f9cb370946933bd584fd47a32
Author: Shih, Jude <[email protected]> Date: Wed Dec 13 13:06:14 2023 +0800 amd/vpelib: Solve the downscaling problem for 2 tap We should set default value of tap if we enable the skip_optimal_tap_check flag for 2 tap case. Reviewed-by: Tomson Chang <[email protected]> Acked-by: Alan Liu <[email protected]> Signed-off-by: Jude Shih <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841> --- src/amd/vpelib/src/chip/vpe10/vpe10_resource.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/amd/vpelib/src/chip/vpe10/vpe10_resource.c b/src/amd/vpelib/src/chip/vpe10/vpe10_resource.c index 188fc925d4d..f2abecd4517 100644 --- a/src/amd/vpelib/src/chip/vpe10/vpe10_resource.c +++ b/src/amd/vpelib/src/chip/vpe10/vpe10_resource.c @@ -175,9 +175,16 @@ static bool vpe10_init_scaler_data(struct vpe_priv *vpe_priv, struct stream_ctx struct dpp *dpp = vpe_priv->resource.dpp[0]; calculate_scaling_ratios(scl_data, src_rect, dst_rect, stream_ctx->stream.surface_info.format); - if (!vpe_priv->init.debug.skip_optimal_tap_check && !dpp->funcs->get_optimal_number_of_taps( - dpp, scl_data, &stream_ctx->stream.scaling_info.taps)) - return false; + if (vpe_priv->init.debug.skip_optimal_tap_check) { + scl_data->taps.v_taps = stream_ctx->stream.scaling_info.taps.v_taps; + scl_data->taps.h_taps = stream_ctx->stream.scaling_info.taps.h_taps; + scl_data->taps.v_taps_c = stream_ctx->stream.scaling_info.taps.v_taps_c; + scl_data->taps.h_taps_c = stream_ctx->stream.scaling_info.taps.h_taps_c; + } else { + if (!dpp->funcs->get_optimal_number_of_taps( + dpp, scl_data, &stream_ctx->stream.scaling_info.taps)) + return false; + } if ((stream_ctx->stream.use_external_scaling_coeffs == false) || /* don't try to optimize is the scaler is configured externally*/
