msm_vidc: Add support to send EOS NAL
If FW detectd End Of Sequence through NAL unit, it
sets a flag in FBD message. Add support to process
this flag and convey to userspace.
Change-Id: I1224199b0a0db727278898e6d8ef2bb49f814d57
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
diff --git a/drivers/media/video/msm_vidc/msm_vidc_common.c b/drivers/media/video/msm_vidc/msm_vidc_common.c
index b9ff82e..ae49f7f 100644
--- a/drivers/media/video/msm_vidc/msm_vidc_common.c
+++ b/drivers/media/video/msm_vidc/msm_vidc_common.c
@@ -837,7 +837,8 @@
vb->v4l2_buf.flags &= ~V4L2_QCOM_BUF_FLAG_CODECCONFIG;
if (fill_buf_done->flags1 & HAL_BUFFERFLAG_SYNCFRAME)
vb->v4l2_buf.flags |= V4L2_BUF_FLAG_KEYFRAME;
-
+ if (fill_buf_done->flags1 & HAL_BUFFERFLAG_EOSEQ)
+ vb->v4l2_buf.flags |= V4L2_QCOM_BUF_FLAG_EOSEQ;
switch (fill_buf_done->picture_type) {
case HAL_PICTURE_IDR:
case HAL_PICTURE_I:
diff --git a/drivers/media/video/msm_vidc/vidc_hal_api.h b/drivers/media/video/msm_vidc/vidc_hal_api.h
index 3b83424..3e70342 100644
--- a/drivers/media/video/msm_vidc/vidc_hal_api.h
+++ b/drivers/media/video/msm_vidc/vidc_hal_api.h
@@ -39,6 +39,7 @@
#define HAL_BUFFERFLAG_TIMESTAMPINVALID 0x00000100
#define HAL_BUFFERFLAG_READONLY 0x00000200
#define HAL_BUFFERFLAG_ENDOFSUBFRAME 0x00000400
+#define HAL_BUFFERFLAG_EOSEQ 0x00200000
#define HAL_DEBUG_MSG_LOW 0x00000001
#define HAL_DEBUG_MSG_MEDIUM 0x00000002