瀏覽代碼

video: driver: add fix to return all buffers back to client

If client attempts streamoff and msm_vidc_close sequence
concurrently, then all buffers not returned back to client,
i.e leading to warnon at vb2_queue_cancel at vb2 layer.
So added change to send vb2_buffer_done at driver fd close
sequence.

Change-Id: I43d779000501907d12d5ba8e90e007bdf5b8b801
Signed-off-by: Govindaraj Rajagopal <[email protected]>
Govindaraj Rajagopal 4 年之前
父節點
當前提交
6f281973aa
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      driver/vidc/src/msm_vidc_driver.c

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

@@ -4166,7 +4166,9 @@ void msm_vidc_destroy_buffers(struct msm_vidc_inst *inst)
 			continue;
 
 		list_for_each_entry_safe(buf, dummy, &buffers->list, list) {
-			print_vidc_buffer(VIDC_ERR, "err", "destroying ", inst, buf);
+			print_vidc_buffer(VIDC_ERR, "err ", "destroying ", inst, buf);
+			if (!(buf->attr & MSM_VIDC_ATTR_BUFFER_DONE))
+				msm_vidc_vb2_buffer_done(inst, buf);
 			msm_vidc_put_driver_buf(inst, buf);
 		}
 		msm_vidc_unmap_buffers(inst, ext_buf_types[i]);