From: Joonyoung Shim <jy0922.shim@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: sw0312.kim@samsung.com
Subject: Re: [PATCH] drm/exynos: get event time from ktime
Date: Wed, 16 Sep 2015 14:41:40 +0900 [thread overview]
Message-ID: <55F90114.2080205@samsung.com> (raw)
In-Reply-To: <1442381487-642-1-git-send-email-jy0922.shim@samsung.com>
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@samsung.com>
> ---
> 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2015-09-16 5:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 5:31 [PATCH] drm/exynos: get event time from ktime Joonyoung Shim
2015-09-16 5:41 ` Joonyoung Shim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55F90114.2080205@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox