Browse Source

Merge "video: driver: add picture type for decoder"

qctecmdr 4 năm trước cách đây
mục cha
commit
0cdf5e607e
2 tập tin đã thay đổi với 3 bổ sung11 xóa
  1. 3 4
      driver/vidc/src/msm_vdec.c
  2. 0 7
      driver/vidc/src/venus_hfi_response.c

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

@@ -61,6 +61,7 @@ static const u32 msm_vdec_input_subscribe_for_properties[] = {
 static const u32 msm_vdec_output_subscribe_for_properties[] = {
 	HFI_PROP_WORST_COMPRESSION_RATIO,
 	HFI_PROP_WORST_COMPLEXITY_FACTOR,
+	HFI_PROP_PICTURE_TYPE,
 };
 
 static const u32 msm_vdec_internal_buffer_type[] = {
@@ -1067,14 +1068,12 @@ static int msm_vdec_subscribe_property(struct msm_vidc_inst *inst,
 			payload[i + 1] = msm_vdec_input_subscribe_for_properties[i];
 		payload_size = (ARRAY_SIZE(msm_vdec_input_subscribe_for_properties) + 1) *
 			sizeof(u32);
-	}
-	else if (port == OUTPUT_PORT) {
+	} else if (port == OUTPUT_PORT) {
 		for (i = 0; i < ARRAY_SIZE(msm_vdec_output_subscribe_for_properties); i++)
 			payload[i + 1] = msm_vdec_output_subscribe_for_properties[i];
 		payload_size = (ARRAY_SIZE(msm_vdec_output_subscribe_for_properties) + 1) *
 			sizeof(u32);
-	}
-	else {
+	} else {
 		i_vpr_e(inst, "%s: invalid port: %d\n", __func__, port);
 		return -EINVAL;
 	}

+ 0 - 7
driver/vidc/src/venus_hfi_response.c

@@ -1236,13 +1236,6 @@ static int handle_session_property(struct msm_vidc_inst *inst,
 		inst->subcr_params[port].tier = payload_ptr[0];
 		break;
 	case HFI_PROP_PICTURE_TYPE:
-		if (is_encode_session(inst) && port == INPUT_PORT) {
-			rc = -EINVAL;
-			i_vpr_e(inst,
-				"%s: invalid port: %d for property %#x\n",
-				__func__, pkt->port, pkt->type);
-			break;
-		}
 		inst->hfi_frame_info.picture_type = payload_ptr[0];
 		break;
 	case HFI_PROP_NO_OUTPUT: