From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Gary Guo" <gary@garyguo.net>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
"Abdiel Janulgue" <abdiel.janulgue@gmail.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Robin Murphy" <robin.murphy@arm.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/5] gpu: nova-core: use pointer projection for command queue code
Date: Wed, 29 Apr 2026 20:23:58 +0900 [thread overview]
Message-ID: <DI5LMVWUZFT4.1JJ3YY1NVGR66@nvidia.com> (raw)
In-Reply-To: <20260415-projection-syntax-rework-v1-4-450723cb3727@garyguo.net>
On Thu Apr 16, 2026 at 4:57 AM JST, Gary Guo wrote:
<snip>
> @@ -318,39 +331,40 @@ fn driver_write_area_size(&self) -> usize {
> /// As the message queue is a circular buffer, the region may be discontiguous in memory. In
> /// that case the second slice will have a non-zero length.
> fn driver_read_area(&self) -> (&[[u8; GSP_PAGE_SIZE]], &[[u8; GSP_PAGE_SIZE]]) {
> - let tx = self.gsp_write_ptr();
> - let rx = self.cpu_read_ptr();
> + let tx = num::u32_as_usize(self.gsp_write_ptr());
> + let rx = num::u32_as_usize(self.cpu_read_ptr());
>
> // Pointer to the first entry of the GSP message queue.
> - let data = ptr::project!(self.0.as_ptr(), .gspq.msgq.data[build: 0]);
> + let data = ptr::project!(self.0.as_ptr(), .gspq.msgq.data);
>
> - let (tail_end, wrap_end) = if rx <= tx {
> - // Read area is non-wrapping and stops right before `tx`.
I find these comments helpful since the logic is a bit convulated - can
we keep them, or at least have something in the same spirit?
next prev parent reply other threads:[~2026-04-29 11:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 19:57 [PATCH 0/5] Rework index projection syntax Gary Guo
2026-04-15 19:57 ` [PATCH 1/5] rust: ptr: add panicking index projection variant Gary Guo
2026-04-16 7:07 ` Alice Ryhl
2026-04-27 11:24 ` Andreas Hindborg
2026-04-27 12:45 ` Gary Guo
2026-04-29 11:22 ` Alexandre Courbot
2026-04-29 11:29 ` Gary Guo
2026-04-30 11:23 ` Alexandre Courbot
2026-04-30 11:54 ` Gary Guo
2026-04-15 19:57 ` [PATCH 2/5] rust: dma: update to keyworded index projection syntax Gary Guo
2026-04-16 7:07 ` Alice Ryhl
2026-04-27 11:25 ` Andreas Hindborg
2026-04-29 11:22 ` Alexandre Courbot
2026-04-15 19:57 ` [PATCH 3/5] gpu: nova-core: convert to keyworded " Gary Guo
2026-04-16 7:08 ` Alice Ryhl
2026-04-29 11:22 ` Alexandre Courbot
2026-04-15 19:57 ` [PATCH 4/5] gpu: nova-core: use pointer projection for command queue code Gary Guo
2026-04-16 7:14 ` Alice Ryhl
2026-04-29 11:23 ` Alexandre Courbot [this message]
2026-04-15 19:57 ` [PATCH 5/5] rust: ptr: remove implicit index projection syntax Gary Guo
2026-04-16 7:14 ` Alice Ryhl
2026-04-27 11:28 ` Andreas Hindborg
2026-04-29 11:22 ` Alexandre Courbot
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=DI5LMVWUZFT4.1JJ3YY1NVGR66@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=abdiel.janulgue@gmail.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
/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