From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37D1B362143 for ; Mon, 29 Jun 2026 22:44:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782773083; cv=none; b=XtLQCi/eQRrH1GTCCkXP7OpbVda4t1i5raT3cCDqzmADMsKmdo1cpXP5b43EVn1Pd6cC9KK2rwcqmbNm6BpvJmW9x9WbDLNkpsJlxIijLoovmLwon7CgCNzpT83Q3p/cfeaZW38nz9Xqm5V3djOZnqQTeBAf7ZIFJnJtDgLxh+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782773083; c=relaxed/simple; bh=Nm2GRIFNEPuy5W/WAA190Aa6/Zqx1BulE8MsgAATRXo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OQGPiGwxuIONAV2doMNgG8wAyiApOA+hOBLlnS7A5y8wBQMshWWM9uvad2lYRd3dfjYgHkc3udxoiLuBOetDAVCixD2oUQAy1NdXUIzNhUsMmOjCv4Sr94QQu/t7aefXMTE6H5v4UNzKMDrXonqmbenpoDw0miQuWWIoqk1MD98= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OemnYkt0; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OemnYkt0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782773081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zw+yxHJkPLDJzuuhT36OrRKDnTGX+7WWEu0wvYE6r6k=; b=OemnYkt0RCnwcPFzlO7PN4HMFmkNCo1iTGWY11W6+faOP1jGoNJNppMm1r262D0uT3uIkv nkgk4KHcBPSs54BJV75v0xSfDrneSXJZp8AEbN5xW3GAgXfaNXhlN238WAbIkG94q6N2mO +w1GN3O0npovVXSMhUeltVmbsYdcOio= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-131-EHJCy_UwPQWrQd0ZkjdVWA-1; Mon, 29 Jun 2026 18:44:36 -0400 X-MC-Unique: EHJCy_UwPQWrQd0ZkjdVWA-1 X-Mimecast-MFC-AGG-ID: EHJCy_UwPQWrQd0ZkjdVWA_1782773074 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 516A619344BA; Mon, 29 Jun 2026 22:44:34 +0000 (UTC) Received: from GoldenWind.lan (unknown [10.22.88.59]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 14E6E36918; Mon, 29 Jun 2026 22:44:31 +0000 (UTC) From: Lyude Paul To: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, "Timur Tabi" , "Dave Airlie" , "Andy Shevchenko" , "Maarten Lankhorst" , "Ben Skeggs" , "Kees Cook" , "Simona Vetter" , "David Airlie" , "Thomas Zimmermann" , "Maxime Ripard" , "Mel Henning" , "Danilo Krummrich" , "Lyude Paul" Subject: [PATCH v2 2/4] drm/nouveau/gsp/r570: Never enter Gcoff state Date: Mon, 29 Jun 2026 18:42:34 -0400 Message-ID: <20260629224350.2870201-3-lyude@redhat.com> In-Reply-To: <20260629224350.2870201-1-lyude@redhat.com> References: <20260629224350.2870201-1-lyude@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 It turns out that the only reason our previous fixes looked like they worked for this was because we would occasionally set the Gcoff state to 0 in the normal S3 path, which fixed suspend/resume on desktops - but not on machines using runtime suspend. The proper fix is to just never set this flag. Our current guess for the reasoning behind this is that Gcoff likely coincides with GC6, and not literally power off. Signed-off-by: Lyude Paul Fixes: 53dac0623853 ("drm/nouveau/gsp: add support for 570.144") Cc: # v6.16+ --- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.54.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12573C43602 for ; Mon, 29 Jun 2026 22:44:46 +0000 (UTC) Received: from kara.freedesktop.org (unknown [131.252.210.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id 026CE10EA8D; Mon, 29 Jun 2026 22:44:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Vb/X6F5z"; dkim-atps=neutral Received: from kara.freedesktop.org (localhost [127.0.0.1]) by kara.freedesktop.org (Postfix) with ESMTP id 5775A46DA5; Mon, 29 Jun 2026 22:30:04 +0000 (UTC) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=lists.freedesktop.org; s=20240201; t=1782772204; b=BXsdxFIungKrKodNKxqapq8jaAvlH7u8sYtjUlWJw1IlenLFkweDeVa/NtyT/Xt1LtXjY L/P7y+Aa8M3SjC60olrFASE0oiw8ty0Z9iB6kz8k7lDXaazjqCy3TFg8Zk4LuPKeLmS0rPQ B/C7e9TOXLilDLgiaDWLlfwTiWdGjWkcTzDyd6YSVMh2NorEIyDQkH0C7hGOwuy2GFVO1xz GrhXHrn+haxKm1gze3Yce3pKFuqiPLbkK1YSrb+Zo3Bof83WtJNQgCPwsuIima2T0gYPfM4 lejqa4JW8S/kEveE1LZwSTFyr9C+dmwLgBzH79p9nN2Wo/jT5dYM72DvhrHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.freedesktop.org; s=20240201; t=1782772204; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=zw+yxHJkPLDJzuuhT36OrRKDnTGX+7WWEu0wvYE6r6k=; b=hmnrUcoXV2qFmCf4Mk+DG6n8sLd0m6JfuuBBQK85NqeQjmbx+md895oQtuym49gKqKYqO DBEcgWtHP9D+OTOxyqBlXh0/KAljB9JsJ8CjSAxeET32ACtx3wJuBYRXqqWL2gIUVPFsQKy 46BGZlz/RMVgqmT50R9EOTLCxfzz8pAG9QUj62zbKEP0s0GvMBF7u9pBcruY8OqfAteX+PO SgAvl4nWlCAIDEAcmgI4VX2r0mlyE9oWAyp3FjjN5Pr1h8BWAkd8GOtHGLwuYZMvcngGsOv zifvSbRFRQmUUO6YEtDgQphfI9UFQINl2PuYW+WSZ5ebPrE4L3VGyzAWJzUA== ARC-Authentication-Results: i=1; mail.freedesktop.org; dkim=pass header.d=redhat.com; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=redhat.com policy.dmarc=quarantine Authentication-Results: mail.freedesktop.org; dkim=pass header.d=redhat.com; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=redhat.com policy.dmarc=quarantine Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by kara.freedesktop.org (Postfix) with ESMTPS id C92FF46D51 for ; Mon, 29 Jun 2026 22:30:01 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 36D8F10EA85 for ; Mon, 29 Jun 2026 22:44:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782773081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zw+yxHJkPLDJzuuhT36OrRKDnTGX+7WWEu0wvYE6r6k=; b=Vb/X6F5zmoG74M2Pr/yNSB1p2Ac2puI17mX7anlzsZ13zmi/MndpZcaRuhl0Wmugb3zlCg FeJvFNB7MpneWHtIv8eq5yO7nfbOxTKzfyneAbu0c+7/GikqDbnGLr+Ff0KcDYkNxor9RO npzY6QDrLWkAPjnWbiCvG5nWtG54TeE= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-131-EHJCy_UwPQWrQd0ZkjdVWA-1; Mon, 29 Jun 2026 18:44:36 -0400 X-MC-Unique: EHJCy_UwPQWrQd0ZkjdVWA-1 X-Mimecast-MFC-AGG-ID: EHJCy_UwPQWrQd0ZkjdVWA_1782773074 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 516A619344BA; Mon, 29 Jun 2026 22:44:34 +0000 (UTC) Received: from GoldenWind.lan (unknown [10.22.88.59]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 14E6E36918; Mon, 29 Jun 2026 22:44:31 +0000 (UTC) From: Lyude Paul To: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] drm/nouveau/gsp/r570: Never enter Gcoff state Date: Mon, 29 Jun 2026 18:42:34 -0400 Message-ID: <20260629224350.2870201-3-lyude@redhat.com> In-Reply-To: <20260629224350.2870201-1-lyude@redhat.com> References: <20260629224350.2870201-1-lyude@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-MFC-PROC-ID: bxNoKTc5LtkjKnOOfWfetPFuCo69Q4PdcRhGwA6jxpA_1782773074 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: ZGMQVZZAYFMD3NZ3JBYOSU3FVSMTQEQM X-Message-ID-Hash: ZGMQVZZAYFMD3NZ3JBYOSU3FVSMTQEQM X-MailFrom: lyude@redhat.com X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address CC: stable@vger.kernel.org, Dave Airlie , Andy Shevchenko , Maarten Lankhorst , Ben Skeggs , Kees Cook , Simona Vetter , Maxime Ripard , Danilo Krummrich X-Mailman-Version: 3.3.8 Precedence: list List-Id: Nouveau development list Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: It turns out that the only reason our previous fixes looked like they worked for this was because we would occasionally set the Gcoff state to 0 in the normal S3 path, which fixed suspend/resume on desktops - but not on machines using runtime suspend. The proper fix is to just never set this flag. Our current guess for the reasoning behind this is that Gcoff likely coincides with GC6, and not literally power off. Signed-off-by: Lyude Paul Fixes: 53dac0623853 ("drm/nouveau/gsp: add support for 570.144") Cc: # v6.16+ --- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.54.0