Re: [PATCH v5 19/19] drm: nova: Use drm::Device<Registered> to access the parent bus device

"Alexandre Courbot" <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,dev.linux.lists.driver-core,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Sun Jun 28, 2026 at 11:53 PM JST, Danilo Krummrich wrote:
> The get_param ioctl needs access to the parent auxiliary device. Since
> ioctl handlers run inside a RegistrationGuard, accept
> &NovaDevice<Registered> to obtain &auxiliary::Device<Bound> via as_ref()
> directly. This removes the need for drm::Device data, hence set it to
> ().
>
> Reviewed-by: Lyude Paul <[email protected]>
> Signed-off-by: Danilo Krummrich <[email protected]>
> ---
>  drivers/gpu/drm/nova/driver.rs | 11 ++---------
>  drivers/gpu/drm/nova/file.rs   |  7 ++++---
>  2 files changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/nova/driver.rs b/drivers/gpu/drm/nova/driver.rs
> index bd2a55405db8..739690bc2db5 100644
> --- a/drivers/gpu/drm/nova/driver.rs
> +++ b/drivers/gpu/drm/nova/driver.rs
> @@ -29,11 +29,6 @@ pub(crate) struct Nova<'bound> {
>  /// Convienence type alias for the DRM device type for this driver
>  pub(crate) type NovaDevice<Ctx = drm::Normal> = drm::Device<NovaDriver, Ctx>;
>  
> -#[pin_data]
> -pub(crate) struct NovaData {
> -    pub(crate) adev: ARef<auxiliary::Device>,
> -}

Went through all of this series to see that! :)

Reviewed-by: Alexandre Courbot <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.