From: "Eliot Courtney" <ecourtney@nvidia.com>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>
Cc: "John Hubbard" <jhubbard@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, <nova-gpu@lists.linux.dev>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
"dri-devel" <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v2 07/11] gpu: nova-core: gsp: logbuffer: add RetainedLogBuffers::is_empty()
Date: Mon, 30 Nov 2026 11:32:11 +0900 [thread overview]
Message-ID: <DN86YUSG9C4A.16RR6CDWIJ7NR@nvidia.com> (raw)
In-Reply-To: <20261130-nova-r000-staging-v2-7-afd079026a61@nvidia.com>
On Mon Nov 30, 2026 at 12:11 AM JST, Alexandre Courbot wrote:
> From: John Hubbard <jhubbard@nvidia.com>
>
> Move the check for retained logs that the GSP never wrote to into a
> helper, so that it stays in one place when buffers are added.
>
> No functional change.
>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> drivers/gpu/nova-core/gsp/logbuffer.rs | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/nova-core/gsp/logbuffer.rs b/drivers/gpu/nova-core/gsp/logbuffer.rs
> index 40fb6682d83d..bfc1712ea458 100644
> --- a/drivers/gpu/nova-core/gsp/logbuffer.rs
> +++ b/drivers/gpu/nova-core/gsp/logbuffer.rs
> @@ -175,7 +175,7 @@ fn retain(&self) -> Result {
> logrm: self.logrm.snapshot()?,
> };
>
> - if logs.loginit.is_empty() && logs.logintr.is_empty() && logs.logrm.is_empty() {
> + if logs.is_empty() {
> return Ok(());
> }
>
> @@ -221,6 +221,13 @@ struct RetainedLogBuffers {
> logrm: VVec<u8>,
> }
>
> +impl RetainedLogBuffers {
> + /// Returns `true` if the GSP never wrote to any of the buffers.
> + fn is_empty(&self) -> bool {
> + self.loginit.is_empty() && self.logintr.is_empty() && self.logrm.is_empty()
optional nit: destructure &self (specifying all fields), e.g.:
```
fn is_empty(&self) -> bool {
let Self {
name: _,
loginit,
logintr,
logrm,
} = self;
loginit.is_empty() && logintr.is_empty() && logrm.is_empty()
}
```
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
next prev parent reply other threads:[~2026-11-30 2:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 15:10 [PATCH v2 00/11] gpu: nova-core: gsp: preparatory patches for the r000 firmware Alexandre Courbot
2026-11-29 15:11 ` [PATCH v2 01/11] gpu: nova-core: gsp: add the r000 queue element header Alexandre Courbot
2026-11-30 2:47 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 02/11] gpu: nova-core: gsp: rename and move the static configuration type Alexandre Courbot
2026-11-30 2:20 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 03/11] gpu: nova-core: gsp: return the static GPU configuration from boot Alexandre Courbot
2026-11-30 2:22 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 04/11] gpu: nova-core: gsp: add the short name and GID to the GSP_INIT reply Alexandre Courbot
2026-11-30 2:23 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 05/11] gpu: nova-core: gsp: logbuffer: add LogBuffers::init_arguments() Alexandre Courbot
2026-11-30 2:27 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 06/11] gpu: nova-core: gsp: logbuffer: make LogBuffer generic over its size Alexandre Courbot
2026-11-30 2:28 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 07/11] gpu: nova-core: gsp: logbuffer: add RetainedLogBuffers::is_empty() Alexandre Courbot
2026-11-30 2:32 ` Eliot Courtney [this message]
2026-11-29 15:11 ` [PATCH v2 08/11] gpu: nova-core: gsp: cmdq: reduce visibility of gsp-level constants Alexandre Courbot
2026-11-30 2:32 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 09/11] gpu: nova-core: gsp: compute the msgq entry offset in MsgqTxHeader::new() Alexandre Courbot
2026-11-30 2:33 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 10/11] gpu: nova-core: gsp: take all the msgq layout values from Cmdq " Alexandre Courbot
2026-11-30 2:34 ` Eliot Courtney
2026-11-29 15:11 ` [PATCH v2 11/11] gpu: nova-core: firmware: tlv: add method to load the file referenced by a TLV Alexandre Courbot
2026-11-30 2:38 ` 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=DN86YUSG9C4A.16RR6CDWIJ7NR@nvidia.com \
--to=ecourtney@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
--cc=zhiw@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox