From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Kamil Debski <k.debski@samsung.com>,
linux-samsung-soc@vger.kernel.org, mchehab@osg.samsung.com,
dmitry.torokhov@gmail.com, dri-devel@lists.freedesktop.org,
kyungmin.park@samsung.com, thomas@tommie-lie.de,
linux-input@vger.kernel.org, m.szyprowski@samsung.com,
linux-media@vger.kernel.org
Subject: Re: [Y2038] [PATCH v4 06/10] cec: add HDMI CEC framework: y2038 question
Date: Wed, 06 May 2015 18:17:05 +0200 [thread overview]
Message-ID: <10564120.sr4VXNmXf3@wuerfel> (raw)
In-Reply-To: <554A3A09.9050208@xs4all.nl>
On Wednesday 06 May 2015 17:58:01 Hans Verkuil wrote:
>
> On 05/04/2015 12:14 PM, Arnd Bergmann wrote:
> > On Monday 04 May 2015 09:42:36 Hans Verkuil wrote:
> >> Ping! (Added Arnd to the CC list)
> >
> > Hi Hans,
> >
> > sorry I missed this the first time
> >
> >> On 04/27/2015 09:40 AM, Hans Verkuil wrote:
> >>> Added the y2038 mailinglist since I would like to get their input for
> >>> this API.
> >>>
> >>> Y2038 experts, can you take a look at my comment in the code below?
> >>>
> >>> Thanks!
> >>
> >> Arnd, I just saw your patch series adding struct __kernel_timespec to
> >> uapi/linux/time.h. I get the feeling that it might take a few kernel
> >> cycles before we have a timespec64 available in userspace. Based on that
> >> I think this CEC API should drop the timestamps for now and wait until
> >> timespec64 becomes available before adding it.
> >>
> >> The timestamps are a nice-to-have, but not critical. So adding it later
> >> shouldn't be a problem. What is your opinion?
> >
> > It will take a little while for the patches to make it in, I would guess
> > 4.3 at the earliest. Using your own struct works just as well and would
> > be less ambiguous.
> >
> > However, for timestamps, I would recommend not using timespec anyway.
> > Instead, just use a single 64-bit nanosecond value from ktime_get_ns()
> > (or ktime_get_boot_ns() if you need a time that keeps ticking across
> > suspend). This is more efficient to get and simpler to use as long
> > as you don't need to convert from nanosecond to timespec.
>
> Possibly stupid follow-up question:
>
> is ktime_get_ns() just a different representation as ktime_get_ts64()?
Yes.
> Or is there some offset between the two? They seem to be identical based
> on a quick test, but I'd like to be certain that that's always the case.
>
> Users need to be able to relate this timestamp to a struct timespec as
> returned by V4L2 (and others).
* ktime_get_ns() uses the same timebase as ktime_get_ts64().
* ktime_get_boot_ns() uses the same timebase as ktime_get_boottime() or
getboottime64(), which differs from the first after suspend
* ktime_get_real_ns() uses the same time as gettimeofday() in user space,
which is always different from the other two.
Arnd
next prev parent reply other threads:[~2015-05-06 16:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 13:03 [PATCH v4 00/10] HDMI CEC framework Kamil Debski
2015-04-23 13:03 ` [PATCH v4 01/10] dts: exynos4*: add HDMI CEC pin definition to pinctrl Kamil Debski
2015-04-23 13:03 ` [PATCH v4 02/10] dts: exynos4: add node for the HDMI CEC device Kamil Debski
2015-04-23 13:03 ` [PATCH v4 03/10] dts: exynos4412-odroid*: enable " Kamil Debski
2015-04-23 13:03 ` [PATCH v4 04/10] HID: add HDMI CEC specific keycodes Kamil Debski
2015-04-23 13:03 ` [PATCH v4 05/10] rc: Add HDMI CEC protoctol handling Kamil Debski
2015-04-23 13:03 ` [PATCH v4 06/10] cec: add HDMI CEC framework Kamil Debski
2015-04-23 14:18 ` Hans Verkuil
2015-04-24 10:03 ` Lars Op den Kamp
2015-04-27 8:09 ` Kamil Debski
2015-04-27 8:19 ` Hans Verkuil
2015-04-27 7:40 ` [PATCH v4 06/10] cec: add HDMI CEC framework: y2038 question Hans Verkuil
2015-05-04 7:42 ` [Y2038] " Hans Verkuil
2015-05-04 10:14 ` Arnd Bergmann
2015-05-06 15:58 ` Hans Verkuil
2015-05-06 16:17 ` Arnd Bergmann [this message]
2015-04-27 9:13 ` [PATCH v4 06/10] cec: add HDMI CEC framework Hans Verkuil
2015-04-27 9:22 ` Hans Verkuil
2015-04-27 9:30 ` Hans Verkuil
2015-04-27 11:45 ` Hans Verkuil
2015-04-27 10:04 ` Hans Verkuil
2015-04-27 10:25 ` Hans Verkuil
2015-04-27 11:27 ` Hans Verkuil
2015-04-27 12:18 ` Kamil Debski
2015-04-23 13:03 ` [PATCH v4 07/10] v4l2-subdev: add HDMI CEC ops Kamil Debski
2015-04-23 13:03 ` [PATCH v4 08/10] cec: adv7604: add cec support Kamil Debski
2015-04-23 13:03 ` [PATCH v4 09/10] cec: adv7511: " Kamil Debski
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=10564120.sr4VXNmXf3@wuerfel \
--to=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hverkuil@xs4all.nl \
--cc=k.debski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@osg.samsung.com \
--cc=thomas@tommie-lie.de \
--cc=y2038@lists.linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).