From: hyesoo.yu Date: Tue, 25 Jul 2017 06:56:14 +0000 (+0900) Subject: [COMMON] g2d: calculate the laptime. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=55475c674f481c9e3c2f7aa4db6452e85f14fb3c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] g2d: calculate the laptime. The time is calculated after completing the task Change-Id: I1c1fced152fcb3198eab5cb93a1b4d1638e6137c Signed-off-by: hyesoo.yu --- 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); }