From 037acf4c3d74b5f65e39f24345939fa58c30c45c Mon Sep 17 00:00:00 2001 From: ChiHun Won Date: Tue, 19 Jun 2018 10:15:36 +0900 Subject: [PATCH] fbdev: dpu20: added event log for video mode Change-Id: I0767f5629ab804f03f2e296131c4028b27a1115c Signed-off-by: ChiHun Won --- drivers/video/fbdev/exynos/dpu20/decon.h | 4 ++++ drivers/video/fbdev/exynos/dpu20/dsim_drv.c | 6 ++++++ drivers/video/fbdev/exynos/dpu20/event_log.c | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/drivers/video/fbdev/exynos/dpu20/decon.h b/drivers/video/fbdev/exynos/dpu20/decon.h index 8fe35b4cf1c6..0dcb7f74ca8a 100644 --- a/drivers/video/fbdev/exynos/dpu20/decon.h +++ b/drivers/video/fbdev/exynos/dpu20/decon.h @@ -481,6 +481,10 @@ typedef enum dpu_event_type { DPU_EVT_DECON_FRAMEDONE, DPU_EVT_DSIM_FRAMEDONE, DPU_EVT_RSC_CONFLICT, + DPU_EVT_DSIM_PL_FIFO_EMPTY, + DPU_EVT_DSIM_PH_FIFO_EMPTY, + DPU_EVT_DSIM_VT_STATUS, + DPU_EVT_DSIM_UNDER_RUN, /* Related with async event */ DPU_EVT_UPDATE_HANDLER, diff --git a/drivers/video/fbdev/exynos/dpu20/dsim_drv.c b/drivers/video/fbdev/exynos/dpu20/dsim_drv.c index 598b925d188f..998f2b294e7f 100644 --- a/drivers/video/fbdev/exynos/dpu20/dsim_drv.c +++ b/drivers/video/fbdev/exynos/dpu20/dsim_drv.c @@ -473,8 +473,11 @@ static irqreturn_t dsim_irq_handler(int irq, void *dev_id) if (int_src & DSIM_INTSRC_SFR_PH_FIFO_EMPTY) { del_timer(&dsim->cmd_timer); complete(&dsim->ph_wr_comp); + DPU_EVENT_LOG(DPU_EVT_DSIM_PH_FIFO_EMPTY, &dsim->sd, ktime_set(0, 0)); dsim_dbg("dsim%d PH_FIFO_EMPTY irq occurs\n", dsim->id); } + if (int_src & DSIM_INTSRC_SFR_PL_FIFO_EMPTY) + DPU_EVENT_LOG(DPU_EVT_DSIM_PL_FIFO_EMPTY, &dsim->sd, ktime_set(0, 0)); if (int_src & DSIM_INTSRC_RX_DATA_DONE) complete(&dsim->rd_comp); if (int_src & DSIM_INTSRC_FRAME_DONE) @@ -484,9 +487,12 @@ static irqreturn_t dsim_irq_handler(int irq, void *dev_id) if (int_src & DSIM_INTSRC_UNDER_RUN) { dsim->total_underrun_cnt++; + DPU_EVENT_LOG(DPU_EVT_DSIM_UNDER_RUN, &dsim->sd, ktime_set(0, 0)); dsim_info("dsim%d underrun irq occurs(%d)\n", dsim->id, dsim->total_underrun_cnt); dsim_underrun_info(dsim); + if (dsim->lcd_info.mode == DECON_VIDEO_MODE) + __dsim_dump(dsim); } if (int_src & DSIM_INTSRC_VT_STATUS) { dsim_dbg("dsim%d vt_status(vsync) irq occurs\n", dsim->id); diff --git a/drivers/video/fbdev/exynos/dpu20/event_log.c b/drivers/video/fbdev/exynos/dpu20/event_log.c index 79029ddd0fa1..6f118d8c6f81 100644 --- a/drivers/video/fbdev/exynos/dpu20/event_log.c +++ b/drivers/video/fbdev/exynos/dpu20/event_log.c @@ -252,6 +252,10 @@ void DPU_EVENT_LOG(dpu_event_t type, struct v4l2_subdev *sd, ktime_t time) case DPU_EVT_ENTER_ULPS: case DPU_EVT_EXIT_ULPS: case DPU_EVT_DSIM_SHUTDOWN: + case DPU_EVT_DSIM_PL_FIFO_EMPTY: + case DPU_EVT_DSIM_PH_FIFO_EMPTY: + case DPU_EVT_DSIM_VT_STATUS: + case DPU_EVT_DSIM_UNDER_RUN: dpu_event_log_dsim(type, sd, time); break; case DPU_EVT_DPP_FRAMEDONE: -- 2.20.1