Răsfoiți Sursa

Merge "video: driver: fix MAX_NUM_REORDER_FRAMES property usage"

qctecmdr 2 ani în urmă
părinte
comite
d174ba4539

+ 6 - 1
driver/platform/pineapple/src/msm_vidc_pineapple.c

@@ -1655,8 +1655,12 @@ static struct msm_platform_inst_capability instance_cap_data_pineapple[] = {
 		HFI_PROP_PIC_ORDER_CNT_TYPE,
 		CAP_FLAG_VOLATILE},
 
+	/*
+	 * value of MAX_NUM_REORDER_FRAMES is 32 packed as mentioned below
+	 * (max_num_reorder_count << 16) | max_dec_frame_buffering_count
+	 */
 	{MAX_NUM_REORDER_FRAMES, DEC, H264 | HEVC,
-		0, 16, 1, 0,
+		0, INT_MAX, 1, 0,
 		V4L2_CID_MPEG_VIDC_MAX_NUM_REORDER_FRAMES,
 		HFI_PROP_MAX_NUM_REORDER_FRAMES,
 		CAP_FLAG_VOLATILE},
@@ -2781,6 +2785,7 @@ static const u32 pineapple_vdec_psc_avc[] = {
 	HFI_PROP_PROFILE,
 	HFI_PROP_LEVEL,
 	HFI_PROP_SIGNAL_COLOR_INFO,
+	HFI_PROP_MAX_NUM_REORDER_FRAMES,
 };
 
 static const u32 pineapple_vdec_psc_hevc[] = {

+ 5 - 4
driver/vidc/src/msm_vdec.c

@@ -723,18 +723,19 @@ static int msm_vdec_set_output_properties(struct msm_vidc_inst *inst)
 
 static bool msm_vdec_check_outbuf_fence_allowed(struct msm_vidc_inst *inst)
 {
+	u32 reorder_count = inst->capabilities[MAX_NUM_REORDER_FRAMES].value >> 16;
+
 	/* no need of checking for reordering/interlace for vp9/av1 */
 	if (inst->codec == MSM_VIDC_VP9 || inst->codec == MSM_VIDC_AV1)
 		return true;
 
 	if (inst->capabilities[CODED_FRAMES].value == CODED_FRAMES_INTERLACE ||
-		(!inst->capabilities[OUTPUT_ORDER].value &&
-		inst->capabilities[MAX_NUM_REORDER_FRAMES].value)) {
+		(!inst->capabilities[OUTPUT_ORDER].value && reorder_count)) {
 		i_vpr_e(inst,
-			"%s: outbuf tx fence is unsupported for coded frames %d or output order %d and max num reorder frames %d\n",
+			"%s: outbuf tx fence is unsupported for coded frames %d or output order %d and reorder frames %d\n",
 			__func__, inst->capabilities[CODED_FRAMES].value,
 			inst->capabilities[OUTPUT_ORDER].value,
-			inst->capabilities[MAX_NUM_REORDER_FRAMES].value);
+			(inst->capabilities[MAX_NUM_REORDER_FRAMES].value >> 16));
 		return false;
 	}
 

+ 4 - 3
driver/vidc/src/venus_hfi_response.c

@@ -46,8 +46,7 @@ void print_psc_properties(const char *str, struct msm_vidc_inst *inst,
 	struct msm_vidc_subscription_params subsc_params)
 {
 	i_vpr_h(inst,
-		"%s: width %d, height %d, crop offsets[0] %#x, crop offsets[1] %#x, bit depth %#x, coded frames %d "
-		"fw min count %d, poc %d, color info %d, profile %d, level %d, tier %d, fg present %d, sb enabled %d max_num_reorder_frames %d\n",
+		"%s: width %d, height %d, crop offsets[0] %#x, crop offsets[1] %#x, bit depth %#x, coded frames %d fw min count %d, poc %d, color info %d, profile %d, level %d, tier %d, fg present %d, sb enabled %d, max_num_reorder_frames %d, max_dec_frame_buffering_count %d\n",
 		str, (subsc_params.bitstream_resolution & HFI_BITMASK_BITSTREAM_WIDTH) >> 16,
 		(subsc_params.bitstream_resolution & HFI_BITMASK_BITSTREAM_HEIGHT),
 		subsc_params.crop_offsets[0], subsc_params.crop_offsets[1],
@@ -55,7 +54,9 @@ void print_psc_properties(const char *str, struct msm_vidc_inst *inst,
 		subsc_params.fw_min_count, subsc_params.pic_order_cnt,
 		subsc_params.color_info, subsc_params.profile, subsc_params.level,
 		subsc_params.tier, subsc_params.av1_film_grain_present,
-		subsc_params.av1_super_block_enabled, subsc_params.max_num_reorder_frames);
+		subsc_params.av1_super_block_enabled,
+		(subsc_params.max_num_reorder_frames >> 16),
+		(subsc_params.max_num_reorder_frames & 0x00FF));
 }
 
 static void print_sfr_message(struct msm_vidc_core *core)