Pārlūkot izejas kodu

video: driver: modify bytesused if DPB tag list enabled

vb2 is not allowing client to pass data in output meta plane.
adjust the bytesused as client will send buffer tag metadata
in output meta plane if DPB_TAG_LIST metadata enabled.

Change-Id: I2d99d0acf559c4b92e0610d518f6cfbdd54a2c19
Signed-off-by: Darshana Patil <[email protected]>
Darshana Patil 4 gadi atpakaļ
vecāks
revīzija
cad8267eca
1 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. 12 0
      driver/vidc/src/msm_vdec.c

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

@@ -1911,6 +1911,18 @@ int msm_vdec_qbuf(struct msm_vidc_inst *inst, struct vb2_buffer *vb2)
 			return rc;
 	}
 
+	if (vb2->type == OUTPUT_META_PLANE) {
+		if (inst->capabilities->cap[META_DPB_TAG_LIST].value) {
+			/*
+			 * vb2 is not allowing client to pass data in output meta plane.
+			 * adjust the bytesused as client will send buffer tag metadata
+			 * in output meta plane if DPB_TAG_LIST metadata enabled.
+			 */
+			if (!vb2->planes[0].bytesused)
+				vb2->planes[0].bytesused = 1024;
+		}
+	}
+
 	/* batch decoder output & meta buffer only */
 	if (inst->decode_batch.enable && vb2->type == OUTPUT_MPLANE)
 		rc = msm_vdec_qbuf_batch(inst, vb2);