amd/vpelib: Need a debug flag to support 2tap downscaling

Add flag to support 2tap downscaling.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
This commit is contained in:
Shih, Jude 2023-11-30 10:39:48 +08:00 committed by Marge Bot
parent ee20be9b07
commit 28b7c1e611
4 changed files with 7 additions and 1 deletions

View file

@ -344,6 +344,7 @@ struct vpe_debug_options {
uint32_t mpc_crc_ctrl : 1;
uint32_t bg_bit_depth : 1;
uint32_t visual_confirm : 1;
uint32_t skip_optimal_tap_check : 1;
} flags;
// valid only if the corresponding flag is set
@ -365,6 +366,7 @@ struct vpe_debug_options {
uint32_t dpp_crc_ctrl : 1;
uint32_t opp_pipe_crc_ctrl : 1;
uint32_t mpc_crc_ctrl : 1;
uint32_t skip_optimal_tap_check : 1;
uint32_t bg_bit_depth;
struct vpe_mem_low_power_enable_options enable_mem_low_power;

View file

@ -175,7 +175,7 @@ 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 (!dpp->funcs->get_optimal_number_of_taps(
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;

View file

@ -73,6 +73,7 @@ static const struct vpe_debug_options debug_defaults = {
.dpp_crc_ctrl = 0,
.mpc_crc_ctrl = 0,
.visual_confirm_params = {{{0}}},
.skip_optimal_tap_check = 0,
};
enum vpe_ip_level vpe_resource_parse_ip_version(

View file

@ -113,6 +113,9 @@ static void override_debug_option(
if (user_debug->flags.visual_confirm)
debug->visual_confirm_params = user_debug->visual_confirm_params;
if (user_debug->flags.skip_optimal_tap_check)
debug->skip_optimal_tap_check = user_debug->skip_optimal_tap_check;
}
struct vpe *vpe_create(const struct vpe_init_data *params)