All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Daniel Almeida" <daniel.almeida@collabora.com>,
	"Deborah Brouwer" <deborah.brouwer@collabora.com>,
	"Sami Tolvanen" <samitolvanen@google.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>,
	"Joerg Roedel (AMD)" <joro@8bytes.org>,
	"Will Deacon" <will@kernel.org>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Subject: Re: [PATCH 1/4] rust: drm/gpuvm: add GpuVa::data_ref accessor
Date: Tue, 17 Nov 2026 20:40:20 +0100	[thread overview]
Message-ID: <0d26baaa-92ae-43ff-9a76-a81cad624dcf@kernel.org> (raw)
In-Reply-To: <20261117-tyr-remap-2mb-v1-1-2a8efd4c8180@google.com>

On 11/17/26 8:32 PM, Alice Ryhl wrote:
> From: Sami Tolvanen <samitolvanen@google.com>
> 
> Tyr's VM_BIND remap path rebuilds page-table mappings for the fragments
> that survive a split, and those fragments must keep the protection flags
> of the original mapping. Add GpuVa::data_ref() so the remap step can
> read the VaData of an existing mapping.
> 
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
> [aliceryhl: split into separate gpuvm and iommu commits]
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

One question below, otherwise:

Acked-by: Danilo Krummrich <dakr@kernel.org>

> ---
>  rust/kernel/drm/gpuvm/va.rs | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/rust/kernel/drm/gpuvm/va.rs b/rust/kernel/drm/gpuvm/va.rs
> index 46493f0ec5a6..f81302faba61 100644
> --- a/rust/kernel/drm/gpuvm/va.rs
> +++ b/rust/kernel/drm/gpuvm/va.rs
> @@ -87,6 +87,12 @@ pub fn obj(&self) -> &T::Object {
>          unsafe { <T::Object as IntoGEMObject>::from_raw((*self.as_raw()).gem.obj) }
>      }
>  
> +    /// Access the driver-private [`VaData`](DriverGpuVm::VaData) associated with this mapping.
> +    #[inline]
> +    pub fn data_ref(&self) -> &T::VaData {
> +        &self.data
> +    }
> +
Why data_ref() instead of just data() or a Deref impl?

  reply	other threads:[~2026-11-17 19:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 19:32 [PATCH 0/4] drm/tyr: fix partial 2MB block unmaps on GPUVM remap Alice Ryhl
2026-11-17 19:32 ` [PATCH 1/4] rust: drm/gpuvm: add GpuVa::data_ref accessor Alice Ryhl
2026-11-17 19:40   ` Danilo Krummrich [this message]
2026-11-17 19:32 ` [PATCH 2/4] rust: iommu: pgtable: add iova_to_phys Alice Ryhl
2026-11-17 19:32 ` [PATCH 3/4] drm/tyr: vm: expand sub-block unmaps to 2MB boundaries on remap Alice Ryhl
2026-11-17 20:02   ` sashiko-bot
2026-11-18  8:13     ` Alice Ryhl
2026-11-17 19:32 ` [PATCH 4/4] drm/tyr: vm: check the remaining length in pt_unmap() Alice Ryhl
2026-11-18  3:40 ` [PATCH 0/4] drm/tyr: fix partial 2MB block unmaps on GPUVM remap Deborah Brouwer

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=0d26baaa-92ae-43ff-9a76-a81cad624dcf@kernel.org \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel.almeida@collabora.com \
    --cc=deborah.brouwer@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=matthew.brost@intel.com \
    --cc=ojeda@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=samitolvanen@google.com \
    --cc=tamird@kernel.org \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tmgross@umich.edu \
    --cc=will@kernel.org \
    --cc=work@onurozkan.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.