DPU_EVT_DSIM_COMMAND,
DPU_EVT_TRIG_MASK,
DPU_EVT_TRIG_UNMASK,
+ DPU_EVT_FENCE_ACQUIRE,
DPU_EVT_FENCE_RELEASE,
DPU_EVT_DECON_FRAMEDONE_WAIT,
DPU_EVT_DECON_SHUTDOWN,
};
/* Related with Fence */
+#define ACQ_FENCE_LEN 40
struct disp_log_fence {
+ char acq_fence[MAX_DECON_WIN][ACQ_FENCE_LEN];
u32 timeline_value;
int timeline_max;
};
bool reconfigure);
void DPU_EVENT_LOG_APPLY_REGION(struct v4l2_subdev *sd,
struct decon_rect *apl_rect);
+void DPU_EVENT_LOG_FENCE(struct v4l2_subdev *sd,
+ struct decon_reg_data *regs, dpu_event_t type);
void DPU_EVENT_SHOW(struct seq_file *s, struct decon_device *decon);
int decon_create_debugfs(struct decon_device *decon);
void decon_destroy_debugfs(struct decon_device *decon);
decon_acquire_old_bufs(decon, regs, old_dma_bufs, old_plane_cnt);
decon_systrace(decon, 'C', "decon_fence_wait", 1);
+
+ DPU_EVENT_LOG_FENCE(&decon->sd, regs, DPU_EVT_FENCE_ACQUIRE);
+
for (i = 0; i < decon->dt.max_win; i++) {
if (regs->dma_buf_data[i][0].fence)
decon_wait_fence(regs->dma_buf_data[i][0].fence);
log->data.winup.apl_region.h = apl_rect->bottom - apl_rect->top + 1;
}
+void DPU_EVENT_LOG_FENCE(struct v4l2_subdev *sd,
+ struct decon_reg_data *regs, dpu_event_t type)
+{
+ struct decon_device *decon = container_of(sd, struct decon_device, sd);
+ int idx = atomic_inc_return(&decon->d.event_log_idx) % DPU_EVENT_LOG_MAX;
+ struct dpu_log *log = &decon->d.event_log[idx];
+ int win = 0;
+ struct dma_fence *fence = NULL;
+ static int fence_log_cnt;
+
+ log->time = ktime_get();
+ log->type = type;
+
+ if (++fence_log_cnt < (DPU_EVENT_LOG_MAX/2))
+ return;
+
+ --fence_log_cnt;
+
+#if !defined(CONFIG_SUPPORT_LEGACY_FENCE)
+ for (win = 0; win < decon->dt.max_win; win++) {
+ log->data.fence.acq_fence[win][0] = '\0';
+ fence = regs->dma_buf_data[win][0].fence;
+ if (fence) {
+ snprintf(&log->data.fence.acq_fence[win][0], ACQ_FENCE_LEN, "%p:%s",
+ fence, fence->ops->get_driver_name(fence));
+ }
+ }
+
+ log->data.fence.timeline_value = atomic_read(&decon->fence.timeline);
+ log->data.fence.timeline_max = atomic_read(&decon->fence.timeline);
+#else
+ log->data.fence.timeline_value = decon->timeline->value;
+ log->data.fence.timeline_max = decon->timeline_max;
+#endif
+}
+
+
/* display logged events related with DECON */
void DPU_EVENT_SHOW(struct seq_file *s, struct decon_device *decon)
{
case DPU_EVT_TRIG_UNMASK:
seq_printf(s, "%20s %20s", "TRIG_UNMASK", "-\n");
break;
+ case DPU_EVT_FENCE_ACQUIRE:
+ seq_printf(s, "%20s %20s", "FENCE_ACQUIRE", "-\n");
+ break;
case DPU_EVT_FENCE_RELEASE:
seq_printf(s, "%20s %20s", "FENCE_RELEASE", "-\n");
break;