浏览代码

video: driver: fix AV1D fence timing failures during flush sequence

Flushed out buffers by driver retain filled length field same
as it was while queued to driver. This is incorrect as it
gives an impression to the client that some data has been
written by driver/firmware. Hence, reset this to 0 while
dequeuing to fix the issue.

Change-Id: Ia2bb86a3462255991d45a1f77cab39a4a0eafd23
Signed-off-by: Akshata Sahukar <[email protected]>
Akshata Sahukar 2 年之前
父节点
当前提交
7818456489
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      driver/vidc/src/msm_vidc_driver.c

+ 3 - 1
driver/vidc/src/msm_vidc_driver.c

@@ -5560,8 +5560,10 @@ int msm_vidc_flush_buffers(struct msm_vidc_inst *inst,
 			if (buf->attr & MSM_VIDC_ATTR_QUEUED ||
 				buf->attr & MSM_VIDC_ATTR_DEFERRED) {
 				print_vidc_buffer(VIDC_HIGH, "high", "flushing buffer", inst, buf);
-				if (!(buf->attr & MSM_VIDC_ATTR_BUFFER_DONE))
+				if (!(buf->attr & MSM_VIDC_ATTR_BUFFER_DONE)) {
+					buf->data_size = 0;
 					msm_vidc_vb2_buffer_done(inst, buf);
+				}
 				msm_vidc_put_driver_buf(inst, buf);
 			}
 		}