if (layer_map->in_fd <= 0)
return -1;
buf_ready_fence = layer_map->in_fence;
+ if (buf_ready_fence == NULL) {
+ return -1;/* no fence ,output directly. */
+ }
ret = osd_wait_fenceobj(buf_ready_fence, 4000);
if (ret < 0)
osd_log_err("osd%d: Sync Fence wait error:%d\n",
#include <ion/ion_priv.h>
#include "video_composer.h"
+#define KERNEL_ATRACE_TAG KERNEL_ATRACE_TAG_VIDEO_COMPOSER
+#include <trace/events/meson_atrace.h>
+
#define VIDEO_COMPOSER_VERSION "1.0"
#define VIDEO_COMPOSER_NAME_SIZE 32
#define PRINT_FENCE 0X0002
#define PRINT_PERFORMANCE 0X0004
#define PRINT_OTHER 0X0008
+#define PRINT_INDEX_DISP 0X0010
#define to_dst_buf(vf) \
container_of(vf, struct dst_buf_t, frame)
file_private_data =
(struct file_private_data *)(file_vf->private_data);
vf = &file_private_data->vf;
- vc_print(dev->index, PRINT_OTHER,
- "received_cnt=%lld,i=%d,z=%d,omx_index=%d\n",
+ vc_print(dev->index, PRINT_INDEX_DISP,
+ "received_cnt=%lld,i=%d,z=%d,omx_index=%d, fence_fd=%d, index_disp=%d\n",
dev->received_count + 1,
i,
frames_info->frame_info[j].zorder,
- vf->omx_index);
+ vf->omx_index,
+ fence_fd,
+ vf->index_disp);
+ ATRACE_COUNTER("video_composer", vf->index_disp);
} else if (frames_info->frame_info[j].type == 1) {
vc_print(dev->index, PRINT_OTHER,
"received_cnt=%lld,i=%d,z=%d,DMA_fd=%d\n",
/* if the caller didn't specify this heap id */
if (!((1 << heap->id) & heap_id_mask))
continue;
+ if (len < SZ_256K && heap->id == ION_HEAP_TYPE_CUSTOM &&
+ heap_id_mask == -1)
+ continue;
buffer = ion_buffer_create(heap, dev, len, align, flags);
if (!IS_ERR(buffer))
break;
KERNEL_ATRACE_TAG_TSYNC,
KERNEL_ATRACE_TAG_IONVIDEO,
KERNEL_ATRACE_TAG_AMLVIDEO,
+ KERNEL_ATRACE_TAG_VIDEO_COMPOSER,
+ KERNEL_ATRACE_TAG_V4L2,
KERNEL_ATRACE_TAG_MAX = 64,
KERNEL_ATRACE_TAG_ALL
};