All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Timur Tabi" <ttabi@nvidia.com>
Cc: Dave Airlie <airlied@redhat.com>, nouveau@lists.freedesktop.org
Subject: Re: [PATCH] drm/nouveau: expose VBIOS via debugfs on GSP-RM systems
Date: Tue, 28 Apr 2026 17:53:13 +0200	[thread overview]
Message-ID: <DI4WQHWHRT4Z.10GC877YXSKWJ@kernel.org> (raw)
In-Reply-To: <20260407185306.3024695-1-ttabi@nvidia.com>

On Tue Apr 7, 2026 at 8:53 PM CEST, Timur Tabi wrote:
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
> index c8335f5b49db..28bcf38cdddf 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bios.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
> @@ -2085,10 +2085,24 @@ nouveau_bios_init(struct drm_device *dev)
>  	int ret;
>  
>  	/* only relevant for PCI devices */
> -	if (!dev_is_pci(dev->dev) ||
> -	    nvkm_gsp_rm(nvxx_device(drm)->gsp))
> +	if (!dev_is_pci(dev->dev))
>  		return 0;
>  
> +	if (nvkm_gsp_rm(nvxx_device(drm)->gsp)) {
> +		struct nvkm_bios *nvkm_bios = nvxx_bios(drm);

Can this pointer ever be NULL? Before we had a nvkm_gsp_rm() check and I think
that some GSP chipsets can have a nvxx_bios() return a NULL pointer.

> +
> +		/*
> +		 * The VBIOS data was already read by the nvkm layer during
> +		 * nvkm_bios_new(). Point the legacy DRM-level VBIOS structure
> +		 * at the same buffer so that any remaining legacy code can
> +		 * access it. This exposes the VBIOS via the DRM debugfs entries.
> +		 */
> +		bios->data = nvkm_bios->data;
> +		bios->length = nvkm_bios->size;
> +
> +		return 0;
> +	}
> +
>  	if (!NVInitVBIOS(dev))
>  		return -ENODEV;
>  
> -- 
> 2.53.0


  reply	other threads:[~2026-04-28 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 18:53 [PATCH] drm/nouveau: expose VBIOS via debugfs on GSP-RM systems Timur Tabi
2026-04-28 15:53 ` Danilo Krummrich [this message]
2026-04-28 20:23   ` Timur Tabi

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=DI4WQHWHRT4Z.10GC877YXSKWJ@kernel.org \
    --to=dakr@kernel.org \
    --cc=airlied@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ttabi@nvidia.com \
    /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.