From e0754a6dc79c03e5cb26a3fe2aafcd3d85b61d7a Mon Sep 17 00:00:00 2001 From: Chenyu Chen Date: Fri, 18 Oct 2024 18:00:07 +0800 Subject: [PATCH] amd/vpelib: Remove unused define macro Reviewed-by: Roy Chan Acked-by: Chenyu Chen Signed-off-by: Chenyu Chen Part-of: --- src/amd/vpelib/src/core/background.c | 4 ---- src/amd/vpelib/src/core/inc/cmd_builder.h | 2 -- src/amd/vpelib/src/core/inc/vpe_command.h | 2 -- src/amd/vpelib/src/core/inc/vpe_priv.h | 2 -- src/amd/vpelib/src/core/resource.c | 16 ---------------- src/amd/vpelib/src/core/vpelib.c | 12 ------------ 6 files changed, 38 deletions(-) diff --git a/src/amd/vpelib/src/core/background.c b/src/amd/vpelib/src/core/background.c index bc72f869fc7..6a4726c18de 100644 --- a/src/amd/vpelib/src/core/background.c +++ b/src/amd/vpelib/src/core/background.c @@ -154,11 +154,7 @@ uint16_t vpe_find_bg_gaps(struct vpe_priv *vpe_priv, const struct vpe_rect *targ struct vpe_rect *dst_viewport_rect; bool full_bg = false; const uint32_t max_seg_width = vpe_priv->pub.caps->plane_caps.max_viewport_width; -#ifdef VPE_BUILD_1_1 const uint16_t num_multiple = vpe_priv->vpe_num_instance ? vpe_priv->vpe_num_instance : 1; -#else - const uint16_t num_multiple = 1; -#endif num_segs = vpe_priv->stream_ctx[0].num_segments; dst_viewport_rect = &(vpe_priv->stream_ctx[0].segment_ctx[0].scaler_data.dst_viewport); diff --git a/src/amd/vpelib/src/core/inc/cmd_builder.h b/src/amd/vpelib/src/core/inc/cmd_builder.h index aed03d850be..6f704d041bf 100644 --- a/src/amd/vpelib/src/core/inc/cmd_builder.h +++ b/src/amd/vpelib/src/core/inc/cmd_builder.h @@ -44,10 +44,8 @@ struct cmd_builder { enum vpe_status (*build_plane_descriptor)( struct vpe_priv *vpe_priv, struct vpe_buf *buf, uint32_t cmd_idx); -#ifdef VPE_BUILD_1_1 enum vpe_status (*build_collaborate_sync_cmd)( struct vpe_priv *vpe_priv, struct vpe_build_bufs *cur_bufs); -#endif }; #ifdef __cplusplus diff --git a/src/amd/vpelib/src/core/inc/vpe_command.h b/src/amd/vpelib/src/core/inc/vpe_command.h index 2f607835b3b..aa37224a922 100644 --- a/src/amd/vpelib/src/core/inc/vpe_command.h +++ b/src/amd/vpelib/src/core/inc/vpe_command.h @@ -43,9 +43,7 @@ enum VPE_CMD_OPCODE { VPE_CMD_OPCODE_COND_EXE = 0x9, VPE_CMD_OPCODE_ATOMIC = 0xA, VPE_CMD_OPCODE_PLANE_FILL = 0xB, -#ifdef VPE_BUILD_1_1 VPE_CMD_OPCODE_COLLABORATE_SYNC = 0xC, -#endif VPE_CMD_OPCODE_TIMESTAMP = 0xD, }; diff --git a/src/amd/vpelib/src/core/inc/vpe_priv.h b/src/amd/vpelib/src/core/inc/vpe_priv.h index 7694b264e12..6d972b90992 100644 --- a/src/amd/vpelib/src/core/inc/vpe_priv.h +++ b/src/amd/vpelib/src/core/inc/vpe_priv.h @@ -263,12 +263,10 @@ struct vpe_priv { bool scale_yuv_matrix; // this is a flag that forces scaling the yuv->rgb matrix // when embedding the color adjustments -#ifdef VPE_BUILD_1_1 // collaborate sync data counter int32_t collaborate_sync_index; uint16_t vpe_num_instance; bool collaboration_mode; -#endif enum vpe_expansion_mode expansion_mode; }; diff --git a/src/amd/vpelib/src/core/resource.c b/src/amd/vpelib/src/core/resource.c index 0415a021c95..2602a97bbdd 100644 --- a/src/amd/vpelib/src/core/resource.c +++ b/src/amd/vpelib/src/core/resource.c @@ -27,13 +27,9 @@ #include "vpe_version.h" #include "common.h" -#ifdef VPE_BUILD_1_0 #include "vpe10_resource.h" -#endif -#ifdef VPE_BUILD_1_1 #include "vpe11_resource.h" -#endif static const struct vpe_debug_options debug_defaults = { .flags = {0}, @@ -86,18 +82,14 @@ enum vpe_ip_level vpe_resource_parse_ip_version( { enum vpe_ip_level ip_level = VPE_IP_LEVEL_UNKNOWN; switch (VPE_VERSION(major, minor, rev_id)) { -#ifdef VPE_BUILD_1_0 case VPE_VERSION(6, 1, 0): case VPE_VERSION(6, 1, 3): ip_level = VPE_IP_LEVEL_1_0; break; -#endif -#ifdef VPE_BUILD_1_1 case VPE_VERSION(6, 1, 1): case VPE_VERSION(6, 1, 2): ip_level = VPE_IP_LEVEL_1_1; break; -#endif default: ip_level = VPE_IP_LEVEL_UNKNOWN; break; @@ -110,16 +102,12 @@ enum vpe_status vpe_construct_resource( { enum vpe_status status = VPE_STATUS_OK; switch (level) { -#ifdef VPE_BUILD_1_0 case VPE_IP_LEVEL_1_0: status = vpe10_construct_resource(vpe_priv, res); break; -#endif -#ifdef VPE_BUILD_1_1 case VPE_IP_LEVEL_1_1: status = vpe11_construct_resource(vpe_priv, res); break; -#endif default: status = VPE_STATUS_NOT_SUPPORTED; vpe_log("invalid ip level: %d", (int)level); @@ -137,16 +125,12 @@ enum vpe_status vpe_construct_resource( void vpe_destroy_resource(struct vpe_priv *vpe_priv, struct resource *res) { switch (vpe_priv->pub.level) { -#ifdef VPE_BUILD_1_0 case VPE_IP_LEVEL_1_0: vpe10_destroy_resource(vpe_priv, res); break; -#endif -#ifdef VPE_BUILD_1_1 case VPE_IP_LEVEL_1_1: vpe11_destroy_resource(vpe_priv, res); break; -#endif default: break; } diff --git a/src/amd/vpelib/src/core/vpelib.c b/src/amd/vpelib/src/core/vpelib.c index 594f1598a99..3175cca3d12 100644 --- a/src/amd/vpelib/src/core/vpelib.c +++ b/src/amd/vpelib/src/core/vpelib.c @@ -230,9 +230,7 @@ struct vpe *vpe_create(const struct vpe_init_data *params) vpe_priv->ops_support = false; vpe_priv->scale_yuv_matrix = true; -#ifdef VPE_BUILD_1_1 vpe_priv->collaborate_sync_index = 0; -#endif return &vpe_priv->pub; } @@ -471,11 +469,9 @@ enum vpe_status vpe_check_support( dpp = vpe_priv->resource.dpp[0]; status = VPE_STATUS_OK; -#ifdef VPE_BUILD_1_1 vpe_priv->collaboration_mode = param->collaboration_mode; vpe_priv->vpe_num_instance = param->num_instances; verify_collaboration_mode(vpe_priv); -#endif required_virtual_streams = get_required_virtual_stream_count(vpe_priv, param); @@ -633,13 +629,11 @@ static bool validate_cached_param(struct vpe_priv *vpe_priv, const struct vpe_bu !(vpe_priv->init.debug.bg_color_fill_only == true && vpe_priv->num_streams == 1)) return false; -#ifdef VPE_BUILD_1_1 if (vpe_priv->collaboration_mode != param->collaboration_mode) return false; if (param->num_instances > 0 && vpe_priv->vpe_num_instance != param->num_instances) return false; -#endif for (i = 0; i < vpe_priv->num_input_streams; i++) { struct vpe_stream stream = param->streams[i]; @@ -785,21 +779,18 @@ enum vpe_status vpe_build_commands( vpe_bg_color_convert(vpe_priv->output_ctx.cs, vpe_priv->output_ctx.output_tf, &vpe_priv->output_ctx.bg_color, vpe_priv->stream_ctx[0].enable_3dlut); -#ifdef VPE_BUILD_1_1 if (vpe_priv->collaboration_mode == true) { status = builder->build_collaborate_sync_cmd(vpe_priv, &curr_bufs); if (status != VPE_STATUS_OK) { vpe_log("failed in building collaborate sync cmd %d\n", (int)status); } } -#endif for (cmd_idx = 0; cmd_idx < vpe_priv->vpe_cmd_vector->num_elements; cmd_idx++) { status = builder->build_vpe_cmd(vpe_priv, &curr_bufs, cmd_idx); if (status != VPE_STATUS_OK) { vpe_log("failed in building vpe cmd %d\n", (int)status); } -#ifdef VPE_BUILD_1_1 cmd_info = vpe_vector_get(vpe_priv->vpe_cmd_vector, cmd_idx); if (cmd_info == NULL) return VPE_STATUS_ERROR; @@ -818,16 +809,13 @@ enum vpe_status vpe_build_commands( } } } -#endif } -#ifdef VPE_BUILD_1_1 if (vpe_priv->collaboration_mode == true) { status = builder->build_collaborate_sync_cmd(vpe_priv, &curr_bufs); if (status != VPE_STATUS_OK) { vpe_log("failed in building collaborate sync cmd %d\n", (int)status); } } -#endif } if (status == VPE_STATUS_OK) {