amd/vpelib: Remove unused define macro

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Signed-off-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31918>
This commit is contained in:
Chenyu Chen 2024-10-18 18:00:07 +08:00 committed by Marge Bot
parent 22b511ef02
commit e0754a6dc7
6 changed files with 0 additions and 38 deletions

View file

@ -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);

View file

@ -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

View file

@ -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,
};

View file

@ -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;
};

View file

@ -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;
}

View file

@ -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) {