dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lyude Paul" <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/4] drm/nouveau/gsp/r570: Never enter Gcoff state
Date: Mon, 29 Jun 2026 22:56:08 +0000	[thread overview]
Message-ID: <20260629225609.2AC9C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260629224350.2870201-3-lyude@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but GSP active channel scheduling is not resumed on suspend error paths, leading to a permanent GPU hang.
--

commit d3622da930a8cf5e22c2dae487c3e7c942f12198
Author: Lyude Paul <lyude@redhat.com>

drm/nouveau/gsp/r570: Never enter Gcoff state

This commit disables the Gcoff state transition for the r570 platform
during suspend operations. It resolves an issue where the Gcoff state
caused runtime suspend failures by ensuring the bEnteringGcoffState
flag is permanently set to 0.

> 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
> index 2945d5b4e5707..af5aa5065c3dd 100644
> --- 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 is a pre-existing issue, but I have a question about the error
handling paths during suspend in this file.

If r570_fbsr_init() or other operations like nvkm_instobj_save() return
an error, those errors propagate out of r570_fbsr_suspend():

drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c:r570_fbsr_suspend() {
    ...
	/* Stop channel scheduling. */
	r570_fbsr_suspend_channels(gsp, true);

	/* Save BAR2 allocations to system memory. */
	list_for_each_entry(iobj, &imem->list, head) {
		if (iobj->preserve) {
			ret = nvkm_instobj_save(iobj);
			if (ret)
				return ret;
    ...
}

If any of these early returns are taken, r570_fbsr_suspend_channels(gsp,
false) is never called. Will this leave the GSP active channel scheduling
permanently disabled and result in a GPU hang if the PM core aborts the
suspend process?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260629224350.2870201-1-lyude@redhat.com?part=2

  reply	other threads:[~2026-06-29 22:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 22:42 [PATCH v2 0/4] drm/nouveau/gsp/r570: Fix runtime PM Lyude Paul
2026-06-29 22:42 ` [PATCH v2 1/4] Revert "nouveau/gsp: fix suspend/resume regression on r570 firmware" Lyude Paul
2026-06-29 22:56   ` sashiko-bot
2026-06-30 11:53   ` Andy Shevchenko
2026-06-30 16:05     ` Danilo Krummrich
2026-07-01 18:16       ` lyude
2026-06-29 22:42 ` [PATCH v2 2/4] drm/nouveau/gsp/r570: Never enter Gcoff state Lyude Paul
2026-06-29 22:56   ` sashiko-bot [this message]
2026-06-29 22:42 ` [PATCH v2 3/4] drm/nouveau/gsp/r570: Set oldLevel correctly in GSP resume arguments Lyude Paul
2026-06-29 22:42 ` [PATCH v2 4/4] drm/nouveau/gsp/r570: Add missing state flags to " Lyude Paul
2026-06-30 11:50 ` [PATCH v2 0/4] drm/nouveau/gsp/r570: Fix runtime PM Andy Shevchenko
2026-07-01 18:05   ` lyude

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=20260629225609.2AC9C1F000E9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox