From: Dave Airlie via B4 Relay <devnull+airlied.redhat.com@kernel.org>
To: Andreas Hindborg <a.hindborg@kernel.org>,
FUJITA Tomonori <fujita.tomonori@gmail.com>,
Gary Guo <gary@garyguo.net>, Alice Ryhl <aliceryhl@google.com>,
Danilo Krummrich <dakr@kernel.org>,
Daniel Almeida <daniel.almeida@collabora.com>,
Alexandre Courbot <acourbot@nvidia.com>
Cc: nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
Dave Airlie <airlied@redhat.com>
Subject: [PATCH 1/2] rust: time: expose as_nanos for clock sources.
Date: Mon, 02 Nov 2026 17:17:40 +1000 [thread overview]
Message-ID: <20261102-nova-timer-v1-1-b347ead64469@redhat.com> (raw)
In-Reply-To: <20261102-nova-timer-v1-0-b347ead64469@redhat.com>
From: Dave Airlie <airlied@redhat.com>
The nouveau C driver does ktime_to_ns(ktime_get()) to program
the cpu ns into some hw/fw, so allow this method for rust drivers.
Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
rust/kernel/time.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust/kernel/time.rs b/rust/kernel/time.rs
index 6c0a5e8090d0..a91ddf04785b 100644
--- a/rust/kernel/time.rs
+++ b/rust/kernel/time.rs
@@ -211,8 +211,9 @@ pub fn elapsed(&self) -> Delta {
Self::now() - *self
}
+ /// Return the raw nanoseconds values since the epoch of clock `C`.
#[inline]
- pub(crate) fn as_nanos(&self) -> i64 {
+ pub fn as_nanos(&self) -> i64 {
self.inner
}
--
2.56.0
next prev parent reply other threads:[~2026-11-02 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 7:17 [PATCH 0/2] nova-core: add initial support for gpu timer (v2) Dave Airlie via B4 Relay
2026-11-02 7:17 ` Dave Airlie via B4 Relay [this message]
2026-11-02 7:17 ` [PATCH 2/2] gpu: nova-core: add support for GPU timer block. (v2) Dave Airlie via B4 Relay
2026-11-02 17:11 ` sashiko-bot
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=20261102-nova-timer-v1-1-b347ead64469@redhat.com \
--to=devnull+airlied.redhat.com@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@redhat.com \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=nova-gpu@lists.linux.dev \
/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