From e00aa16c722da716997aa4f26026c889c261c416 Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Tue, 25 Jul 2017 15:56:14 +0900 Subject: [PATCH] [COMMON] g2d: calculate the laptime. The time is calculated after completing the task Change-Id: I1c1fced152fcb3198eab5cb93a1b4d1638e6137c Signed-off-by: hyesoo.yu --- drivers/gpu/exynos/g2d/g2d_uapi_process.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/exynos/g2d/g2d_uapi_process.c b/drivers/gpu/exynos/g2d/g2d_uapi_process.c index 10e168a9250a..5f79973582ae 100644 --- a/drivers/gpu/exynos/g2d/g2d_uapi_process.c +++ b/drivers/gpu/exynos/g2d/g2d_uapi_process.c @@ -805,14 +805,15 @@ void g2d_put_images(struct g2d_device *g2d_dev, struct g2d_task *task) int g2d_wait_put_user(struct g2d_device *g2d_dev, struct g2d_task *task, struct g2d_task_data __user *uptr, u32 userflag) { - u32 laptime_in_usec = (u32)ktime_us_delta(task->ktime_end, - task->ktime_begin); int ret; if (!g2d_task_wait_completion(task)) { userflag |= G2D_FLAG_ERROR; ret = put_user(userflag, &uptr->flags); } else { + u32 laptime_in_usec = (u32)ktime_us_delta(task->ktime_end, + task->ktime_begin); + ret = put_user(laptime_in_usec, &uptr->laptime_in_usec); } -- 2.20.1