Ver código fonte

Merge "video: driver: Skip subscription/delivery when not required"

qctecmdr 4 anos atrás
pai
commit
8a0a8ef938

+ 6 - 0
driver/vidc/src/msm_vdec.c

@@ -1003,6 +1003,9 @@ static int msm_vdec_subscribe_metadata(struct msm_vidc_inst *inst,
 		}
 	};
 
+	if (!count)
+		return 0;
+
 	rc = venus_hfi_session_command(inst,
 			HFI_CMD_SUBSCRIBE_MODE,
 			port,
@@ -1042,6 +1045,9 @@ static int msm_vdec_set_delivery_mode_metadata(struct msm_vidc_inst *inst,
 		}
 	};
 
+	if (!count)
+		return 0;
+
 	rc = venus_hfi_session_command(inst,
 			HFI_CMD_DELIVERY_MODE,
 			port,

+ 6 - 0
driver/vidc/src/msm_venc.c

@@ -659,6 +659,9 @@ static int msm_venc_metadata_delivery(struct msm_vidc_inst *inst,
 		}
 	};
 
+	if (!count)
+		return 0;
+
 	rc = venus_hfi_session_command(inst,
 			HFI_CMD_DELIVERY_MODE,
 			port,
@@ -703,6 +706,9 @@ static int msm_venc_metadata_subscription(struct msm_vidc_inst *inst,
 		}
 	};
 
+	if (!count)
+		return 0;
+
 	rc = venus_hfi_session_command(inst,
 			HFI_CMD_SUBSCRIBE_MODE,
 			port,

+ 1 - 1
driver/vidc/src/venus_hfi_response.c

@@ -1199,7 +1199,7 @@ static int handle_session_response(struct msm_vidc_core *core,
 				else if (packet->port == HFI_PORT_RAW)
 					rc = queue_response_work(inst, RESP_WORK_OUTPUT_PSC,
 						(void *)hdr, hdr->size);
-					goto exit;
+				goto exit;
 			} else if (packet->type == HFI_CMD_BUFFER &&
 						packet->port == HFI_PORT_RAW &&
 						check_last_flag(inst, packet)) {