[COMMON] g2d: calculate the laptime.
authorhyesoo.yu <hyesoo.yu@samsung.com>
Tue, 25 Jul 2017 06:56:14 +0000 (15:56 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:27:31 +0000 (14:27 +0900)
The time is calculated after completing the task

Change-Id: I1c1fced152fcb3198eab5cb93a1b4d1638e6137c
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_uapi_process.c

index 10e168a9250a3d4ed4f72f466015a719085f393f..5f79973582aec0b4bef07b8a0244c88a047065e3 100644 (file)
@@ -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);
        }