The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alistair Popple <apopple@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>
Cc: nova-gpu@lists.linux.dev, Alice Ryhl <aliceryhl@google.com>,
	 David Airlie <airlied@gmail.com>,
	Alexandre Courbot <acourbot@nvidia.com>,
	 Benno Lossin <lossin@kernel.org>, Gary Guo <gary@garyguo.net>,
	 Eliot Courtney <ecourtney@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>,
	linux-kernel@vger.kernel.org,  dri-devel@lists.freedesktop.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH 2/4] gpu: nova: Add DRM registration data
Date: Thu, 9 Jul 2026 10:40:58 +1000	[thread overview]
Message-ID: <ak7tcGfBxAYQXyf4@nvdebian.thelocal> (raw)
In-Reply-To: <DJROO2091YJ9.2O9BMST1L8HQX@kernel.org>

On 2026-07-07 at 04:01 +1000, Danilo Krummrich <dakr@kernel.org> wrote...
> On Mon Jul 6, 2026 at 7:34 AM CEST, Alistair Popple wrote:
> > diff --git a/drivers/gpu/drm/nova/file.rs b/drivers/gpu/drm/nova/file.rs
> > index 298c02bacb4b..855b6ffe696f 100644
> > --- a/drivers/gpu/drm/nova/file.rs
> > +++ b/drivers/gpu/drm/nova/file.rs
> > @@ -1,11 +1,10 @@
> >  // SPDX-License-Identifier: GPL-2.0
> >  
> > -use crate::driver::{NovaDevice, NovaDriver};
> > +use crate::driver::{DrmRegData, NovaDevice, NovaDriver};
> 
> Please switch to vertical import style.

Will do.

> >  use crate::gem::NovaObject;
> >  use kernel::{
> >      alloc::flags::*,
> >      auxiliary,
> > -    device::Bound,
> >      drm::{
> >          self,
> >          gem::BaseObject,
> > @@ -30,12 +29,12 @@ impl File {
> >      /// IOCTL: get_param: Query GPU / driver metadata.
> >      pub(crate) fn get_param(
> >          dev: &NovaDevice<Registered>,
> > -        _reg_data: &(),
> > +        _reg_data: &DrmRegData<'_>,
> >          getparam: &mut uapi::drm_nova_getparam,
> >          _file: &drm::File<File>,
> >      ) -> Result<u32> {
> > -        let adev: &auxiliary::Device<Bound> = dev.as_ref();
> > -        let pdev: &pci::Device<Bound> = adev.parent().try_into()?;
> > +        let adev: &auxiliary::Device<_> = dev.as_ref();
> > +        let pdev: &pci::Device<_> = adev.parent().try_into()?;

Actually I'd meant to drop this change as it's unrelated and was just me quizzing
my Rust undertanding :-)
 
> Nothing for this patch, but now that we can call into nova-core we can obtain
> the information from the pci::Device via NovaCoreApi.
> 
> The advantage is that NovaCoreApi can store the pci::Device<Bound> from
> nova-core directly, i.e. we get rid of the try_into() dance to obtain the
> correct parent device type.
> 
> Subsequently, we can remove this TryInto impl entirely. :)

That would be nice. I might add that as patch to this series.

  reply	other threads:[~2026-07-09  0:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06  5:34 [PATCH 0/4] gpu: nova: Export parameters from nova-core to nova-drm Alistair Popple
2026-07-06  5:34 ` [PATCH 1/4] gpu: nova-core: Add public driver API to nova-core Alistair Popple
2026-07-06 17:56   ` Danilo Krummrich
2026-07-06  5:34 ` [PATCH 2/4] gpu: nova: Add DRM registration data Alistair Popple
2026-07-06 18:01   ` Danilo Krummrich
2026-07-09  0:40     ` Alistair Popple [this message]
2026-07-06  5:34 ` [PATCH 3/4] drm: nova: Add GETPARAM parameter to read the GPU chipset Alistair Popple
2026-07-06 17:35   ` Timur Tabi
2026-07-06 18:24     ` Danilo Krummrich
2026-07-09  0:16       ` Alistair Popple
2026-07-09  0:49         ` John Hubbard
2026-07-09  4:31           ` Dave Airlie
2026-07-09 10:18           ` Danilo Krummrich
2026-07-06 18:16   ` Danilo Krummrich
2026-07-09  1:31     ` Alistair Popple
2026-07-06  5:34 ` [PATCH 4/4] drm: nova: Add a GETPARAM parameter to read usable VRAM size Alistair Popple
2026-07-06 18:26   ` Danilo Krummrich

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=ak7tcGfBxAYQXyf4@nvdebian.thelocal \
    --to=apopple@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    /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