On 09/16/2015 02:31 PM, Joonyoung Shim wrote: > G2D and IPP drivers get event time from do_gettimeofday(), but drm > vblank event gets it from ktime. Use ktime for consistency. Oops, this causes build errors, please ignore, i will retry. Thanks. > > Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> > --- > drivers/gpu/drm/exynos/exynos_drm_g2d.c | 4 +++- > 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 3734c34..fa8817c 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c > @@ -880,6 +880,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)) > @@ -888,7 +889,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 67d2423..74076d0 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c > @@ -1412,6 +1412,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; > @@ -1515,7 +1516,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; > _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel