[COMMON] g2d: add debug code to measure the LLWFD latency
authorSeungpyo Hong <sp.hong@samsung.com>
Thu, 17 May 2018 05:43:11 +0000 (14:43 +0900)
committerJanghyuck Kim <janghyuck.kim@samsung.com>
Mon, 23 Jul 2018 05:39:25 +0000 (14:39 +0900)
Change-Id: Ib9660284ef5bb133b14b922056b153a22bba4a7b
Signed-off-by: Seungpyo Hong <sp.hong@samsung.com>
drivers/gpu/exynos/g2d/g2d_debug.c

index 54466c6adec65945f6eb18f7633cd188469d3892..4f4e0c2eaeff68074a0f2e86af22e439b4da6bd4 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/debugfs.h>
 #include <linux/sched/task.h>
 
+#include <media/exynos_tsmux.h>
+
 #include "g2d.h"
 #include "g2d_task.h"
 #include "g2d_uapi.h"
@@ -383,4 +385,13 @@ void g2d_stamp_task(struct g2d_task *task, u32 stampid, s32 val)
                        g2d_dump_info(task->g2d_dev, task);
                }
        }
+
+       /* LLWFD latency measure */
+       /* media/exynos_tsmux.h includes below functions */
+       if (task != NULL && IS_HWFC(task->flags)) {
+               if (stampid == G2D_STAMP_STATE_PUSH)
+                       g2d_blending_start(task->job_id);
+               if (stampid == G2D_STAMP_STATE_DONE)
+                       g2d_blending_end(task->job_id);
+       }
 }