Linux Documentation
 help / color / mirror / Atom feed
From: Dipen Patel <dipenp@nvidia.com>
To: Eli Gavril <eli.gavril@gmail.com>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>
Cc: Kent Gibson <warthog618@gmail.com>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	timestamp@lists.linux.dev, linux-gpio@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-api@vger.kernel.org
Subject: Re: [PATCH 0/3] hte, gpio: HTE timestamps in CLOCK_REALTIME on NVIDIA Tegra
Date: Tue, 1 Dec 2026 11:17:30 -0800	[thread overview]
Message-ID: <1f9fd410-9126-4feb-8ea7-57e3c77d7ead@nvidia.com> (raw)
In-Reply-To: <20261130142435.1292201-1-eli.gavril@gmail.com>

On 11/30/26 6:24 AM, Eli Gavril wrote:
> HTE supports the NVIDIA Tegra Generic Timestamping Engine (GTE), but
> only in the GTE's own counter time, not in CLOCK_REALTIME, so it cannot
> be used as is to timestamp a GNSS PPS. NVIDIA instead uses its
> out-of-tree nvpps driver [1], which reads the GTE through HTE but
> reports through its own character device rather than the GPIO API. This
> series adds CLOCK_REALTIME timestamps to HTE and the GPIO API.
> 
> Patch 1 adds a CLOCK_REALTIME-correlated time to struct hte_ts_data,
> patch 2 fills it in the Tegra194 GTE driver, and patch 3 returns it when
> user space requests HTE and REALTIME together, which is rejected today.
> If a separate flag is preferred over combining the two, I can change it.
> 
> Tested on a Jetson Orin NX with a 1 Hz PPS for one hour, on 6.18 with
> this series and eba302268a01 ("timekeeping: Provide
> ktime_get_snapshot_id()"): no pulse was missed, and consecutive
> intervals differed by at most one 32 ns GTE tick in 91% of cases and by
> at most 96 ns overall. HTE alone, REALTIME alone and no clock flag
> behave as before, both there and with gpio-sim in QEMU.
> 
> The series was developed with an LLM coding assistant (Claude Code,
> model Claude Opus 5.5), which drafted the code and messages; I reviewed
> and tested all of it.
> 
> [1] https://gitlab.com/nvidia/nv-tegra/linux-nv-oot/-/tree/jetson_39.2.2_GA/drivers/nvpps
> 
> Eli Gavril (3):
>   hte: add CLOCK_REALTIME-correlated timestamp to hte_ts_data
>   hte: tegra194: correlate captured timestamps to CLOCK_REALTIME
>   gpiolib: cdev: report HTE timestamps in the CLOCK_REALTIME domain
> 
>  .../gpio/gpio-v2-get-line-ioctl.rst           |  3 ++-
>  drivers/gpio/gpiolib-cdev.c                   | 21 ++++++++-----------
>  drivers/hte/hte-tegra194.c                    | 12 ++++++++++-
>  include/linux/hte.h                           |  3 +++
>  include/uapi/linux/gpio.h                     |  4 +++-
>  5 files changed, 28 insertions(+), 15 deletions(-)
> 
> 
> base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244

I wanted to check how inter-dependencies work? I mean, for example nvpps locks
the ptp with tsc. The clock_realtime itself periodically disciplined with
ntp/ptp in which case it can drift either directions. Overall, I like the
extension and will review closely by end of the week.

Best Regards,
Dipen Patel

      parent reply	other threads:[~2026-12-01 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 14:24 [PATCH 0/3] hte, gpio: HTE timestamps in CLOCK_REALTIME on NVIDIA Tegra Eli Gavril
2026-11-30 14:24 ` [PATCH 1/3] hte: add CLOCK_REALTIME-correlated timestamp to hte_ts_data Eli Gavril
2026-11-30 14:24 ` [PATCH 2/3] hte: tegra194: correlate captured timestamps to CLOCK_REALTIME Eli Gavril
2026-11-30 14:24 ` [PATCH 3/3] gpiolib: cdev: report HTE timestamps in the CLOCK_REALTIME domain Eli Gavril
2026-12-01 18:59 ` [PATCH 0/3] hte, gpio: HTE timestamps in CLOCK_REALTIME on NVIDIA Tegra Linus Walleij
2026-12-01 19:17 ` Dipen Patel [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=1f9fd410-9126-4feb-8ea7-57e3c77d7ead@nvidia.com \
    --to=dipenp@nvidia.com \
    --cc=brgl@kernel.org \
    --cc=corbet@lwn.net \
    --cc=eli.gavril@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linusw@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=thierry.reding@kernel.org \
    --cc=timestamp@lists.linux.dev \
    --cc=warthog618@gmail.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