Sfoglia il codice sorgente

video: driver: Always Set COMV bufcount to FW

Always set COMV bufcount to FW, even if COMV buffer can be
reused. Otherwise, there may be a mismatch in COM bufcount
between host and firmware.

Change-Id: I10d54818a4478e8b0a9e9577c6c8684ad52f5de8
Signed-off-by: Mihir Ganu <[email protected]>
Mihir Ganu 2 anni fa
parent
commit
7dd8b6d186
1 ha cambiato i file con 10 aggiunte e 6 eliminazioni
  1. 10 6
      driver/vidc/src/msm_vidc_driver.c

+ 10 - 6
driver/vidc/src/msm_vidc_driver.c

@@ -3990,6 +3990,16 @@ int msm_vidc_queue_internal_buffers(struct msm_vidc_inst *inst,
 		return 0;
 	}
 
+	/*
+	 * Set HFI_PROP_COMV_BUFFER_COUNT to firmware even if COMV buffer
+	 * is reused.
+	 */
+	if (is_decode_session(inst) && buffer_type == MSM_VIDC_BUF_COMV) {
+		rc = msm_vdec_set_num_comv(inst);
+		if (rc)
+			return rc;
+	}
+
 	buffers = msm_vidc_get_buffers(inst, buffer_type, __func__);
 	if (!buffers)
 		return -EINVAL;
@@ -4000,12 +4010,6 @@ int msm_vidc_queue_internal_buffers(struct msm_vidc_inst *inst,
 		return 0;
 	}
 
-	if (is_decode_session(inst) && buffer_type == MSM_VIDC_BUF_COMV) {
-		rc = msm_vdec_set_num_comv(inst);
-		if (rc)
-			return rc;
-	}
-
 	list_for_each_entry_safe(buffer, dummy, &buffers->list, list) {
 		/* do not queue pending release buffers */
 		if (buffer->flags & MSM_VIDC_ATTR_PENDING_RELEASE)