From: sashiko-bot@kernel.org
To: "Lyude Paul" <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v5 2/4] drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr
Date: Fri, 14 Aug 2026 19:56:58 +0000 [thread overview]
Message-ID: <20260814195658.9950F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814194542.781955-3-lyude@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Unbalanced teardown and PM rollback failure in r570_fbsr_suspend() on error paths, leading to permanent GPU malfunction.
--
--- Patch [2]: [PATCH v5 2/4] drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr ---
commit 16fc4506e7114a3cfe615883d89f54f5f2c54a54
Author: Lyude Paul <lyude@redhat.com>
drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr
This commit fixes suspend/resume on some desktops by setting GcOff to 0.
It turns out that setting GcOff to 1 causes GSP to save and restore buffers
that actually need to be reinitialized on resume.
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c
> @@ -81,7 +81,7 @@ r570_fbsr_init(struct nvkm_gsp *gsp, struct sg_table *sgt, u64 size)
> ctrl->hClient = gsp->internal.client.object.handle;
> ctrl->hSysMem = memlist.handle;
> ctrl->sysmemAddrOfSuspendResumeData = gsp->sr.meta.addr;
> - ctrl->bEnteringGcoffState = 1;
> + ctrl->bEnteringGcoffState = 0;
>
> ret = nvkm_gsp_rm_ctrl_wr(&gsp->internal.device.subdevice, ctrl);
> if (ret)
[Severity: High]
This isn't a bug introduced by this patch, but while looking at the suspend
paths in this file, I noticed an issue in r570_fbsr_suspend().
If nvkm_instobj_save() fails, it returns without restoring channel
scheduling:
r570_fbsr_suspend() {
...
ret = nvkm_instobj_save(iobj);
if (ret)
return ret;
...
}
Similarly, if nvkm_gsp_sg() fails later in the same function:
r570_fbsr_suspend() {
...
ret = nvkm_gsp_sg(device, size, &gsp->sr.fbsr);
if (ret)
return ret;
...
}
Does this leave the system in an unusable state if a memory allocation
failure occurs?
It appears that returning immediately here skips restoring the channels or
freeing previously allocated iobj->suspend buffers.
During a suspend failure, nvkm_device_fini() aborts the suspend process and
attempts to restart devices by calling nvkm_subdev_init(), which invokes
r535_gsp_init(). Because gsp->sr.meta.data was destroyed and set to NULL on
the error path, r535_gsp_init() will skip calling rm->api->fbsr->resume(gsp).
Could this permanently disable the channels and leave the GPU in a broken
suspended state until the system is rebooted?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260814194542.781955-1-lyude@redhat.com?part=2
next prev parent reply other threads:[~2026-08-14 19:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 19:43 [PATCH v5 0/4] drm/nouveau: GSP runtime PM fixes Lyude Paul
2026-08-14 19:43 ` Lyude Paul
2026-08-14 19:43 ` [PATCH v5 1/4] Revert "nouveau/gsp: fix suspend/resume regression on r570 firmware" Lyude Paul
2026-08-14 19:43 ` Lyude Paul
2026-08-14 19:43 ` [PATCH v5 2/4] drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr Lyude Paul
2026-08-14 19:43 ` Lyude Paul
2026-08-14 19:56 ` sashiko-bot [this message]
2026-08-14 19:43 ` [PATCH v5 3/4] drm/nouveau/gsp/r570: Enable S/R Display workaround in GSP Lyude Paul
2026-08-14 19:43 ` Lyude Paul
2026-08-14 19:43 ` [PATCH v5 4/4] drm/nouveau/gsp: Increase delay for magic sleep in r535_gsp_fini() Lyude Paul
2026-08-14 19:43 ` Lyude Paul
2026-08-14 20:45 ` [PATCH v5 0/4] drm/nouveau: GSP runtime PM fixes David Airlie
2026-08-14 20:45 ` David Airlie
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=20260814195658.9950F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lyude@redhat.com \
--cc=sashiko-reviews@lists.linux.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.