diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-09-14 11:39:01 +0900 |
---|---|---|
committer | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-09-15 09:12:18 +0900 |
commit | f71a7f0e31f5dc6f6ed39a80e6c36ee03ea9a6c2 (patch) | |
tree | 93d3ee0b2edbd9f7a9f7b627670b3834d01ab3c0 | |
parent | 43b77dbae9896a1db50c4e261f08498f3d4fd821 (diff) | |
download | linux-exynos-f71a7f0e31f5dc6f6ed39a80e6c36ee03ea9a6c2.tar.gz linux-exynos-f71a7f0e31f5dc6f6ed39a80e6c36ee03ea9a6c2.tar.bz2 linux-exynos-f71a7f0e31f5dc6f6ed39a80e6c36ee03ea9a6c2.zip |
drm/exynos: get event time from ktime
G2D and IPP drivers gets event time from do_gettimeofday(), but drm
vblank event gets it from ktime. Use ktime for consistency.
Change-Id: I9b2f4c74540c4a15845f5de67ffcd537ba57afeb
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_g2d.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_ipp.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 81a250830808..67da4bfaea39 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -890,6 +890,7 @@ static void g2d_finish_event(struct g2d_data *g2d, u32 cmdlist_no) struct g2d_runqueue_node *runqueue_node = g2d->runqueue_node; struct drm_exynos_pending_g2d_event *e; struct timeval now; + ktime_t now_ktime; unsigned long flags; if (list_empty(&runqueue_node->event_list)) @@ -898,7 +899,8 @@ static void g2d_finish_event(struct g2d_data *g2d, u32 cmdlist_no) e = list_first_entry(&runqueue_node->event_list, struct drm_exynos_pending_g2d_event, base.link); - do_gettimeofday(&now); + now_ktime = drm_timestamp_monotonic ? ktime_get() : ktime_get_real(); + now = ktime_to_timeval(now_ktime); e->event.tv_sec = now.tv_sec; e->event.tv_usec = now.tv_usec; e->event.cmdlist_no = cmdlist_no; diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index 2626cd07de3c..47b8db394c16 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c @@ -1426,6 +1426,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv, struct drm_exynos_ipp_send_event *e; struct list_head *head; struct timeval now; + ktime_t now_ktime; unsigned long flags; u32 tbuf_id[EXYNOS_DRM_OPS_MAX] = {0, }; int ret, i; @@ -1529,7 +1530,8 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv, e = list_first_entry(&c_node->event_list, struct drm_exynos_ipp_send_event, base.link); - do_gettimeofday(&now); + now_ktime = drm_timestamp_monotonic ? ktime_get() : ktime_get_real(); + now = ktime_to_timeval(now_ktime); DRM_DEBUG_KMS("tv_sec[%ld]tv_usec[%ld]\n", now.tv_sec, now.tv_usec); e->event.tv_sec = now.tv_sec; e->event.tv_usec = now.tv_usec; |