msm: vidc: Driver cleanup
Remove unused legacy properties.
CRs-Fixed: 2008588
Change-Id: I90c87fecb7a7e2d55635d9f24eca1d3512679ef1
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
diff --git a/drivers/media/platform/msm/vidc/hfi_packetization.c b/drivers/media/platform/msm/vidc/hfi_packetization.c
index f75a33fa..fcf173a 100644
--- a/drivers/media/platform/msm/vidc/hfi_packetization.c
+++ b/drivers/media/platform/msm/vidc/hfi_packetization.c
@@ -177,30 +177,12 @@
case HFI_VIDEO_CODEC_H264:
hal_codec = HAL_VIDEO_CODEC_H264;
break;
- case HFI_VIDEO_CODEC_H263:
- hal_codec = HAL_VIDEO_CODEC_H263;
- break;
case HFI_VIDEO_CODEC_MPEG1:
hal_codec = HAL_VIDEO_CODEC_MPEG1;
break;
case HFI_VIDEO_CODEC_MPEG2:
hal_codec = HAL_VIDEO_CODEC_MPEG2;
break;
- case HFI_VIDEO_CODEC_MPEG4:
- hal_codec = HAL_VIDEO_CODEC_MPEG4;
- break;
- case HFI_VIDEO_CODEC_DIVX_311:
- hal_codec = HAL_VIDEO_CODEC_DIVX_311;
- break;
- case HFI_VIDEO_CODEC_DIVX:
- hal_codec = HAL_VIDEO_CODEC_DIVX;
- break;
- case HFI_VIDEO_CODEC_VC1:
- hal_codec = HAL_VIDEO_CODEC_VC1;
- break;
- case HFI_VIDEO_CODEC_SPARK:
- hal_codec = HAL_VIDEO_CODEC_SPARK;
- break;
case HFI_VIDEO_CODEC_VP8:
hal_codec = HAL_VIDEO_CODEC_VP8;
break;
@@ -255,30 +237,12 @@
case HAL_VIDEO_CODEC_H264:
hfi_codec = HFI_VIDEO_CODEC_H264;
break;
- case HAL_VIDEO_CODEC_H263:
- hfi_codec = HFI_VIDEO_CODEC_H263;
- break;
case HAL_VIDEO_CODEC_MPEG1:
hfi_codec = HFI_VIDEO_CODEC_MPEG1;
break;
case HAL_VIDEO_CODEC_MPEG2:
hfi_codec = HFI_VIDEO_CODEC_MPEG2;
break;
- case HAL_VIDEO_CODEC_MPEG4:
- hfi_codec = HFI_VIDEO_CODEC_MPEG4;
- break;
- case HAL_VIDEO_CODEC_DIVX_311:
- hfi_codec = HFI_VIDEO_CODEC_DIVX_311;
- break;
- case HAL_VIDEO_CODEC_DIVX:
- hfi_codec = HFI_VIDEO_CODEC_DIVX;
- break;
- case HAL_VIDEO_CODEC_VC1:
- hfi_codec = HFI_VIDEO_CODEC_VC1;
- break;
- case HAL_VIDEO_CODEC_SPARK:
- hfi_codec = HFI_VIDEO_CODEC_SPARK;
- break;
case HAL_VIDEO_CODEC_VP8:
hfi_codec = HFI_VIDEO_CODEC_VP8;
break;
@@ -506,35 +470,6 @@
if (!pkt)
return -EINVAL;
- /*
- * Legacy packetization should skip sending any 3xx specific session
- * cmds. Add 3xx specific packetization to the switch case below.
- */
- switch (pkt_type) {
- case HFI_CMD_SESSION_CONTINUE:
- dprintk(VIDC_INFO,
- "%s - skip sending %x for legacy hfi\n",
- __func__, pkt_type);
- return -EPERM;
- default:
- break;
- }
-
- pkt->size = sizeof(struct vidc_hal_session_cmd_pkt);
- pkt->packet_type = pkt_type;
- pkt->session_id = hash32_ptr(session);
-
- return rc;
-}
-
-int create_3x_pkt_cmd_session_cmd(struct vidc_hal_session_cmd_pkt *pkt,
- int pkt_type, struct hal_session *session)
-{
- int rc = 0;
-
- if (!pkt)
- return -EINVAL;
-
pkt->size = sizeof(struct vidc_hal_session_cmd_pkt);
pkt->packet_type = pkt_type;
pkt->session_id = hash32_ptr(session);
@@ -727,29 +662,6 @@
return ret;
}
-static u32 get_hfi_buf_mode(enum buffer_mode_type hal_buf_mode)
-{
- u32 buf_mode;
-
- switch (hal_buf_mode) {
- case HAL_BUFFER_MODE_STATIC:
- buf_mode = HFI_BUFFER_MODE_STATIC;
- break;
- case HAL_BUFFER_MODE_RING:
- buf_mode = HFI_BUFFER_MODE_RING;
- break;
- case HAL_BUFFER_MODE_DYNAMIC:
- buf_mode = HFI_BUFFER_MODE_DYNAMIC;
- break;
- default:
- dprintk(VIDC_ERR, "Invalid buffer mode: %#x\n",
- hal_buf_mode);
- buf_mode = 0;
- break;
- }
- return buf_mode;
-}
-
static u32 get_hfi_ltr_mode(enum ltr_mode ltr_mode_type)
{
u32 ltrmode;
@@ -977,44 +889,6 @@
return rc;
}
-int create_pkt_cmd_session_parse_seq_header(
- struct hfi_cmd_session_parse_sequence_header_packet *pkt,
- struct hal_session *session, struct vidc_seq_hdr *seq_hdr)
-{
- int rc = 0;
-
- if (!pkt || !session || !seq_hdr)
- return -EINVAL;
-
- pkt->size = sizeof(struct hfi_cmd_session_parse_sequence_header_packet);
- pkt->packet_type = HFI_CMD_SESSION_PARSE_SEQUENCE_HEADER;
- pkt->session_id = hash32_ptr(session);
- pkt->header_len = seq_hdr->seq_hdr_len;
- if (!seq_hdr->seq_hdr)
- return -EINVAL;
- pkt->packet_buffer = (u32)seq_hdr->seq_hdr;
- return rc;
-}
-
-int create_pkt_cmd_session_get_seq_hdr(
- struct hfi_cmd_session_get_sequence_header_packet *pkt,
- struct hal_session *session, struct vidc_seq_hdr *seq_hdr)
-{
- int rc = 0;
-
- if (!pkt || !session || !seq_hdr)
- return -EINVAL;
-
- pkt->size = sizeof(struct hfi_cmd_session_get_sequence_header_packet);
- pkt->packet_type = HFI_CMD_SESSION_GET_SEQUENCE_HEADER;
- pkt->session_id = hash32_ptr(session);
- pkt->buffer_len = seq_hdr->seq_hdr_len;
- if (!seq_hdr->seq_hdr)
- return -EINVAL;
- pkt->packet_buffer = (u32)seq_hdr->seq_hdr;
- return rc;
-}
-
int create_pkt_cmd_session_get_buf_req(
struct hfi_cmd_session_get_property_packet *pkt,
struct hal_session *session)
@@ -1076,6 +950,9 @@
pkt->session_id = hash32_ptr(session);
pkt->num_properties = 1;
switch (ptype) {
+ case HAL_CONFIG_VDEC_ENTROPY:
+ pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_VDEC_ENTROPY;
+ break;
case HAL_PARAM_PROFILE_LEVEL_CURRENT:
pkt->rg_property_data[0] =
HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT;
@@ -1089,31 +966,6 @@
return rc;
}
-int create_3x_pkt_cmd_session_get_property(
- struct hfi_cmd_session_get_property_packet *pkt,
- struct hal_session *session, enum hal_property ptype)
-{
- int rc = 0;
-
- if (!pkt || !session) {
- dprintk(VIDC_ERR, "%s Invalid parameters\n", __func__);
- return -EINVAL;
- }
- pkt->size = sizeof(struct hfi_cmd_session_get_property_packet);
- pkt->packet_type = HFI_CMD_SESSION_GET_PROPERTY;
- pkt->session_id = hash32_ptr(session);
- pkt->num_properties = 1;
- switch (ptype) {
- case HAL_CONFIG_VDEC_ENTROPY:
- pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_VDEC_ENTROPY;
- break;
- default:
- rc = create_pkt_cmd_session_get_property(pkt,
- session, ptype);
- }
- return rc;
-}
-
int create_pkt_cmd_session_set_property(
struct hfi_cmd_session_set_property_packet *pkt,
struct hal_session *session,
@@ -1314,48 +1166,9 @@
else
return -EINVAL;
hfi->enable = prop->enable;
- hfi->width = prop->width;
- hfi->height = prop->height;
pkt->size += sizeof(u32) + sizeof(struct hfi_multi_stream);
break;
}
- case HAL_PARAM_VDEC_DISPLAY_PICTURE_BUFFER_COUNT:
- {
- struct hfi_display_picture_buffer_count *hfi;
- struct hal_display_picture_buffer_count *prop =
- (struct hal_display_picture_buffer_count *) pdata;
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VDEC_DISPLAY_PICTURE_BUFFER_COUNT;
- hfi = (struct hfi_display_picture_buffer_count *)
- &pkt->rg_property_data[1];
- hfi->count = prop->count;
- hfi->enable = prop->enable;
- pkt->size += sizeof(u32) +
- sizeof(struct hfi_display_picture_buffer_count);
- break;
- }
- case HAL_PARAM_DIVX_FORMAT:
- {
- int *data = pdata;
-
- pkt->rg_property_data[0] = HFI_PROPERTY_PARAM_DIVX_FORMAT;
- switch (*data) {
- case HAL_DIVX_FORMAT_4:
- pkt->rg_property_data[1] = HFI_DIVX_FORMAT_4;
- break;
- case HAL_DIVX_FORMAT_5:
- pkt->rg_property_data[1] = HFI_DIVX_FORMAT_5;
- break;
- case HAL_DIVX_FORMAT_6:
- pkt->rg_property_data[1] = HFI_DIVX_FORMAT_6;
- break;
- default:
- dprintk(VIDC_ERR, "Invalid divx format: %#x\n", *data);
- break;
- }
- pkt->size += sizeof(u32) * 2;
- break;
- }
case HAL_CONFIG_VDEC_MB_ERROR_MAP_REPORTING:
{
create_pkt_enable(pkt->rg_property_data,
@@ -1364,14 +1177,6 @@
pkt->size += sizeof(u32) * 2;
break;
}
- case HAL_PARAM_VDEC_CONTINUE_DATA_TRANSFER:
- {
- create_pkt_enable(pkt->rg_property_data,
- HFI_PROPERTY_PARAM_VDEC_CONTINUE_DATA_TRANSFER,
- ((struct hal_enable *)pdata)->enable);
- pkt->size += sizeof(u32) * 2;
- break;
- }
case HAL_PARAM_VDEC_SYNC_FRAME_DECODE:
{
create_pkt_enable(pkt->rg_property_data,
@@ -1409,19 +1214,6 @@
pkt->size += sizeof(u32) + sizeof(struct hfi_bitrate);
break;
}
- case HAL_CONFIG_VENC_MAX_BITRATE:
- {
- struct hfi_bitrate *hfi;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE;
- hfi = (struct hfi_bitrate *) &pkt->rg_property_data[1];
- hfi->bit_rate = ((struct hal_bitrate *)pdata)->bit_rate;
- hfi->layer_id = ((struct hal_bitrate *)pdata)->layer_id;
-
- pkt->size += sizeof(u32) + sizeof(struct hfi_bitrate);
- break;
- }
case HAL_PARAM_PROFILE_LEVEL_CURRENT:
{
struct hfi_profile_level *hfi;
@@ -1510,32 +1302,6 @@
pkt->size += sizeof(u32) * 2;
break;
}
- case HAL_PARAM_VENC_MPEG4_TIME_RESOLUTION:
- {
- struct hfi_mpeg4_time_resolution *hfi;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_MPEG4_TIME_RESOLUTION;
- hfi = (struct hfi_mpeg4_time_resolution *)
- &pkt->rg_property_data[1];
- hfi->time_increment_resolution =
- ((struct hal_mpeg4_time_resolution *)pdata)->
- time_increment_resolution;
- pkt->size += sizeof(u32) * 2;
- break;
- }
- case HAL_PARAM_VENC_MPEG4_HEADER_EXTENSION:
- {
- struct hfi_mpeg4_header_extension *hfi;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_MPEG4_HEADER_EXTENSION;
- hfi = (struct hfi_mpeg4_header_extension *)
- &pkt->rg_property_data[1];
- hfi->header_extension = (u32)(unsigned long) pdata;
- pkt->size += sizeof(u32) * 2;
- break;
- }
case HAL_PARAM_VENC_H264_DEBLOCK_CONTROL:
{
struct hfi_h264_db_control *hfi;
@@ -1565,26 +1331,11 @@
sizeof(struct hfi_h264_db_control);
break;
}
- case HAL_PARAM_VENC_SESSION_QP:
- {
- struct hfi_quantization *hfi;
- struct hal_quantization *hal_quant =
- (struct hal_quantization *) pdata;
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_SESSION_QP;
- hfi = (struct hfi_quantization *) &pkt->rg_property_data[1];
- hfi->qp_i = hal_quant->qpi;
- hfi->qp_p = hal_quant->qpp;
- hfi->qp_b = hal_quant->qpb;
- hfi->layer_id = hal_quant->layer_id;
- pkt->size += sizeof(u32) + sizeof(struct hfi_quantization);
- break;
- }
case HAL_PARAM_VENC_SESSION_QP_RANGE:
{
struct hfi_quantization_range *hfi;
- struct hfi_quantization_range *hal_range =
- (struct hfi_quantization_range *) pdata;
+ struct hal_quantization_range *hal_range =
+ (struct hal_quantization_range *) pdata;
u32 min_qp, max_qp;
pkt->rg_property_data[0] =
@@ -1610,9 +1361,10 @@
* 0xiippbb, where ii = qp range for I-frames,
* pp = qp range for P-frames, etc.
*/
- hfi->min_qp = min_qp | min_qp << 8 | min_qp << 16;
- hfi->max_qp = max_qp | max_qp << 8 | max_qp << 16;
- hfi->layer_id = hal_range->layer_id;
+ hfi->min_qp.qp_packed = min_qp | min_qp << 8 | min_qp << 16;
+ hfi->min_qp.layer_id = hal_range->layer_id;
+ hfi->max_qp.qp_packed = max_qp | max_qp << 8 | max_qp << 16;
+ hfi->max_qp.layer_id = hal_range->layer_id;
pkt->size += sizeof(u32) +
sizeof(struct hfi_quantization_range);
@@ -1621,47 +1373,23 @@
case HAL_PARAM_VENC_SESSION_QP_RANGE_PACKED:
{
struct hfi_quantization_range *hfi;
- struct hfi_quantization_range *hal_range =
- (struct hfi_quantization_range *) pdata;
+ struct hal_quantization_range *hal_range =
+ (struct hal_quantization_range *) pdata;
pkt->rg_property_data[0] =
HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE;
hfi = (struct hfi_quantization_range *)
&pkt->rg_property_data[1];
- hfi->min_qp = hal_range->min_qp;
- hfi->max_qp = hal_range->max_qp;
- hfi->layer_id = hal_range->layer_id;
+ hfi->min_qp.qp_packed = hal_range->min_qp;
+ hfi->min_qp.layer_id = hal_range->layer_id;
+ hfi->max_qp.qp_packed = hal_range->max_qp;
+ hfi->max_qp.layer_id = hal_range->layer_id;
pkt->size += sizeof(u32) +
sizeof(struct hfi_quantization_range);
break;
}
- case HAL_PARAM_VENC_SEARCH_RANGE:
- {
- struct hfi_vc1e_perf_cfg_type *hfi;
- struct hal_vc1e_perf_cfg_type *hal_mv_searchrange =
- (struct hal_vc1e_perf_cfg_type *) pdata;
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_VC1_PERF_CFG;
- hfi = (struct hfi_vc1e_perf_cfg_type *)
- &pkt->rg_property_data[1];
- hfi->search_range_x_subsampled[0] =
- hal_mv_searchrange->i_frame.x_subsampled;
- hfi->search_range_x_subsampled[1] =
- hal_mv_searchrange->p_frame.x_subsampled;
- hfi->search_range_x_subsampled[2] =
- hal_mv_searchrange->b_frame.x_subsampled;
- hfi->search_range_y_subsampled[0] =
- hal_mv_searchrange->i_frame.y_subsampled;
- hfi->search_range_y_subsampled[1] =
- hal_mv_searchrange->p_frame.y_subsampled;
- hfi->search_range_y_subsampled[2] =
- hal_mv_searchrange->b_frame.y_subsampled;
- pkt->size += sizeof(u32) +
- sizeof(struct hfi_vc1e_perf_cfg_type);
- break;
- }
case HAL_PARAM_VENC_MAX_NUM_B_FRAMES:
{
struct hfi_max_num_b_frames *hfi;
@@ -1763,21 +1491,26 @@
pkt->rg_property_data[0] =
HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH;
hfi = (struct hfi_intra_refresh *) &pkt->rg_property_data[1];
+ hfi->mbs = 0;
switch (prop->mode) {
case HAL_INTRA_REFRESH_NONE:
hfi->mode = HFI_INTRA_REFRESH_NONE;
break;
case HAL_INTRA_REFRESH_ADAPTIVE:
hfi->mode = HFI_INTRA_REFRESH_ADAPTIVE;
+ hfi->mbs = prop->air_mbs;
break;
case HAL_INTRA_REFRESH_CYCLIC:
hfi->mode = HFI_INTRA_REFRESH_CYCLIC;
+ hfi->mbs = prop->cir_mbs;
break;
case HAL_INTRA_REFRESH_CYCLIC_ADAPTIVE:
hfi->mode = HFI_INTRA_REFRESH_CYCLIC_ADAPTIVE;
+ hfi->mbs = prop->air_mbs;
break;
case HAL_INTRA_REFRESH_RANDOM:
hfi->mode = HFI_INTRA_REFRESH_RANDOM;
+ hfi->mbs = prop->air_mbs;
break;
default:
dprintk(VIDC_ERR,
@@ -1785,9 +1518,6 @@
prop->mode);
break;
}
- hfi->air_mbs = prop->air_mbs;
- hfi->air_ref = prop->air_ref;
- hfi->cir_mbs = prop->cir_mbs;
pkt->size += sizeof(u32) + sizeof(struct hfi_intra_refresh);
break;
}
@@ -1804,9 +1534,6 @@
case HAL_MULTI_SLICE_OFF:
hfi->multi_slice = HFI_MULTI_SLICE_OFF;
break;
- case HAL_MULTI_SLICE_GOB:
- hfi->multi_slice = HFI_MULTI_SLICE_GOB;
- break;
case HAL_MULTI_SLICE_BY_MB_COUNT:
hfi->multi_slice = HFI_MULTI_SLICE_BY_MB_COUNT;
break;
@@ -1889,38 +1616,6 @@
pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
break;
}
- case HAL_PARAM_BUFFER_ALLOC_MODE:
- {
- u32 buffer_type;
- u32 buffer_mode;
- struct hfi_buffer_alloc_mode *hfi;
- struct hal_buffer_alloc_mode *alloc_info = pdata;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE;
- hfi = (struct hfi_buffer_alloc_mode *)
- &pkt->rg_property_data[1];
- buffer_type = get_hfi_buffer(alloc_info->buffer_type);
- if (buffer_type)
- hfi->buffer_type = buffer_type;
- else
- return -EINVAL;
- buffer_mode = get_hfi_buf_mode(alloc_info->buffer_mode);
- if (buffer_mode)
- hfi->buffer_mode = buffer_mode;
- else
- return -EINVAL;
- pkt->size += sizeof(u32) + sizeof(struct hfi_buffer_alloc_mode);
- break;
- }
- case HAL_PARAM_VDEC_FRAME_ASSEMBLY:
- {
- create_pkt_enable(pkt->rg_property_data,
- HFI_PROPERTY_PARAM_VDEC_FRAME_ASSEMBLY,
- ((struct hal_enable *)pdata)->enable);
- pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
- break;
- }
case HAL_PARAM_VENC_H264_VUI_BITSTREAM_RESTRC:
{
create_pkt_enable(pkt->rg_property_data,
@@ -1937,18 +1632,6 @@
pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
break;
}
- case HAL_PARAM_VDEC_SCS_THRESHOLD:
- {
- struct hfi_scs_threshold *hfi;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VDEC_SCS_THRESHOLD;
- hfi = (struct hfi_scs_threshold *) &pkt->rg_property_data[1];
- hfi->threshold_value =
- ((struct hal_scs_threshold *) pdata)->threshold_value;
- pkt->size += sizeof(u32) + sizeof(struct hfi_scs_threshold);
- break;
- }
case HAL_PARAM_MVC_BUFFER_LAYOUT:
{
struct hfi_mvc_buffer_layout_descp_type *hfi;
@@ -2028,23 +1711,6 @@
pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
break;
}
- case HAL_PARAM_VENC_ENABLE_INITIAL_QP:
- {
- struct hfi_initial_quantization *hfi;
- struct hal_initial_quantization *quant = pdata;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_INITIAL_QP;
- hfi = (struct hfi_initial_quantization *)
- &pkt->rg_property_data[1];
- hfi->init_qp_enable = quant->init_qp_enable;
- hfi->qp_i = quant->qpi;
- hfi->qp_p = quant->qpp;
- hfi->qp_b = quant->qpb;
- pkt->size += sizeof(u32) +
- sizeof(struct hfi_initial_quantization);
- break;
- }
case HAL_PARAM_VPE_COLOR_SPACE_CONVERSION:
{
struct hfi_vpe_color_space_conversion *hfi = NULL;
@@ -2107,14 +1773,6 @@
pkt->size += sizeof(u32) * 2;
break;
}
- case HAL_PARAM_VDEC_NON_SECURE_OUTPUT2:
- {
- create_pkt_enable(pkt->rg_property_data,
- HFI_PROPERTY_PARAM_VDEC_NONCP_OUTPUT2,
- ((struct hal_enable *)pdata)->enable);
- pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
- break;
- }
case HAL_PARAM_VENC_HIER_P_HYBRID_MODE:
{
pkt->rg_property_data[0] =
@@ -2135,14 +1793,6 @@
pkt->size += sizeof(u32) * 2;
break;
}
- case HAL_CONFIG_VENC_FRAME_QP:
- {
- pkt->rg_property_data[0] =
- HFI_PROPERTY_CONFIG_VENC_FRAME_QP;
- pkt->rg_property_data[1] = *(u32 *)pdata;
- pkt->size += sizeof(u32) * 2;
- break;
- }
case HAL_CONFIG_VENC_BASELAYER_PRIORITYID:
{
pkt->rg_property_data[0] =
@@ -2174,14 +1824,6 @@
pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
break;
}
- case HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED:
- {
- create_pkt_enable(pkt->rg_property_data,
- HFI_PROPERTY_PARAM_VENC_CONSTRAINED_INTRA_PRED,
- ((struct hal_enable *)pdata)->enable);
- pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
- break;
- }
case HAL_PARAM_VENC_H264_TRANSFORM_8x8:
{
create_pkt_enable(pkt->rg_property_data,
@@ -2237,6 +1879,78 @@
pkt->size += sizeof(u32) + sizeof(struct hfi_iframe_size);
break;
}
+ case HAL_PARAM_BUFFER_SIZE_MINIMUM:
+ {
+ struct hfi_buffer_size_minimum *hfi;
+ struct hal_buffer_size_minimum *prop =
+ (struct hal_buffer_size_minimum *) pdata;
+ u32 buffer_type;
+
+ pkt->rg_property_data[0] =
+ HFI_PROPERTY_PARAM_BUFFER_SIZE_MINIMUM;
+
+ hfi = (struct hfi_buffer_size_minimum *)
+ &pkt->rg_property_data[1];
+ hfi->buffer_size = prop->buffer_size;
+
+ buffer_type = get_hfi_buffer(prop->buffer_type);
+ if (buffer_type)
+ hfi->buffer_type = buffer_type;
+ else
+ return -EINVAL;
+
+ pkt->size += sizeof(u32) + sizeof(struct
+ hfi_buffer_size_minimum);
+ break;
+ }
+ case HAL_PARAM_SYNC_BASED_INTERRUPT:
+ {
+ create_pkt_enable(pkt->rg_property_data,
+ HFI_PROPERTY_PARAM_SYNC_BASED_INTERRUPT,
+ ((struct hal_enable *)pdata)->enable);
+ pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
+ break;
+ }
+ case HAL_PARAM_VENC_VQZIP_SEI:
+ {
+ create_pkt_enable(pkt->rg_property_data,
+ HFI_PROPERTY_PARAM_VENC_VQZIP_SEI_TYPE,
+ ((struct hal_enable *)pdata)->enable);
+ pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
+ break;
+ }
+
+ case HAL_PARAM_VENC_LOW_LATENCY:
+ {
+ struct hfi_enable *hfi;
+
+ pkt->rg_property_data[0] =
+ HFI_PROPERTY_PARAM_VENC_LOW_LATENCY_MODE;
+ hfi = (struct hfi_enable *) &pkt->rg_property_data[1];
+ hfi->enable = ((struct hal_enable *) pdata)->enable;
+ pkt->size += sizeof(u32) * 2;
+ break;
+ }
+ case HAL_CONFIG_VENC_BLUR_RESOLUTION:
+ {
+ struct hfi_frame_size *hfi;
+ struct hal_frame_size *prop = (struct hal_frame_size *) pdata;
+ u32 buffer_type;
+
+ pkt->rg_property_data[0] =
+ HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE;
+ hfi = (struct hfi_frame_size *) &pkt->rg_property_data[1];
+ buffer_type = get_hfi_buffer(prop->buffer_type);
+ if (buffer_type)
+ hfi->buffer_type = buffer_type;
+ else
+ return -EINVAL;
+
+ hfi->height = prop->height;
+ hfi->width = prop->width;
+ pkt->size += sizeof(u32) + sizeof(struct hfi_frame_size);
+ break;
+ }
/* FOLLOWING PROPERTIES ARE NOT IMPLEMENTED IN CORE YET */
case HAL_CONFIG_BUFFER_REQUIREMENTS:
case HAL_CONFIG_PRIORITY:
@@ -2262,7 +1976,6 @@
case HAL_CONFIG_VDEC_MULTI_STREAM:
case HAL_PARAM_VENC_MULTI_SLICE_INFO:
case HAL_CONFIG_VENC_TIMESTAMP_SCALE:
- case HAL_PARAM_BUFFER_SIZE_MINIMUM:
default:
dprintk(VIDC_ERR, "DEFAULT: Calling %#x\n", ptype);
rc = -ENOTSUPP;
@@ -2319,176 +2032,6 @@
return 0;
}
-static int create_3x_pkt_cmd_session_set_property(
- struct hfi_cmd_session_set_property_packet *pkt,
- struct hal_session *session,
- enum hal_property ptype, void *pdata)
-{
- int rc = 0;
-
- if (!pkt || !session || !pdata)
- return -EINVAL;
-
- pkt->size = sizeof(struct hfi_cmd_session_set_property_packet);
- pkt->packet_type = HFI_CMD_SESSION_SET_PROPERTY;
- pkt->session_id = hash32_ptr(session);
- pkt->num_properties = 1;
-
- /*
- * Any session set property which is different in 3XX packetization
- * should be added as a new case below. All unchanged session set
- * properties will be handled in the default case.
- */
- switch (ptype) {
- case HAL_PARAM_VDEC_MULTI_STREAM:
- {
- u32 buffer_type;
- struct hfi_3x_multi_stream *hfi;
- struct hal_multi_stream *prop =
- (struct hal_multi_stream *) pdata;
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VDEC_MULTI_STREAM;
- hfi = (struct hfi_3x_multi_stream *) &pkt->rg_property_data[1];
-
- buffer_type = get_hfi_buffer(prop->buffer_type);
- if (buffer_type)
- hfi->buffer_type = buffer_type;
- else
- return -EINVAL;
- hfi->enable = prop->enable;
- pkt->size += sizeof(u32) + sizeof(struct hfi_3x_multi_stream);
- break;
- }
- case HAL_PARAM_VENC_INTRA_REFRESH:
- {
- struct hfi_3x_intra_refresh *hfi;
- struct hal_intra_refresh *prop =
- (struct hal_intra_refresh *) pdata;
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH;
- hfi = (struct hfi_3x_intra_refresh *) &pkt->rg_property_data[1];
- hfi->mbs = 0;
- switch (prop->mode) {
- case HAL_INTRA_REFRESH_NONE:
- hfi->mode = HFI_INTRA_REFRESH_NONE;
- break;
- case HAL_INTRA_REFRESH_ADAPTIVE:
- hfi->mode = HFI_INTRA_REFRESH_ADAPTIVE;
- hfi->mbs = prop->air_mbs;
- break;
- case HAL_INTRA_REFRESH_CYCLIC:
- hfi->mode = HFI_INTRA_REFRESH_CYCLIC;
- hfi->mbs = prop->cir_mbs;
- break;
- case HAL_INTRA_REFRESH_CYCLIC_ADAPTIVE:
- hfi->mode = HFI_INTRA_REFRESH_CYCLIC_ADAPTIVE;
- hfi->mbs = prop->air_mbs;
- break;
- case HAL_INTRA_REFRESH_RANDOM:
- hfi->mode = HFI_INTRA_REFRESH_RANDOM;
- hfi->mbs = prop->air_mbs;
- break;
- default:
- dprintk(VIDC_ERR,
- "Invalid intra refresh setting: %d\n",
- prop->mode);
- break;
- }
- pkt->size += sizeof(u32) + sizeof(struct hfi_3x_intra_refresh);
- break;
- }
- case HAL_PARAM_SYNC_BASED_INTERRUPT:
- {
- create_pkt_enable(pkt->rg_property_data,
- HFI_PROPERTY_PARAM_SYNC_BASED_INTERRUPT,
- ((struct hal_enable *)pdata)->enable);
- pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
- break;
- }
- case HAL_PARAM_VENC_VQZIP_SEI:
- {
- create_pkt_enable(pkt->rg_property_data,
- HFI_PROPERTY_PARAM_VENC_VQZIP_SEI_TYPE,
- ((struct hal_enable *)pdata)->enable);
- pkt->size += sizeof(u32) + sizeof(struct hfi_enable);
- break;
- }
- /* Deprecated param on Venus 3xx */
- case HAL_PARAM_VDEC_CONTINUE_DATA_TRANSFER:
- {
- rc = -ENOTSUPP;
- break;
- }
- case HAL_PARAM_BUFFER_SIZE_MINIMUM:
- {
- struct hfi_buffer_size_minimum *hfi;
- struct hal_buffer_size_minimum *prop =
- (struct hal_buffer_size_minimum *) pdata;
- u32 buffer_type;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_BUFFER_SIZE_MINIMUM;
-
- hfi = (struct hfi_buffer_size_minimum *)
- &pkt->rg_property_data[1];
- hfi->buffer_size = prop->buffer_size;
-
- buffer_type = get_hfi_buffer(prop->buffer_type);
- if (buffer_type)
- hfi->buffer_type = buffer_type;
- else
- return -EINVAL;
-
- pkt->size += sizeof(u32) + sizeof(struct
- hfi_buffer_count_actual);
- break;
- }
- case HAL_PARAM_VENC_H264_PIC_ORDER_CNT:
- {
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_H264_PICORDER_CNT_TYPE;
- pkt->rg_property_data[1] = *(u32 *)pdata;
- pkt->size += sizeof(u32) * 2;
- break;
- }
- case HAL_PARAM_VENC_LOW_LATENCY:
- {
- struct hfi_enable *hfi;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_PARAM_VENC_LOW_LATENCY_MODE;
- hfi = (struct hfi_enable *) &pkt->rg_property_data[1];
- hfi->enable = ((struct hal_enable *) pdata)->enable;
- pkt->size += sizeof(u32) * 2;
- break;
- }
- case HAL_CONFIG_VENC_BLUR_RESOLUTION:
- {
- struct hfi_frame_size *hfi;
- struct hal_frame_size *prop = (struct hal_frame_size *) pdata;
- u32 buffer_type;
-
- pkt->rg_property_data[0] =
- HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE;
- hfi = (struct hfi_frame_size *) &pkt->rg_property_data[1];
- buffer_type = get_hfi_buffer(prop->buffer_type);
- if (buffer_type)
- hfi->buffer_type = buffer_type;
- else
- return -EINVAL;
-
- hfi->height = prop->height;
- hfi->width = prop->width;
- pkt->size += sizeof(u32) + sizeof(struct hfi_frame_size);
- break;
- }
- default:
- rc = create_pkt_cmd_session_set_property(pkt,
- session, ptype, pdata);
- }
- return rc;
-}
-
int create_pkt_cmd_session_sync_process(
struct hfi_cmd_session_sync_process_packet *pkt,
struct hal_session *session)
@@ -2524,44 +2067,22 @@
.session_etb_decoder = create_pkt_cmd_session_etb_decoder,
.session_etb_encoder = create_pkt_cmd_session_etb_encoder,
.session_ftb = create_pkt_cmd_session_ftb,
- .session_parse_seq_header = create_pkt_cmd_session_parse_seq_header,
- .session_get_seq_hdr = create_pkt_cmd_session_get_seq_hdr,
.session_get_buf_req = create_pkt_cmd_session_get_buf_req,
.session_flush = create_pkt_cmd_session_flush,
.session_get_property = create_pkt_cmd_session_get_property,
.session_set_property = create_pkt_cmd_session_set_property,
};
-struct hfi_packetization_ops *get_venus_3x_ops(void)
-{
- static struct hfi_packetization_ops hfi_venus_3x;
-
- hfi_venus_3x = hfi_default;
-
- /* Override new HFI functions for HFI_PACKETIZATION_3XX here. */
- hfi_venus_3x.session_set_property =
- create_3x_pkt_cmd_session_set_property;
- hfi_venus_3x.session_get_property =
- create_3x_pkt_cmd_session_get_property;
- hfi_venus_3x.session_cmd = create_3x_pkt_cmd_session_cmd;
- hfi_venus_3x.session_sync_process = create_pkt_cmd_session_sync_process;
-
- return &hfi_venus_3x;
-}
-
struct hfi_packetization_ops *hfi_get_pkt_ops_handle(
enum hfi_packetization_type type)
{
dprintk(VIDC_DBG, "%s selected\n",
- type == HFI_PACKETIZATION_LEGACY ? "legacy packetization" :
- type == HFI_PACKETIZATION_3XX ? "3xx packetization" :
- "Unknown hfi");
+ type == HFI_PACKETIZATION_4XX ?
+ "4xx packetization" : "Unknown hfi");
switch (type) {
- case HFI_PACKETIZATION_LEGACY:
+ case HFI_PACKETIZATION_4XX:
return &hfi_default;
- case HFI_PACKETIZATION_3XX:
- return get_venus_3x_ops();
}
return NULL;
diff --git a/drivers/media/platform/msm/vidc/hfi_packetization.h b/drivers/media/platform/msm/vidc/hfi_packetization.h
index a6e7afac..e0def0f 100644
--- a/drivers/media/platform/msm/vidc/hfi_packetization.h
+++ b/drivers/media/platform/msm/vidc/hfi_packetization.h
@@ -23,8 +23,7 @@
((q)->pkt_ops->op(args)) : 0)
enum hfi_packetization_type {
- HFI_PACKETIZATION_LEGACY,
- HFI_PACKETIZATION_3XX,
+ HFI_PACKETIZATION_4XX,
};
struct hfi_packetization_ops {
@@ -74,12 +73,6 @@
int (*session_ftb)(struct hfi_cmd_session_fill_buffer_packet *pkt,
struct hal_session *session,
struct vidc_frame_data *output_frame);
- int (*session_parse_seq_header)(
- struct hfi_cmd_session_parse_sequence_header_packet *pkt,
- struct hal_session *session, struct vidc_seq_hdr *seq_hdr);
- int (*session_get_seq_hdr)(
- struct hfi_cmd_session_get_sequence_header_packet *pkt,
- struct hal_session *session, struct vidc_seq_hdr *seq_hdr);
int (*session_get_buf_req)(
struct hfi_cmd_session_get_property_packet *pkt,
struct hal_session *session);
diff --git a/drivers/media/platform/msm/vidc/hfi_response_handler.c b/drivers/media/platform/msm/vidc/hfi_response_handler.c
index c8eed4b..c8cff77 100644
--- a/drivers/media/platform/msm/vidc/hfi_response_handler.c
+++ b/drivers/media/platform/msm/vidc/hfi_response_handler.c
@@ -707,74 +707,6 @@
return 0;
}
-static int copy_alloc_mode_to_sessions(
- struct hfi_buffer_alloc_mode_supported *prop,
- struct msm_vidc_capability *capabilities,
- u32 num_sessions, u32 codecs, u32 domain)
-{
- u32 i = 0, j = 0;
- struct msm_vidc_capability *capability;
- u32 sess_codec;
- u32 sess_domain;
-
- /*
- * iterate over num_sessions and copy all the entries
- * to matching sessions.
- */
- for (i = 0; i < num_sessions; i++) {
- sess_codec = 0;
- sess_domain = 0;
- capability = &capabilities[i];
-
- if (capability->codec)
- sess_codec =
- vidc_get_hfi_codec(capability->codec);
- if (capability->domain)
- sess_domain =
- vidc_get_hfi_domain(capability->domain);
-
- if (!(sess_codec & codecs && sess_domain & domain))
- continue;
-
- for (j = 0; j < prop->num_entries; j++) {
- if (prop->buffer_type == HFI_BUFFER_OUTPUT ||
- prop->buffer_type == HFI_BUFFER_OUTPUT2) {
- switch (prop->rg_data[j]) {
- case HFI_BUFFER_MODE_STATIC:
- capability->alloc_mode_out |=
- HAL_BUFFER_MODE_STATIC;
- break;
- case HFI_BUFFER_MODE_RING:
- capability->alloc_mode_out |=
- HAL_BUFFER_MODE_RING;
- break;
- case HFI_BUFFER_MODE_DYNAMIC:
- capability->alloc_mode_out |=
- HAL_BUFFER_MODE_DYNAMIC;
- break;
- }
- } else if (prop->buffer_type == HFI_BUFFER_INPUT) {
- switch (prop->rg_data[j]) {
- case HFI_BUFFER_MODE_STATIC:
- capability->alloc_mode_in |=
- HAL_BUFFER_MODE_STATIC;
- break;
- case HFI_BUFFER_MODE_RING:
- capability->alloc_mode_in |=
- HAL_BUFFER_MODE_RING;
- break;
- case HFI_BUFFER_MODE_DYNAMIC:
- capability->alloc_mode_in |=
- HAL_BUFFER_MODE_DYNAMIC;
- break;
- }
- }
- }
- }
-
- return 0;
-}
-
static enum vidc_status hfi_parse_init_done_properties(
struct msm_vidc_capability *capabilities,
u32 num_sessions, u8 *data_ptr, u32 num_properties,
@@ -913,13 +845,6 @@
num_properties--;
break;
}
- case HFI_PROPERTY_PARAM_INTERLACE_FORMAT_SUPPORTED:
- {
- next_offset +=
- sizeof(struct hfi_interlace_format_supported);
- num_properties--;
- break;
- }
case HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SUPPORTED:
{
next_offset +=
@@ -933,12 +858,6 @@
num_properties--;
break;
}
- case HFI_PROPERTY_PARAM_MAX_SEQUENCE_HEADER_SIZE:
- {
- next_offset += sizeof(u32);
- num_properties--;
- break;
- }
case HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH:
{
next_offset +=
@@ -946,29 +865,6 @@
num_properties--;
break;
}
- case HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE_SUPPORTED:
- {
- struct hfi_buffer_alloc_mode_supported *prop =
- (struct hfi_buffer_alloc_mode_supported *)
- (data_ptr + next_offset);
-
- if (prop->num_entries >= 32) {
- dprintk(VIDC_ERR,
- "%s - num_entries: %d from f/w seems suspect\n",
- __func__, prop->num_entries);
- break;
- }
- next_offset +=
- sizeof(struct hfi_buffer_alloc_mode_supported) -
- sizeof(u32) + prop->num_entries * sizeof(u32);
-
- copy_alloc_mode_to_sessions(prop,
- capabilities, num_sessions,
- codecs, domain);
-
- num_properties--;
- break;
- }
default:
dprintk(VIDC_DBG,
"%s: default case - data_ptr %pK, prop_id 0x%x\n",
@@ -1752,42 +1648,6 @@
return 0;
}
-static int hfi_process_session_get_seq_hdr_done(
- u32 device_id,
- struct hfi_msg_session_get_sequence_header_done_packet *pkt,
- struct msm_vidc_cb_info *info)
-{
- struct msm_vidc_cb_data_done data_done = {0};
-
- if (!pkt || pkt->size !=
- sizeof(struct
- hfi_msg_session_get_sequence_header_done_packet)) {
- dprintk(VIDC_ERR, "%s: bad packet/packet size\n",
- __func__);
- return -E2BIG;
- }
-
- dprintk(VIDC_DBG, "RECEIVED:SESSION_GET_SEQ_HDR_DONE[%#x]\n",
- pkt->session_id);
-
- data_done.device_id = device_id;
- data_done.size = sizeof(struct msm_vidc_cb_data_done);
- data_done.session_id = (void *)(uintptr_t)pkt->session_id;
- data_done.status = hfi_map_err_status(pkt->error_type);
- data_done.output_done.packet_buffer1 =
- (ion_phys_addr_t)pkt->sequence_header;
- data_done.output_done.filled_len1 = pkt->header_len;
- dprintk(VIDC_INFO, "seq_hdr: %#x, Length: %d\n",
- pkt->sequence_header, pkt->header_len);
-
- *info = (struct msm_vidc_cb_info) {
- .response_type = HAL_SESSION_GET_SEQ_HDR_DONE,
- .response.data = data_done,
- };
-
- return 0;
-}
-
static void hfi_process_sys_get_prop_image_version(
struct hfi_msg_sys_property_info_packet *pkt)
{
@@ -1933,9 +1793,6 @@
case HFI_MSG_SYS_RELEASE_RESOURCE:
pkt_func = (pkt_func_def)hfi_process_sys_rel_resource_done;
break;
- case HFI_MSG_SESSION_GET_SEQUENCE_HEADER_DONE:
- pkt_func = (pkt_func_def) hfi_process_session_get_seq_hdr_done;
- break;
case HFI_MSG_SESSION_RELEASE_BUFFERS_DONE:
pkt_func = (pkt_func_def)hfi_process_session_rel_buf_done;
break;
diff --git a/drivers/media/platform/msm/vidc/msm_vdec.c b/drivers/media/platform/msm/vidc/msm_vdec.c
index dedd15f..a635a6a 100644
--- a/drivers/media/platform/msm/vidc/msm_vdec.c
+++ b/drivers/media/platform/msm/vidc/msm_vdec.c
@@ -51,7 +51,6 @@
};
static const char *const mpeg_vidc_video_alloc_mode_type[] = {
"Buffer Allocation Static",
- "Buffer Allocation Ring Buffer",
"Buffer Allocation Dynamic Buffer"
};
@@ -1298,7 +1297,6 @@
default:
dprintk(VIDC_ERR, "Invalid q type = %d\n", q->type);
rc = -EINVAL;
- break;
}
exit:
return rc;
@@ -1663,12 +1661,10 @@
inst->capability.height.max = DEFAULT_HEIGHT;
inst->capability.width.min = MIN_SUPPORTED_WIDTH;
inst->capability.width.max = DEFAULT_WIDTH;
- inst->capability.alloc_mode_in = HAL_BUFFER_MODE_STATIC;
- inst->capability.alloc_mode_out = HAL_BUFFER_MODE_STATIC;
inst->capability.secure_output2_threshold.min = 0;
inst->capability.secure_output2_threshold.max = 0;
inst->buffer_mode_set[OUTPUT_PORT] = HAL_BUFFER_MODE_STATIC;
- inst->buffer_mode_set[CAPTURE_PORT] = HAL_BUFFER_MODE_STATIC;
+ inst->buffer_mode_set[CAPTURE_PORT] = HAL_BUFFER_MODE_DYNAMIC;
inst->prop.fps = DEFAULT_FPS;
inst->operating_rate = 0;
memcpy(&inst->fmts[OUTPUT_PORT], &vdec_formats[2],
@@ -1929,7 +1925,6 @@
void *pdata = NULL;
struct hfi_device *hdev;
struct hal_extradata_enable extra;
- struct hal_buffer_alloc_mode alloc_mode;
struct hal_multi_stream multi_stream;
struct v4l2_ctrl *temp_ctrl = NULL;
struct hal_profile_level profile_level;
@@ -2084,16 +2079,6 @@
"Failed setting OUTPUT2 size : %d\n",
rc);
- alloc_mode.buffer_mode =
- inst->buffer_mode_set[CAPTURE_PORT];
- alloc_mode.buffer_type = HAL_BUFFER_OUTPUT2;
- rc = call_hfi_op(hdev, session_set_property,
- inst->session, HAL_PARAM_BUFFER_ALLOC_MODE,
- &alloc_mode);
- if (rc)
- dprintk(VIDC_ERR,
- "Failed to set alloc_mode on OUTPUT2: %d\n",
- rc);
break;
default:
dprintk(VIDC_ERR,
diff --git a/drivers/media/platform/msm/vidc/msm_venc.c b/drivers/media/platform/msm/vidc/msm_venc.c
index 6c57b2e..89d44de 100644
--- a/drivers/media/platform/msm/vidc/msm_venc.c
+++ b/drivers/media/platform/msm/vidc/msm_venc.c
@@ -2275,23 +2275,6 @@
(inst->fmts[CAPTURE_PORT].fourcc == V4L2_PIX_FMT_H264) ||
(inst->fmts[CAPTURE_PORT].fourcc == V4L2_PIX_FMT_HEVC);
- if (is_cont_intra_supported) {
- if (ctrl->val != HAL_INTRA_REFRESH_NONE)
- enable.enable = true;
- else
- enable.enable = false;
-
- rc = call_hfi_op(hdev, session_set_property,
- (void *)inst->session,
- HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED, &enable);
- if (rc) {
- dprintk(VIDC_ERR,
- "Failed to set constrained intra\n");
- rc = -EINVAL;
- break;
- }
- }
-
property_id = HAL_PARAM_VENC_INTRA_REFRESH;
intra_refresh.mode = ctrl->val;
@@ -2870,11 +2853,9 @@
inst->capability.height.max = DEFAULT_HEIGHT;
inst->capability.width.min = MIN_SUPPORTED_WIDTH;
inst->capability.width.max = DEFAULT_WIDTH;
- inst->capability.alloc_mode_in = HAL_BUFFER_MODE_STATIC;
- inst->capability.alloc_mode_out = HAL_BUFFER_MODE_STATIC;
inst->capability.secure_output2_threshold.min = 0;
inst->capability.secure_output2_threshold.max = 0;
- inst->buffer_mode_set[OUTPUT_PORT] = HAL_BUFFER_MODE_STATIC;
+ inst->buffer_mode_set[OUTPUT_PORT] = HAL_BUFFER_MODE_DYNAMIC;
inst->buffer_mode_set[CAPTURE_PORT] = HAL_BUFFER_MODE_STATIC;
inst->prop.fps = DEFAULT_FPS;
inst->capability.pixelprocess_capabilities = 0;
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c
index 8106815..3dd5a15 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_common.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c
@@ -3708,20 +3708,6 @@
"Failed to scale bus. Performance might be impacted\n");
}
-static int request_seq_header(struct msm_vidc_inst *inst,
- struct vidc_frame_data *data)
-{
- struct vidc_seq_hdr seq_hdr = {
- .seq_hdr = data->device_addr,
- .seq_hdr_len = data->alloc_len,
- };
-
- dprintk(VIDC_DBG, "Requesting sequence header in %pa\n",
- &seq_hdr.seq_hdr);
- return call_hfi_op(inst->core->device, session_get_seq_hdr,
- inst->session, &seq_hdr);
-}
-
/*
* Attempts to queue `vb` to hardware. If, for various reasons, the buffer
* cannot be queued to hardware, the buffer will be staged for commit in the
@@ -3861,18 +3847,6 @@
if (batch_mode) {
int ftb_index = 0, c = 0;
- for (c = 0; atomic_read(&inst->seq_hdr_reqs) > 0; ++c) {
- rc = request_seq_header(inst, &ftbs.data[c]);
- if (rc) {
- dprintk(VIDC_ERR,
- "Failed requesting sequence header: %d\n",
- rc);
- goto err_bad_input;
- }
-
- atomic_dec(&inst->seq_hdr_reqs);
- }
-
ftb_index = c;
rc = call_hfi_op(hdev, session_process_batch, inst->session,
etbs.count, etbs.data,
@@ -3917,18 +3891,6 @@
if (!batch_mode && ftbs.count) {
int c = 0;
- for (c = 0; atomic_read(&inst->seq_hdr_reqs) > 0; ++c) {
- rc = request_seq_header(inst, &ftbs.data[c]);
- if (rc) {
- dprintk(VIDC_ERR,
- "Failed requesting sequence header: %d\n",
- rc);
- goto err_bad_input;
- }
-
- atomic_dec(&inst->seq_hdr_reqs);
- }
-
for (; c < ftbs.count; ++c) {
struct vidc_frame_data *frame_data = &ftbs.data[c];
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_debug.c b/drivers/media/platform/msm/vidc/msm_vidc_debug.c
index a0e0a86..f418260 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_debug.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_debug.c
@@ -304,9 +304,6 @@
case HAL_BUFFER_MODE_STATIC:
write_str(&dbg_buf, "buffer mode : %s\n", "static");
break;
- case HAL_BUFFER_MODE_RING:
- write_str(&dbg_buf, "buffer mode : %s\n", "ring");
- break;
case HAL_BUFFER_MODE_DYNAMIC:
write_str(&dbg_buf, "buffer mode : %s\n", "dynamic");
break;
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_internal.h b/drivers/media/platform/msm/vidc/msm_vidc_internal.h
index c05a9cc..b4f3cd7 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_internal.h
+++ b/drivers/media/platform/msm/vidc/msm_vidc_internal.h
@@ -292,7 +292,6 @@
struct msm_vidc_capability capability;
u32 buffer_size_limit;
enum buffer_mode_type buffer_mode_set[MAX_PORT_NUM];
- atomic_t seq_hdr_reqs;
struct v4l2_ctrl **ctrls;
bool dcvs_mode;
enum msm_vidc_pixel_depth bit_depth;
diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c
index 83846d3..a59d73f 100644
--- a/drivers/media/platform/msm/vidc/venus_hfi.c
+++ b/drivers/media/platform/msm/vidc/venus_hfi.c
@@ -223,22 +223,6 @@
}
break;
}
- case HFI_CMD_SESSION_PARSE_SEQUENCE_HEADER:
- {
- struct hfi_cmd_session_parse_sequence_header_packet *pkt =
- (struct hfi_cmd_session_parse_sequence_header_packet *)
- packet;
- pkt->packet_buffer -= fw_bias;
- break;
- }
- case HFI_CMD_SESSION_GET_SEQUENCE_HEADER:
- {
- struct hfi_cmd_session_get_sequence_header_packet *pkt =
- (struct hfi_cmd_session_get_sequence_header_packet *)
- packet;
- pkt->packet_buffer -= fw_bias;
- break;
- }
default:
break;
}
@@ -1358,8 +1342,7 @@
mutex_lock(&device->lock);
- if (device->packetization_type == HFI_PACKETIZATION_3XX)
- prop = HAL_VIDEO_DYNAMIC_BUF_MODE;
+ prop = HAL_VIDEO_DYNAMIC_BUF_MODE;
mutex_unlock(&device->lock);
return prop;
@@ -3025,72 +3008,6 @@
return rc;
}
-static int venus_hfi_session_parse_seq_hdr(void *sess,
- struct vidc_seq_hdr *seq_hdr)
-{
- struct hfi_cmd_session_parse_sequence_header_packet *pkt;
- int rc = 0;
- u8 packet[VIDC_IFACEQ_VAR_SMALL_PKT_SIZE];
- struct hal_session *session = sess;
- struct venus_hfi_device *device;
-
- if (!session || !session->device || !seq_hdr) {
- dprintk(VIDC_ERR, "Invalid Params\n");
- return -EINVAL;
- }
-
- device = session->device;
- mutex_lock(&device->lock);
-
- pkt = (struct hfi_cmd_session_parse_sequence_header_packet *)packet;
- rc = call_hfi_pkt_op(device, session_parse_seq_header,
- pkt, session, seq_hdr);
- if (rc) {
- dprintk(VIDC_ERR,
- "Session parse seq hdr: failed to create pkt\n");
- goto err_create_pkt;
- }
-
- if (__iface_cmdq_write(session->device, pkt))
- rc = -ENOTEMPTY;
-err_create_pkt:
- mutex_unlock(&device->lock);
- return rc;
-}
-
-static int venus_hfi_session_get_seq_hdr(void *sess,
- struct vidc_seq_hdr *seq_hdr)
-{
- struct hfi_cmd_session_get_sequence_header_packet *pkt;
- int rc = 0;
- u8 packet[VIDC_IFACEQ_VAR_SMALL_PKT_SIZE];
- struct hal_session *session = sess;
- struct venus_hfi_device *device;
-
- if (!session || !session->device || !seq_hdr) {
- dprintk(VIDC_ERR, "Invalid Params\n");
- return -EINVAL;
- }
-
- device = session->device;
- mutex_lock(&device->lock);
-
- pkt = (struct hfi_cmd_session_get_sequence_header_packet *)packet;
- rc = call_hfi_pkt_op(device, session_get_seq_hdr,
- pkt, session, seq_hdr);
- if (rc) {
- dprintk(VIDC_ERR,
- "Session get seq hdr: failed to create pkt\n");
- goto err_create_pkt;
- }
-
- if (__iface_cmdq_write(session->device, pkt))
- rc = -ENOTEMPTY;
-err_create_pkt:
- mutex_unlock(&device->lock);
- return rc;
-}
-
static int venus_hfi_session_get_buf_req(void *sess)
{
struct hfi_cmd_session_get_property_packet pkt;
@@ -4537,23 +4454,13 @@
static int __initialize_packetization(struct venus_hfi_device *device)
{
int rc = 0;
- const char *hfi_version;
if (!device || !device->res) {
dprintk(VIDC_ERR, "%s - invalid param\n", __func__);
return -EINVAL;
}
- hfi_version = device->res->hfi_version;
-
- if (!hfi_version) {
- device->packetization_type = HFI_PACKETIZATION_LEGACY;
- } else if (!strcmp(hfi_version, "3xx")) {
- device->packetization_type = HFI_PACKETIZATION_3XX;
- } else {
- dprintk(VIDC_ERR, "Unsupported hfi version\n");
- return -EINVAL;
- }
+ device->packetization_type = HFI_PACKETIZATION_4XX;
device->pkt_ops = hfi_get_pkt_ops_handle(device->packetization_type);
if (!device->pkt_ops) {
@@ -4705,8 +4612,6 @@
hdev->session_etb = venus_hfi_session_etb;
hdev->session_ftb = venus_hfi_session_ftb;
hdev->session_process_batch = venus_hfi_session_process_batch;
- hdev->session_parse_seq_hdr = venus_hfi_session_parse_seq_hdr;
- hdev->session_get_seq_hdr = venus_hfi_session_get_seq_hdr;
hdev->session_get_buf_req = venus_hfi_session_get_buf_req;
hdev->session_flush = venus_hfi_session_flush;
hdev->session_set_property = venus_hfi_session_set_property;
diff --git a/drivers/media/platform/msm/vidc/vidc_hfi.h b/drivers/media/platform/msm/vidc/vidc_hfi.h
index 6088873..949bc47 100644
--- a/drivers/media/platform/msm/vidc/vidc_hfi.h
+++ b/drivers/media/platform/msm/vidc/vidc_hfi.h
@@ -63,8 +63,6 @@
#define HFI_BUFFER_INTERNAL_SCRATCH_1 (HFI_OX_BASE + 0x5)
#define HFI_BUFFER_INTERNAL_SCRATCH_2 (HFI_OX_BASE + 0x6)
-#define HFI_BUFFER_MODE_STATIC (HFI_OX_BASE + 0x1)
-#define HFI_BUFFER_MODE_RING (HFI_OX_BASE + 0x2)
#define HFI_BUFFER_MODE_DYNAMIC (HFI_OX_BASE + 0x3)
#define HFI_FLUSH_INPUT (HFI_OX_BASE + 0x1)
@@ -131,24 +129,14 @@
(HFI_PROPERTY_PARAM_OX_START + 0x001)
#define HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO \
(HFI_PROPERTY_PARAM_OX_START + 0x002)
-#define HFI_PROPERTY_PARAM_INTERLACE_FORMAT_SUPPORTED \
- (HFI_PROPERTY_PARAM_OX_START + 0x003)
-#define HFI_PROPERTY_PARAM_CHROMA_SITE \
-(HFI_PROPERTY_PARAM_OX_START + 0x004)
#define HFI_PROPERTY_PARAM_EXTRA_DATA_HEADER_CONFIG \
(HFI_PROPERTY_PARAM_OX_START + 0x005)
#define HFI_PROPERTY_PARAM_INDEX_EXTRADATA \
(HFI_PROPERTY_PARAM_OX_START + 0x006)
-#define HFI_PROPERTY_PARAM_DIVX_FORMAT \
- (HFI_PROPERTY_PARAM_OX_START + 0x007)
-#define HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE \
- (HFI_PROPERTY_PARAM_OX_START + 0x008)
#define HFI_PROPERTY_PARAM_S3D_FRAME_PACKING_EXTRADATA \
(HFI_PROPERTY_PARAM_OX_START + 0x009)
#define HFI_PROPERTY_PARAM_ERR_DETECTION_CODE_EXTRADATA \
(HFI_PROPERTY_PARAM_OX_START + 0x00A)
-#define HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE_SUPPORTED \
- (HFI_PROPERTY_PARAM_OX_START + 0x00B)
#define HFI_PROPERTY_PARAM_BUFFER_SIZE_MINIMUM \
(HFI_PROPERTY_PARAM_OX_START + 0x00C)
#define HFI_PROPERTY_PARAM_SYNC_BASED_INTERRUPT \
@@ -162,15 +150,10 @@
(HFI_PROPERTY_CONFIG_OX_START + 0x002)
#define HFI_PROPERTY_CONFIG_PRIORITY \
(HFI_PROPERTY_CONFIG_OX_START + 0x003)
-#define HFI_PROPERTY_CONFIG_BATCH_INFO \
- (HFI_PROPERTY_CONFIG_OX_START + 0x004)
-
#define HFI_PROPERTY_PARAM_VDEC_OX_START \
(HFI_DOMAIN_BASE_VDEC + HFI_ARCH_OX_OFFSET + 0x3000)
#define HFI_PROPERTY_PARAM_VDEC_CONTINUE_DATA_TRANSFER \
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x001)
-#define HFI_PROPERTY_PARAM_VDEC_DISPLAY_PICTURE_BUFFER_COUNT\
- (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x002)
#define HFI_PROPERTY_PARAM_VDEC_MULTI_VIEW_SELECT \
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x003)
#define HFI_PROPERTY_PARAM_VDEC_PICTURE_TYPE_DECODE \
@@ -181,8 +164,6 @@
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x006)
#define HFI_PROPERTY_PARAM_VDEC_NUM_CONCEALED_MB \
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x007)
-#define HFI_PROPERTY_PARAM_VDEC_H264_ENTROPY_SWITCHING \
- (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x008)
#define HFI_PROPERTY_PARAM_VDEC_OUTPUT2_KEEP_ASPECT_RATIO\
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x009)
#define HFI_PROPERTY_PARAM_VDEC_FRAME_RATE_EXTRADATA \
@@ -193,9 +174,6 @@
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00C)
#define HFI_PROPERTY_PARAM_VDEC_THUMBNAIL_MODE \
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00D)
-
-#define HFI_PROPERTY_PARAM_VDEC_FRAME_ASSEMBLY \
- (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x00E)
#define HFI_PROPERTY_PARAM_VDEC_VC1_FRAMEDISP_EXTRADATA \
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x011)
#define HFI_PROPERTY_PARAM_VDEC_VC1_SEQDISP_EXTRADATA \
@@ -214,8 +192,6 @@
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x018)
#define HFI_PROPERTY_PARAM_VDEC_FRAME_BITS_INFO_EXTRADATA \
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x019)
-#define HFI_PROPERTY_PARAM_VDEC_SCS_THRESHOLD \
- (HFI_PROPERTY_PARAM_VDEC_OX_START + 0x01A)
#define HFI_PROPERTY_PARAM_VUI_DISPLAY_INFO_EXTRADATA \
(HFI_PROPERTY_PARAM_VDEC_OX_START + 0x01B)
#define HFI_PROPERTY_PARAM_VDEC_VQZIP_SEI_EXTRADATA \
@@ -256,12 +232,8 @@
(HFI_PROPERTY_PARAM_VENC_OX_START + 0x008)
#define HFI_PROPERTY_PARAM_VENC_OVERRIDE_QP_EXTRADATA \
(HFI_PROPERTY_PARAM_VENC_OX_START + 0x009)
-
#define HFI_PROPERTY_CONFIG_VENC_OX_START \
(HFI_DOMAIN_BASE_VENC + HFI_ARCH_OX_OFFSET + 0x6000)
-#define HFI_PROPERTY_CONFIG_VENC_FRAME_QP \
- (HFI_PROPERTY_CONFIG_VENC_OX_START + 0x001)
-
#define HFI_PROPERTY_PARAM_VPE_OX_START \
(HFI_DOMAIN_BASE_VPE + HFI_ARCH_OX_OFFSET + 0x7000)
#define HFI_PROPERTY_PARAM_VPE_COLOR_SPACE_CONVERSION \
@@ -296,13 +268,6 @@
u32 buffer_alignment;
};
-#define HFI_CHROMA_SITE_0 (HFI_OX_BASE + 0x1)
-#define HFI_CHROMA_SITE_1 (HFI_OX_BASE + 0x2)
-#define HFI_CHROMA_SITE_2 (HFI_OX_BASE + 0x3)
-#define HFI_CHROMA_SITE_3 (HFI_OX_BASE + 0x4)
-#define HFI_CHROMA_SITE_4 (HFI_OX_BASE + 0x5)
-#define HFI_CHROMA_SITE_5 (HFI_OX_BASE + 0x6)
-
struct hfi_data_payload {
u32 size;
u8 rg_data[1];
@@ -312,11 +277,6 @@
u32 picture_type;
};
-struct hfi_display_picture_buffer_count {
- int enable;
- u32 count;
-};
-
struct hfi_extra_data_header_config {
u32 type;
u32 buffer_type;
@@ -325,17 +285,6 @@
u32 client_extra_data_id;
};
-struct hfi_interlace_format_supported {
- u32 buffer_type;
- u32 format;
-};
-
-struct hfi_buffer_alloc_mode_supported {
- u32 buffer_type;
- u32 num_entries;
- u32 rg_data[1];
-};
-
struct hfi_mb_error_map {
u32 error_map_size;
u8 rg_error_map[1];
@@ -419,8 +368,6 @@
#define HFI_MSG_SESSION_PROPERTY_INFO (HFI_MSG_SESSION_OX_START + 0x9)
#define HFI_MSG_SESSION_RELEASE_RESOURCES_DONE \
(HFI_MSG_SESSION_OX_START + 0xA)
-#define HFI_MSG_SESSION_PARSE_SEQUENCE_HEADER_DONE \
- (HFI_MSG_SESSION_OX_START + 0xB)
#define HFI_MSG_SESSION_RELEASE_BUFFERS_DONE \
(HFI_MSG_SESSION_OX_START + 0xC)
@@ -576,14 +523,6 @@
u32 session_id;
};
-struct hfi_cmd_session_parse_sequence_header_packet {
- u32 size;
- u32 packet_type;
- u32 session_id;
- u32 header_len;
- u32 packet_buffer;
-};
-
struct hfi_msg_sys_session_abort_done_packet {
u32 size;
u32 packet_type;
@@ -734,15 +673,6 @@
u32 rgData[0];
};
-struct hfi_msg_session_parse_sequence_header_done_packet {
- u32 size;
- u32 packet_type;
- u32 session_id;
- u32 error_type;
- u32 num_properties;
- u32 rg_property_data[1];
-};
-
struct hfi_msg_session_property_info_packet {
u32 size;
u32 packet_type;
diff --git a/drivers/media/platform/msm/vidc/vidc_hfi_api.h b/drivers/media/platform/msm/vidc/vidc_hfi_api.h
index 7edada9..1ed3d2d 100644
--- a/drivers/media/platform/msm/vidc/vidc_hfi_api.h
+++ b/drivers/media/platform/msm/vidc/vidc_hfi_api.h
@@ -946,10 +946,6 @@
u32 ngap;
};
-struct hal_seq_header_info {
- u32 nax_header_len;
-};
-
struct hal_aspect_ratio {
u32 aspect_width;
u32 aspect_height;
@@ -1068,11 +1064,6 @@
u32 extradata_size;
};
-struct vidc_seq_hdr {
- ion_phys_addr_t seq_hdr;
- u32 seq_hdr_len;
-};
-
struct hal_fw_info {
char version[VENUS_VERSION_LENGTH];
phys_addr_t base_addr;
@@ -1096,9 +1087,8 @@
};
enum buffer_mode_type {
- HAL_BUFFER_MODE_STATIC = 0x001,
- HAL_BUFFER_MODE_RING = 0x010,
HAL_BUFFER_MODE_DYNAMIC = 0x100,
+ HAL_BUFFER_MODE_STATIC = 0x001,
};
struct hal_buffer_alloc_mode {
@@ -1188,7 +1178,6 @@
struct hal_nal_stream_format_supported nal_stream_format_supported;
struct hal_nal_stream_format_select nal_stream_format_select;
struct hal_multi_view_format multi_view_format;
- struct hal_seq_header_info seq_header_info;
struct hal_codec_supported codec_supported;
struct hal_multi_view_select multi_view_select;
struct hal_timestamp_scale timestamp_scale;
@@ -1344,7 +1333,6 @@
struct vidc_frame_plane_config frame_plane_config;
struct vidc_uncompressed_frame_config uncompressed_frame_config;
struct vidc_frame_data frame_data;
- struct vidc_seq_hdr seq_hdr;
struct vidc_hal_ebd ebd;
struct vidc_hal_fbd fbd;
struct vidc_hal_sys_init_done sys_init_done;
@@ -1505,10 +1493,6 @@
int (*session_process_batch)(void *sess,
int num_etbs, struct vidc_frame_data etbs[],
int num_ftbs, struct vidc_frame_data ftbs[]);
- int (*session_parse_seq_hdr)(void *sess,
- struct vidc_seq_hdr *seq_hdr);
- int (*session_get_seq_hdr)(void *sess,
- struct vidc_seq_hdr *seq_hdr);
int (*session_get_buf_req)(void *sess);
int (*session_flush)(void *sess, enum hal_flush flush_mode);
int (*session_set_property)(void *sess, enum hal_property ptype,
diff --git a/drivers/media/platform/msm/vidc/vidc_hfi_helper.h b/drivers/media/platform/msm/vidc/vidc_hfi_helper.h
index 9ab1a81..a552992 100644
--- a/drivers/media/platform/msm/vidc/vidc_hfi_helper.h
+++ b/drivers/media/platform/msm/vidc/vidc_hfi_helper.h
@@ -76,14 +76,8 @@
#define HFI_EVENT_SESSION_ERROR (HFI_COMMON_BASE + 0x2)
#define HFI_VIDEO_CODEC_H264 0x00000002
-#define HFI_VIDEO_CODEC_H263 0x00000004
#define HFI_VIDEO_CODEC_MPEG1 0x00000008
#define HFI_VIDEO_CODEC_MPEG2 0x00000010
-#define HFI_VIDEO_CODEC_MPEG4 0x00000020
-#define HFI_VIDEO_CODEC_DIVX_311 0x00000040
-#define HFI_VIDEO_CODEC_DIVX 0x00000080
-#define HFI_VIDEO_CODEC_VC1 0x00000100
-#define HFI_VIDEO_CODEC_SPARK 0x00000200
#define HFI_VIDEO_CODEC_VP8 0x00001000
#define HFI_VIDEO_CODEC_HEVC 0x00002000
#define HFI_VIDEO_CODEC_VP9 0x00004000
@@ -113,18 +107,7 @@
#define HFI_H264_LEVEL_42 0x00002000
#define HFI_H264_LEVEL_5 0x00004000
#define HFI_H264_LEVEL_51 0x00008000
-#define HFI_H264_LEVEL_52 0x00010000
-
-#define HFI_H263_PROFILE_BASELINE 0x00000001
-
-#define HFI_H263_LEVEL_10 0x00000001
-#define HFI_H263_LEVEL_20 0x00000002
-#define HFI_H263_LEVEL_30 0x00000004
-#define HFI_H263_LEVEL_40 0x00000008
-#define HFI_H263_LEVEL_45 0x00000010
-#define HFI_H263_LEVEL_50 0x00000020
-#define HFI_H263_LEVEL_60 0x00000040
-#define HFI_H263_LEVEL_70 0x00000080
+#define HFI_H264_LEVEL_52 0x00010000
#define HFI_MPEG2_PROFILE_SIMPLE 0x00000001
#define HFI_MPEG2_PROFILE_MAIN 0x00000002
@@ -138,36 +121,6 @@
#define HFI_MPEG2_LEVEL_H14 0x00000004
#define HFI_MPEG2_LEVEL_HL 0x00000008
-#define HFI_MPEG4_PROFILE_SIMPLE 0x00000001
-#define HFI_MPEG4_PROFILE_ADVANCEDSIMPLE 0x00000002
-
-#define HFI_MPEG4_LEVEL_0 0x00000001
-#define HFI_MPEG4_LEVEL_0b 0x00000002
-#define HFI_MPEG4_LEVEL_1 0x00000004
-#define HFI_MPEG4_LEVEL_2 0x00000008
-#define HFI_MPEG4_LEVEL_3 0x00000010
-#define HFI_MPEG4_LEVEL_4 0x00000020
-#define HFI_MPEG4_LEVEL_4a 0x00000040
-#define HFI_MPEG4_LEVEL_5 0x00000080
-#define HFI_MPEG4_LEVEL_6 0x00000100
-#define HFI_MPEG4_LEVEL_7 0x00000200
-#define HFI_MPEG4_LEVEL_8 0x00000400
-#define HFI_MPEG4_LEVEL_9 0x00000800
-#define HFI_MPEG4_LEVEL_3b 0x00001000
-
-#define HFI_VC1_PROFILE_SIMPLE 0x00000001
-#define HFI_VC1_PROFILE_MAIN 0x00000002
-#define HFI_VC1_PROFILE_ADVANCED 0x00000004
-
-#define HFI_VC1_LEVEL_LOW 0x00000001
-#define HFI_VC1_LEVEL_MEDIUM 0x00000002
-#define HFI_VC1_LEVEL_HIGH 0x00000004
-#define HFI_VC1_LEVEL_0 0x00000008
-#define HFI_VC1_LEVEL_1 0x00000010
-#define HFI_VC1_LEVEL_2 0x00000020
-#define HFI_VC1_LEVEL_3 0x00000040
-#define HFI_VC1_LEVEL_4 0x00000080
-
#define HFI_VPX_PROFILE_SIMPLE 0x00000001
#define HFI_VPX_PROFILE_ADVANCED 0x00000002
#define HFI_VPX_PROFILE_VERSION_0 0x00000004
@@ -175,16 +128,6 @@
#define HFI_VPX_PROFILE_VERSION_2 0x00000010
#define HFI_VPX_PROFILE_VERSION_3 0x00000020
-#define HFI_DIVX_FORMAT_4 (HFI_COMMON_BASE + 0x1)
-#define HFI_DIVX_FORMAT_5 (HFI_COMMON_BASE + 0x2)
-#define HFI_DIVX_FORMAT_6 (HFI_COMMON_BASE + 0x3)
-
-#define HFI_DIVX_PROFILE_QMOBILE 0x00000001
-#define HFI_DIVX_PROFILE_MOBILE 0x00000002
-#define HFI_DIVX_PROFILE_MT 0x00000004
-#define HFI_DIVX_PROFILE_HT 0x00000008
-#define HFI_DIVX_PROFILE_HD 0x00000010
-
#define HFI_HEVC_PROFILE_MAIN 0x00000001
#define HFI_HEVC_PROFILE_MAIN10 0x00000002
#define HFI_HEVC_PROFILE_MAIN_STILL_PIC 0x00000004
@@ -267,8 +210,6 @@
(HFI_PROPERTY_PARAM_COMMON_START + 0x00B)
#define HFI_PROPERTY_PARAM_MULTI_VIEW_FORMAT \
(HFI_PROPERTY_PARAM_COMMON_START + 0x00C)
-#define HFI_PROPERTY_PARAM_MAX_SEQUENCE_HEADER_SIZE \
- (HFI_PROPERTY_PARAM_COMMON_START + 0x00D)
#define HFI_PROPERTY_PARAM_CODEC_MASK_SUPPORTED \
(HFI_PROPERTY_PARAM_COMMON_START + 0x00E)
#define HFI_PROPERTY_PARAM_MVC_BUFFER_LAYOUT \
@@ -287,8 +228,6 @@
(HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x001)
#define HFI_PROPERTY_PARAM_VDEC_CONCEAL_COLOR \
(HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x002)
-#define HFI_PROPERTY_PARAM_VDEC_NONCP_OUTPUT2 \
- (HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x003)
#define HFI_PROPERTY_PARAM_VDEC_PIXEL_BITDEPTH \
(HFI_PROPERTY_PARAM_VDEC_COMMON_START + 0x007)
#define HFI_PROPERTY_PARAM_VDEC_PIC_STRUCT \
@@ -310,20 +249,8 @@
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x003)
#define HFI_PROPERTY_PARAM_VENC_RATE_CONTROL \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x004)
-#define HFI_PROPERTY_PARAM_VENC_H264_PICORDER_CNT_TYPE \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x005)
-#define HFI_PROPERTY_PARAM_VENC_SESSION_QP \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x006)
-#define HFI_PROPERTY_PARAM_VENC_MPEG4_AC_PREDICTION \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x007)
#define HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x008)
-#define HFI_PROPERTY_PARAM_VENC_MPEG4_TIME_RESOLUTION \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x009)
-#define HFI_PROPERTY_PARAM_VENC_MPEG4_SHORT_HEADER \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00A)
-#define HFI_PROPERTY_PARAM_VENC_MPEG4_HEADER_EXTENSION \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00B)
#define HFI_PROPERTY_PARAM_VENC_OPEN_GOP \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00C)
#define HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH \
@@ -334,8 +261,6 @@
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x00F)
#define HFI_PROPERTY_PARAM_VENC_QUALITY_VS_SPEED \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x010)
-#define HFI_PROPERTY_PARAM_VENC_ADVANCED \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x012)
#define HFI_PROPERTY_PARAM_VENC_H264_SPS_ID \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x014)
#define HFI_PROPERTY_PARAM_VENC_H264_PPS_ID \
@@ -346,8 +271,6 @@
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x017)
#define HFI_PROPERTY_PARAM_VENC_NUMREF \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x018)
-#define HFI_PROPERTY_PARAM_VENC_MULTIREF_P \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x019)
#define HFI_PROPERTY_PARAM_VENC_H264_NAL_SVC_EXT \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x01B)
#define HFI_PROPERTY_PARAM_VENC_LTRMODE \
@@ -356,8 +279,6 @@
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x01D)
#define HFI_PROPERTY_PARAM_VENC_H264_VUI_TIMING_INFO \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x01E)
-#define HFI_PROPERTY_PARAM_VENC_VC1_PERF_CFG \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x01F)
#define HFI_PROPERTY_PARAM_VENC_MAX_NUM_B_FRAMES \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x020)
#define HFI_PROPERTY_PARAM_VENC_H264_VUI_BITSTREAM_RESTRC \
@@ -372,12 +293,8 @@
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x026)
#define HFI_PROPERTY_PARAM_VENC_DISABLE_RC_TIMESTAMP \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x027)
-#define HFI_PROPERTY_PARAM_VENC_INITIAL_QP \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x028)
#define HFI_PROPERTY_PARAM_VENC_VPX_ERROR_RESILIENCE_MODE \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x029)
-#define HFI_PROPERTY_PARAM_VENC_CONSTRAINED_INTRA_PRED \
- (HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x02B)
#define HFI_PROPERTY_PARAM_VENC_HIER_B_MAX_NUM_ENH_LAYER \
(HFI_PROPERTY_PARAM_VENC_COMMON_START + 0x02C)
#define HFI_PROPERTY_PARAM_VENC_HIER_P_HYBRID_MODE \
@@ -401,9 +318,6 @@
(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x004)
#define HFI_PROPERTY_CONFIG_VENC_SLICE_SIZE \
(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x005)
-#define HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE \
- (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x007)
-
#define HFI_PROPERTY_PARAM_VPE_COMMON_START \
(HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x7000)
#define HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER \
@@ -414,8 +328,6 @@
(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00A)
#define HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER \
(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00B)
-#define HFI_PROPERTY_CONFIG_VENC_LTRPERIOD \
- (HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00C)
#define HFI_PROPERTY_CONFIG_VENC_PERF_MODE \
(HFI_PROPERTY_CONFIG_VENC_COMMON_START + 0x00E)
#define HFI_PROPERTY_CONFIG_VENC_BASELAYER_PRIORITYID \
@@ -528,13 +440,6 @@
struct hfi_intra_refresh {
u32 mode;
- u32 air_mbs;
- u32 air_ref;
- u32 cir_mbs;
-};
-
-struct hfi_3x_intra_refresh {
- u32 mode;
u32 mbs;
};
@@ -551,11 +456,6 @@
u32 max_num_b_frames;
};
-struct hfi_vc1e_perf_cfg_type {
- u32 search_range_x_subsampled[3];
- u32 search_range_y_subsampled[3];
-};
-
struct hfi_conceal_color {
u32 conceal_color;
};
@@ -565,24 +465,9 @@
u32 bframes;
};
-struct hfi_mpeg4_header_extension {
- u32 header_extension;
-};
-
-struct hfi_mpeg4_time_resolution {
- u32 time_increment_resolution;
-};
-
struct hfi_multi_stream {
u32 buffer_type;
u32 enable;
- u32 width;
- u32 height;
-};
-
-struct hfi_3x_multi_stream {
- u32 buffer_type;
- u32 enable;
};
struct hfi_multi_view_format {
@@ -593,7 +478,6 @@
#define HFI_MULTI_SLICE_OFF (HFI_COMMON_BASE + 0x1)
#define HFI_MULTI_SLICE_BY_MB_COUNT (HFI_COMMON_BASE + 0x2)
#define HFI_MULTI_SLICE_BY_BYTE_COUNT (HFI_COMMON_BASE + 0x3)
-#define HFI_MULTI_SLICE_GOB (HFI_COMMON_BASE + 0x4)
struct hfi_multi_slice_control {
u32 multi_slice;
@@ -634,23 +518,13 @@
};
struct hfi_quantization {
- u32 qp_i;
- u32 qp_p;
- u32 qp_b;
+ u32 qp_packed;
u32 layer_id;
};
-struct hfi_initial_quantization {
- u32 qp_i;
- u32 qp_p;
- u32 qp_b;
- u32 init_qp_enable;
-};
-
struct hfi_quantization_range {
- u32 min_qp;
- u32 max_qp;
- u32 layer_id;
+ struct hfi_quantization min_qp;
+ struct hfi_quantization max_qp;
};
#define HFI_LTR_MODE_DISABLE 0x0
@@ -726,8 +600,10 @@
#define HFI_COLOR_FORMAT_YUV444 (HFI_COMMON_BASE + 0xE)
#define HFI_COLOR_FORMAT_RGBA8888 (HFI_COMMON_BASE + 0x10)
-#define HFI_COLOR_FORMAT_YUV420_TP10 \
+#define HFI_COLOR_FORMAT_P010 \
(HFI_COLOR_FORMAT_10_BIT_BASE + HFI_COLOR_FORMAT_NV12)
+#define HFI_COLOR_FORMAT_YUV420_TP10 \
+ (HFI_COLOR_FORMAT_10_BIT_BASE + HFI_COLOR_FORMAT_NV12_4x4TILE)
#define HFI_COLOR_FORMAT_NV12_UBWC \
(HFI_COLOR_FORMAT_UBWC_BASE + HFI_COLOR_FORMAT_NV12)
@@ -802,10 +678,6 @@
u32 csc_limit[HFI_MAX_LIMIT_COEFFS];
};
-struct hfi_scs_threshold {
- u32 threshold_value;
-};
-
#define HFI_ROTATE_NONE (HFI_COMMON_BASE + 0x1)
#define HFI_ROTATE_90 (HFI_COMMON_BASE + 0x2)
#define HFI_ROTATE_180 (HFI_COMMON_BASE + 0x3)
@@ -881,10 +753,6 @@
u32 video_domains;
};
-struct hfi_seq_header_info {
- u32 max_hader_len;
-};
-
struct hfi_aspect_ratio {
u32 aspect_width;
u32 aspect_height;
@@ -1057,14 +925,6 @@
u32 rg_buffer_info[1];
};
-struct hfi_cmd_session_get_sequence_header_packet {
- u32 size;
- u32 packet_type;
- u32 session_id;
- u32 buffer_len;
- u32 packet_buffer;
-};
-
struct hfi_cmd_session_sync_process_packet {
u32 size;
u32 packet_type;