浏览代码

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 年之前
父节点
当前提交
cad8267eca
共有 1 个文件被更改,包括 12 次插入0 次删除
  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);