From: sashiko-bot@kernel.org
To: "Eliot Courtney" <ecourtney@nvidia.com>
Cc: "Alexandre Courbot" <acourbot@nvidia.com>,
ojeda@kernel.org, dri-devel@lists.freedesktop.org,
"Danilo Krummrich" <dakr@kernel.org>
Subject: Re: [PATCH v3 06/10] gpu: nova-core: mm: Add support to use PRAMIN windows to write to VRAM
Date: Thu, 27 Aug 2026 09:09:40 +0000 [thread overview]
Message-ID: <20260827090941.15B8F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260827-pramin-split-v3-6-24b24d7afc52@nvidia.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Low] Compilation fails unconditionally because `kernel::io::register::OffsetLoc` is missing from the kernel tree.
- [Low] The `io_project!` macro is invoked with unbracketed projection specifications, causing a compilation error.
- [Low] The `Drop` implementation for `PraminAccess` will fail to compile with a zero-sized type due to a const assertion failure in `cast::<u8>()`.
--
commit da741ebe3207f602c3f762361899c60fcf5605a3
Author: Joel Fernandes <joelagnelf@nvidia.com>
gpu: nova-core: mm: Add support to use PRAMIN windows to write to VRAM
This commit adds a Pramin manager to handle direct CPU read/write to VRAM
via PRAMIN apertures. It returns an MMIO view of VRAM and handles repositioning
and alignment of the window.
> diff --git a/drivers/gpu/nova-core/mm/pramin.rs b/drivers/gpu/nova-core/mm/pramin.rs
> new file mode 100644
> index 0000000000000..20be3fc471ba3
> --- /dev/null
> +++ b/drivers/gpu/nova-core/mm/pramin.rs
> @@ -0,0 +1,178 @@
[ ... ]
> +use kernel::{
> + io::{
> + io_project,
> + register,
> + register::OffsetLoc,
[Severity: Low]
Does this code build? kernel::io::register::OffsetLoc appears to be missing
from the kernel tree.
> + Io,
> + Mmio, //
> + },
[ ... ]
> +impl<T> Drop for PraminAccess<'_, T>
> +where
> + T: FromBytes + IntoBytes,
> +{
> + fn drop(&mut self) {
> + // Insert an ordering point after previous writes through this window.
> + self.view.cast::<u8>().read_val();
[Severity: Low]
Will this fail to compile if PraminAccess is instantiated with a zero-sized
type? Mmio::cast::<u8>() statically asserts that
size_of::<u8>() <= T::MIN_SIZE, which evaluates to 1 <= 0 for ZSTs and fails
during monomorphization.
> + }
> +}
> +
> +impl<'gpu> Pramin<'gpu> {
[ ... ]
> + pub(super) fn new(
> + bar: Bar0<'gpu>,
> + chipset: Chipset,
> + vram_range: Range<VramAddress>,
> + ) -> Result<Self> {
> + let hal = hal::mm_hal(chipset);
> + let window = io_project!(bar, build: PRAMIN);
[Severity: Low]
Is this macro syntax correct? The io_project! macro expects bracketed
syntax for array and offset projections. Should this be [build: PRAMIN]?
> + let base = vram_range.start.align_down(Self::BASE_ALIGN);
[ ... ]
> + pub(super) fn window_at<'a, T>(
> + &'a mut self,
> + vram_addr: VramAddress,
> + ) -> Result<PraminAccess<'a, T>>
> + where
> + T: FromBytes + IntoBytes,
> + {
> + let offset = self.window_offset(vram_addr, size_of::<T>())?;
> + let view = io_project!(self.window, try: OffsetLoc::new(offset));
[Severity: Low]
Does this also require bracketed macro syntax, like
[try: OffsetLoc::new(offset)]? Also, as noted above, OffsetLoc is missing
from the kernel tree.
> +
> + Ok(PraminAccess { view })
> + }
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260827-pramin-split-v3-0-24b24d7afc52@nvidia.com?part=6
next prev parent reply other threads:[~2026-08-27 9:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 8:51 [PATCH v3 00/10] gpu: nova-core: add PRAMIN window support Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 01/10] gpu: nova-core: mm: Add VramAddress type Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 02/10] gpu: nova-core: mm: Implement Alignable and Debug for VramAddress Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 03/10] gpu: nova-core: mm: Add PRAMIN window registers Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 04/10] gpu: nova-core: mm: Add the memory management HAL Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 05/10] rust: io: add static `cast()` method for views Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 06/10] gpu: nova-core: mm: Add support to use PRAMIN windows to write to VRAM Eliot Courtney
2026-08-27 9:09 ` sashiko-bot [this message]
2026-08-27 8:51 ` [PATCH v3 07/10] docs: gpu: nova-core: Document the PRAMIN aperture mechanism Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 08/10] gpu: nova-core: mm: Add GpuMm centralized memory manager Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 09/10] gpu: nova-core: Add self-test assertion macros and config option Eliot Courtney
2026-08-27 8:51 ` [PATCH v3 10/10] gpu: nova-core: mm: Add PRAMIN aperture self-tests Eliot Courtney
2026-08-27 9:07 ` sashiko-bot
2026-09-02 8:46 ` [PATCH v3 00/10] gpu: nova-core: add PRAMIN window support Eliot Courtney
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=20260827090941.15B8F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@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